Skip to content

Commit

Permalink
Merge #15
Browse files Browse the repository at this point in the history
15: Synchronize with CLIMA, add docs and formatter r=charleskawczynski a=charleskawczynski



Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
  • Loading branch information
bors[bot] and charleskawczynski authored May 4, 2020
2 parents 15f33ba + 8c4d1f0 commit 1d96eda
Show file tree
Hide file tree
Showing 27 changed files with 1,224 additions and 794 deletions.
5 changes: 5 additions & 0 deletions .dev/Project.toml
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"
8 changes: 8 additions & 0 deletions .dev/clima_formatter_options.jl
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,
)
18 changes: 18 additions & 0 deletions .dev/format.jl
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
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:
- 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
18 changes: 13 additions & 5 deletions .gitignore
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
216 changes: 0 additions & 216 deletions Manifest.toml

This file was deleted.

6 changes: 0 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,9 @@ version = "0.1.0"
[deps]
CLIMAParameters = "6eacf6c3-8458-43b9-ae03-caf5306d3d53"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RootSolvers = "7181ea78-2dcb-4de3-ab41-2b8ab5a31e74"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
CLIMAParameters = "0.1.0"
DocStringExtensions = "0.8.1"
NCDatasets = "0.10.1"
RootSolvers = "0.1.0"
julia = "1.3"
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ A package containing a library of moist thermodynamic relations

|||
|---------------------:|:----------------------------------------------|
| **Documentation** | [![latest][docs-latest-img]][docs-latest-url] |
| **Docs Build** | [![docs build][docs-bld-img]][docs-bld-url] |
| **Documentation** | [![dev][docs-dev-img]][docs-dev-url] |
| **Azure Build** | [![azure][azure-img]][azure-url] |
| **Code Coverage** | [![codecov][codecov-img]][codecov-url] |
| **Bors** | [![Bors enabled][bors-img]][bors-url] |

[docs-latest-img]: https://img.shields.io/badge/docs-latest-blue.svg
[docs-latest-url]: https://climate-machine.github.io/MoistThermodynamics.jl/latest/
[docs-bld-img]: https://github.com/climate-machine/MoistThermodynamics.jl/workflows/Documentation/badge.svg
[docs-bld-url]: https://github.com/climate-machine/MoistThermodynamics.jl/actions?query=workflow%3ADocumentation

[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg
[docs-dev-url]: https://climate-machine.github.io/MoistThermodynamics.jl/dev/

[azure-img]: https://dev.azure.com/climate-machine/MoistThermodynamics.jl/_apis/build/status/climate-machine.MoistThermodynamics.jl?branchName=master
[azure-url]: https://dev.azure.com/climate-machine/MoistThermodynamics.jl/_build/latest?definitionId=1&branchName=master
Expand Down
40 changes: 0 additions & 40 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,43 +111,3 @@ jobs:
C:\julia-$(JULIA_VERSION)\bin\julia.exe --project=@. -e 'using Pkg; Pkg.instantiate()'
C:\julia-$(JULIA_VERSION)\bin\julia.exe --project=@. -e 'using Pkg; Pkg.test()'
displayName: 'Run the tests'
# - job: Documentation

# pool:
# vmImage: 'ubuntu-16.04'

# strategy:
# matrix:
# Julia 1.3:
# JULIA_VERSION: '1.3'

# steps:
# - bash: |
# set -o xtrace
# wget -nv https://julialang-s3.julialang.org/bin/linux/x64/$(JULIA_VERSION)/julia-$(JULIA_VERSION)-latest-linux-x86_64.tar.gz
# mkdir julia-$(JULIA_VERSION)
# tar zxf julia-$(JULIA_VERSION)-latest-linux-x86_64.tar.gz -C julia-$(JULIA_VERSION) --strip-components 1
# displayName: 'Download and extract Julia'
# - bash: |
# set -o xtrace
# sudo apt-get update
# displayName: 'Install dependencies'
# - bash: |
# set -o xtrace
# export TRAVIS_REPO_SLUG="$BUILD_REPOSITORY_NAME"
# export TRAVIS_PULL_REQUEST="${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-false}"
# if [[ $BUILD_SOURCEBRANCH == refs/tags/* ]]; then
# export TRAVIS_TAG="${BUILD_SOURCEBRANCH:10}"
# fi
# if [[ $BUILD_SOURCEBRANCH == refs/heads/* ]]; then
# export TRAVIS_BRANCH="${BUILD_SOURCEBRANCH:11}"
# fi
# ./julia-$(JULIA_VERSION)/bin/julia -e 'using InteractiveUtils; versioninfo()'
# ./julia-$(JULIA_VERSION)/bin/julia --project=docs/ -e 'using Pkg; Pkg.instantiate();
# Pkg.develop(PackageSpec(path=pwd()));
# Pkg.build()'
# ./julia-$(JULIA_VERSION)/bin/julia --project=docs/ docs/make.jl
# env:
# DOCUMENTER_KEY: $(documenter_key)
# displayName: 'Build and deploy docs'
3 changes: 2 additions & 1 deletion bors.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
status = [
"climate-machine.MoistThermodynamics.jl"
"climate-machine.MoistThermodynamics.jl",
"docs-build"
]
delete_merged_branches = true
timeout_sec = 86400
Expand Down
Loading

0 comments on commit 1d96eda

Please sign in to comment.