diff --git a/docs/Project.toml b/docs/Project.toml index fd07404ae31e1af8c06084a043af1eb6b3110b99..8ea8a724c7f483c3fbff02137a84f43ac1eb18b9 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,4 +1,5 @@ [deps] +ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" CryoGrid = "a535b82e-5f3d-4d97-8b0b-d6483f5bebd5" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" diff --git a/docs/make.jl b/docs/make.jl index 722f4fe9526c25bfa29dd4af3aca752e7f7a7196..391355a0fb6e8ad9123dc73982fb693e5d529f8e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,10 +1,21 @@ +using ArgParse using CryoGrid using Documenter using Literate -# ENV["LOCALDOCS"] = "true" +s = ArgParseSettings() +@add_arg_table! s begin + "--local", "-l" + action = :store_true + help = "Local docs build mode" + "--draft", "-d" + action = :store_true + help = "Whether to build docs in draft mode, i.e. skipping execution of examples and doctests" +end +parsed_args = parse_args(ARGS, s) -IS_LOCAL = haskey(ENV,"LOCALDOCS") && ENV["LOCALDOCS"] == "true" +IS_LOCAL = parsed_args["local"] || parse(Bool, get(ENV, "LOCALDOCS", "false")) +IS_DRAFT = parsed_args["draft"] || parse(Bool, get(ENV, "DRAFTDOCS", "false")) if haskey(ENV, "GITHUB_ACTIONS") ENV["JULIA_DEBUG"] = "Documenter" end @@ -22,7 +33,6 @@ const modules = [ CryoGrid.Soils, CryoGrid.Snow, CryoGrid.Surface, - CryoGrid.Presets, CryoGrid.Diagnostics, # solvers CryoGrid.DiffEq, @@ -65,6 +75,7 @@ example_docpages = map(example_docfiles) do f end makedocs( + repo=Remotes.GitHub("CryoGrid", "CryoGrid.jl"), modules=modules, sitename="CryoGrid.jl", authors="Brian Groenke, Moritz Langer, Jan Nitzbon", @@ -73,6 +84,8 @@ makedocs( canonical = "https://cryogrid.github.io/CryoGrid.jl/v0", ), warnonly=true, # don't fail when there are errors + doctest=!IS_DRAFT, + draft=IS_DRAFT, pages=["Home" => "index.md", "Installation" => "installation.md", "Getting Started" => "quickstart.md", @@ -107,7 +120,6 @@ makedocs( "CryoGridLite" => "api/solvers/lite_implicit.md", ], "Diagnostics" => "api/diagnostics.md", - "Presets" => "api/presets.md", ], ]) diff --git a/docs/src/api/presets.md b/docs/src/api/presets.md deleted file mode 100644 index b78f64d214760ddfb9fbb6e59e6cbd18d07388b0..0000000000000000000000000000000000000000 --- a/docs/src/api/presets.md +++ /dev/null @@ -1,7 +0,0 @@ -# Presets (@) - -```@autodocs -Modules = [CryoGrid.Presets] -Private = false -Order = [:type, :function, :macro] -``` \ No newline at end of file diff --git a/docs/src/manual/architecture.md b/docs/src/manual/architecture.md index 5cadab0602ac9a2db344c2128fb1e4f708326333..cf54aecac2b2cfed3a40ad6b0c779362e3c489c3 100644 --- a/docs/src/manual/architecture.md +++ b/docs/src/manual/architecture.md @@ -27,7 +27,6 @@ The `CryoGrid` module provided by CryoGrid.jl is organized into a series of subm |`Tiles`|Defines the `Tile` and `Stratigraphy` types for constructing 1D land models.|`Utils`,`Numerics`,`InputOutput`| |`DiffEq`|Provides dispatches and utilities for integrating with solvers from the SciML `OrdinaryDiffEq` package.|`Utils`,`Numerics`,`InputOutput`| |`LiteImplicit`|Provides an implementation of the `CryoGridLite` solver scheme from Langer et al. 2023.|`Utils`,`Numerics`| -|`Presets`|Provides pre-defined stratigraphies, forcings, and layer configurations to facilitate rapid prototyping.|`Utils`,`Numerics`,`InputOutput`,`Heat`,`Hydrology`,`Soils`| Note that all submodules depend on the top-level `CryoGrid` module which declares all of the "core" types and [method interfaces](https://docs.julialang.org/en/v1/manual/interfaces/) for defining model behavior. Each submodule may additionally define its own method interfaces related to its own specific process(es) or layer(s).