diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..43cd26b61a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: ci +on: + push: + branches: + - main + - trying + - staging + tags: '*' + pull_request: + +jobs: + test: + name: ci ${{ matrix.version }} - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1.4' + - '1.5' + - '1.6.0' + os: + - ubuntu-latest + - macOS-latest + - windows-latest + arch: + - x64 + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: actions/cache@v1 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..242e52d61e --- /dev/null +++ b/.github/workflows/docs.yml @@ -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.6.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 \ No newline at end of file diff --git a/Project.toml b/Project.toml index c85636a7c6..c544f42cb7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "TurbulenceConvection" uuid = "8e072fc4-01f8-44fb-b9dc-f9336c367e6b" -authors = ["Charles Kawczynski "] +authors = ["Climate Modeling Alliance"] version = "0.1.0" [deps] diff --git a/README.md b/README.md index 851244251b..37dc92a3d5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,25 @@ # TurbulenceConvection.jl # +||| +|---------------------:|:----------------------------------------------| +| **Docs Build** | [![docs build][docs-bld-img]][docs-bld-url] | +| **Documentation** | [![dev][docs-dev-img]][docs-dev-url] | +| **GHA CI** | [![gha ci][gha-ci-img]][gha-ci-url] | +| **Bors enabled** | [![bors][bors-img]][bors-url] | + +[docs-bld-img]: https://github.com/CliMA/TurbulenceConvection.jl/actions/workflows/docs.yml/badge.svg +[docs-bld-url]: https://github.com/CliMA/TurbulenceConvection.jl/actions/workflows/docs.yml + +[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg +[docs-dev-url]: https://CliMA.github.io/TurbulenceConvection.jl/dev/ + +[gha-ci-img]: https://github.com/CliMA/TurbulenceConvection.jl/actions/workflows/ci.yml/badge.svg +[gha-ci-url]: https://github.com/CliMA/TurbulenceConvection.jl/actions/workflows/ci.yml + +[bors-img]: https://bors.tech/images/badge_small.svg +[bors-url]: https://app.bors.tech/repositories/35146 + + TurbulenceConvection (Single Column Atmospheric Model in Julia) provides a framework for testing parameterizations of clouds and turbulence. It is particularly designed to support eddy-diffusivity mass-flux modeling frameworks. diff --git a/bors.toml b/bors.toml index 5ceeaee7a2..4cd2b02aaa 100644 --- a/bors.toml +++ b/bors.toml @@ -1,5 +1,15 @@ status = [ + "ci 1.4 - ubuntu-latest", + "ci 1.4 - windows-latest", + "ci 1.4 - macOS-latest", + "ci 1.5 - ubuntu-latest", + "ci 1.5 - windows-latest", + "ci 1.5 - macOS-latest", + "ci 1.6.0 - ubuntu-latest", + "ci 1.6.0 - windows-latest", + "ci 1.6.0 - macOS-latest", "buildkite/turbulenceconvection-ci", + "docbuild", "format", ] delete_merged_branches = true diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000000..1d78af27a1 --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,5 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" +Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +TurbulenceConvection = "8e072fc4-01f8-44fb-b9dc-f9336c367e6b" diff --git a/docs/bibliography.bib b/docs/bibliography.bib new file mode 100644 index 0000000000..06e152dff2 --- /dev/null +++ b/docs/bibliography.bib @@ -0,0 +1,16 @@ +# The citation keys have been formatted as: +# Last author name (titlecase), followed by +# (no characters in-between) the year. + +@article{Nishizawa2018, + title = {A Surface Flux Scheme Based on the Monin-Obukhov Similarity for Finite Volume Models}, + author = {Nishizawa, S and Kitamura, Y}, + journal = {Journal of Advances in Modeling Earth Systems}, + volume = {10}, + number = {12}, + doi = {10.1029/2018MS001534}, + pages = {3159--3175}, + year = {2018}, + publisher = {Wiley Online Library} +} + diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000000..9cc87ac7d0 --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,43 @@ +using TurbulenceConvection, Documenter +using DocumenterCitations + +bib = CitationBibliography(joinpath(@__DIR__, "bibliography.bib")) + +#! format: off +pages = Any[ + "Home" => "index.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, +) +#! format: on + +makedocs( + bib, + sitename = "TurbulenceConvection.jl", + strict = true, + format = format, + checkdocs = :exports, + clean = true, + doctest = true, + modules = [TurbulenceConvection], + pages = pages, +) + +deploydocs( + repo = "github.com/CliMA/TurbulenceConvection.jl.git", + target = "build", + push_preview = true, + devbranch = "main", + forcepush = true, +) diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000000..fe708585c3 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,2 @@ +# TurbulenceConvection.jl +