Skip to content

Commit

Permalink
Merge pull request #451 from SpeedyWeather/ncc/use-docs
Browse files Browse the repository at this point in the history
Use `Documenter.@docs` functionality to display docstring in Documentation
  • Loading branch information
milankl authored Feb 22, 2024
2 parents 2dc69b7 + 29c20b6 commit faa2849
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 77 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
with:
version: '1.10'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
run: julia --color=yes --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
run: julia --project=docs/ docs/make.jl
run: JULIA_DEBUG=Documenter julia --color=yes --project=docs/ docs/make.jl
4 changes: 2 additions & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"

[compat]
Documenter = "0.26, 0.27, 1"
NCDatasets = "0.12, 0.13"
UnicodePlots = "^3.3"
NCDatasets = "0.12, 0.13, 0.14"
PythonPlot = "1"
UnicodePlots = "3.3"
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ using Documenter, SpeedyWeather

makedocs(
format = Documenter.HTML(prettyurls=get(ENV, "CI", nothing)=="true",
ansicolor=true,
size_threshold = 600_000), # in bytes
ansicolor=true,
size_threshold = 600_000), # in bytes
sitename = "SpeedyWeather.jl",
authors = "M Klöwer and SpeedyWeather contributors",
modules = [SpeedyWeather],
Expand Down
74 changes: 3 additions & 71 deletions docs/src/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,74 +153,6 @@ Note that some fields are actual options, but others are derived from the option
arrays/objects the output writer needs, but shouldn't be passed on by the user.
The actual options are declared as `[OPTION]` in the following

```julia
help?> OutputWriter
search: OutputWriter

NetCDF output writer. Contains all output options and auxiliary fields for
output interpolation. To be initialised with
OutputWriter(::SpectralGrid,::Type{<:ModelSetup},kwargs...) to pass on the
resolution information and the model type which chooses which variables to
output. Options include

• spectral_grid::SpectralGrid

• output::Bool

• path::String: [OPTION] path to output folder, run_???? will be
created within

• id::String: [OPTION] run identification number/string

• run_path::String

• filename::String: [OPTION] name of the output netcdf file

• write_restart::Bool: [OPTION] also write restart file if
output==true?

• pkg_version::VersionNumber

• startdate::DateTime

• output_dt::Second: [OPTION] output frequency, time step

• output_vars::Vector{Symbol}: [OPTION] which variables to output,
u, v, vor, div, pres, temp, humid

• missing_value::Union{Float32, Float64}: [OPTION] missing value to
be used in netcdf output

• compression_level::Int64: [OPTION] lossless compression level;
1=low but fast, 9=high but slow

• shuffle::Bool: [OPTION] shuffle/bittranspose filter for
compression

• keepbits::SpeedyWeather.Keepbits: [OPTION] mantissa bits to keep
for every variable

• output_every_n_steps::Int64

• timestep_counter::Int64

• output_counter::Int64

• netcdf_file::Union{Nothing, NCDatasets.NCDataset}

• input_Grid::Type{<:AbstractGrid}

• as_matrix::Bool: [OPTION] sort grid points into a matrix
(interpolation-free), for OctahedralClenshawGrid, OctaHEALPixGrid
only

• quadrant_rotation::NTuple{4, Int64}

• matrix_quadrant::NTuple{4, Tuple{Int64, Int64}}

• output_Grid::Type{<:AbstractFullGrid}: [OPTION] the grid used for
output, full grids only

• nlat_half::Int64: [OPTION] the resolution of the output grid,
default: same nlat_half as in the dynamical core
```
```@example netcdf
@doc OutputWriter
```

0 comments on commit faa2849

Please sign in to comment.