Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
trontrytel committed May 26, 2022
1 parent 0acbbff commit 58caf0a
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Documentation

on:
push:
branches:
- main
- trying
- staging
tags: '*'
pull_request:

jobs:
docbuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: 1.7.0
- name: Install dependencies
run: julia --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
3 changes: 3 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
14 changes: 14 additions & 0 deletions docs/bibliography.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# The citation keys have been formatted as:
# Last author name (titlecase), followed by
# (no characters in-between) the year.
@article{KiD2012,
author={Shipway, B. J. and Hill, A. A.},
title={Diagnosis of systematic differences between multiple parametrizations of warm rain microphysics using a kinematic framework},
journal={Quarterly Journal of the Royal Meteorological Society},
volume={138},
number={669},
pages={2196-2211},
year={2012},
doi={10.1002/qj.1913}
}
33 changes: 33 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# https://github.com/jheinen/GR.jl/issues/278#issuecomment-587090846
ENV["GKSwstype"] = "nul"

using Documenter
using DocumenterCitations

bib = CitationBibliography(joinpath(@__DIR__, "bibliography.bib"))

pages = Any["Home" => "index.md", "References" => "References.md"]

mathengine = MathJax(Dict(:TeX => Dict(:equationNumbers => Dict(:autoNumber => "AMS"), :Macros => Dict())))

format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true", mathengine = mathengine, collapselevel = 1)

makedocs(
bib,
sitename = "Kinematic1D.jl",
strict = true,
format = format,
checkdocs = :exports,
clean = true,
doctest = true,
#modules = [Kinematic1D],
pages = pages,
)

deploydocs(
repo = "github.com/CliMA/Kinematic1D.jl.git",
target = "build",
push_preview = true,
devbranch = "main",
forcepush = true,
)
4 changes: 4 additions & 0 deletions docs/src/References.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# References

```@bibliography
```
22 changes: 22 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Kinematic1D.jl

The Kinematic1D.jl is a single column, prescribed flow driver for testing microphysics schemes.
The package is based on [KiD2012](@cite).

## Simulation setup

TODO

## Changes to CliMA defaults

Some CliMA constants were changed from their default values.


| symbol | definition | units | default value | new value |
|----------|-----------------------------------------|---------------|----------------|------------|
|``MSLP`` | Mean sea level pressure | ``Pa`` | ``101325 `` | ``10^{5}`` |


## Comparison with PySDM

TODO

0 comments on commit 58caf0a

Please sign in to comment.