-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronize with clima, add docs and formatter
- Loading branch information
1 parent
15f33ba
commit 4f7255e
Showing
27 changed files
with
1,227 additions
and
653 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[deps] | ||
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" | ||
|
||
[compat] | ||
JuliaFormatter = "0.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
clima_formatter_options = ( | ||
indent = 4, | ||
margin = 80, | ||
always_for_in = true, | ||
whitespace_typedefs = true, | ||
whitespace_ops_in_indices = true, | ||
remove_extra_newlines = false, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env julia | ||
|
||
using Pkg | ||
Pkg.activate(@__DIR__) | ||
Pkg.instantiate() | ||
|
||
using JuliaFormatter | ||
|
||
include("clima_formatter_options.jl") | ||
|
||
headbranch = get(ARGS, 1, "master") | ||
|
||
for filename in | ||
readlines(`git diff --name-only --diff-filter=AM $headbranch...`) | ||
endswith(filename, ".jl") || continue | ||
|
||
format(filename; clima_formatter_options...) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- trying | ||
- staging | ||
tags: '*' | ||
pull_request: | ||
|
||
jobs: | ||
docs-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: julia-actions/setup-julia@latest | ||
with: | ||
version: 1.3 | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
# Temporary | ||
*.jl.cov | ||
*.DS_Store | ||
*.tar.gz | ||
*.jl.*.cov | ||
*.jl.mem | ||
|
||
# Data | ||
*.vtk | ||
*.dat | ||
*.csv | ||
*.vtu | ||
*.pvtu | ||
*.swp | ||
*.png | ||
*.nc | ||
|
||
# Docs | ||
!docs/src/assets/*.png | ||
*.DS_Store | ||
docs/build/ | ||
data/ | ||
docs/site/ | ||
*.jl.*.cov | ||
*.jl.mem | ||
deps/deps.jl | ||
|
||
# Deps | ||
Manifest.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
rm(joinpath(@__DIR__, "Manifest.toml"), force = true) # Remove local Manifest | ||
|
||
push!(LOAD_PATH, joinpath(@__DIR__, "..", "env", "Plots")) # add Plots env | ||
push!(LOAD_PATH, joinpath(@__DIR__, "..")) # add MoistThermodynamics env | ||
|
||
using Pkg | ||
Pkg.activate(@__DIR__) | ||
Pkg.instantiate(; verbose = true) | ||
|
||
using MoistThermodynamics, Documenter | ||
|
||
pages = Any[ | ||
"Home" => "index.md", | ||
"Installation" => "Installation.md", | ||
"API" => "API.md", | ||
"How-to-guide" => "HowToGuide.md", | ||
"Tested profiles" => "TestedProfiles.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( | ||
sitename = "MoistThermodynamics.jl", | ||
format = format, | ||
clean = true, | ||
modules = [Documenter, MoistThermodynamics], | ||
pages = pages, | ||
) | ||
|
||
deploydocs( | ||
repo = "github.com/climate-machine/MoistThermodynamics.jl.git", | ||
target = "build", | ||
push_preview = true, | ||
) |
Oops, something went wrong.