-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed merge conflict with diabetes examples
- Loading branch information
Showing
15 changed files
with
404 additions
and
4,707 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
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,50 @@ | ||
name: Check notebook examples for regressions | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
JULIA_NUM_THREADS: 'auto' | ||
jobs: | ||
notebooks-examples-regression-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Julia | ||
uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: 1.9 | ||
- name: Cache Julia dependencies | ||
uses: julia-actions/cache@v1 | ||
- name: Add IJulia Jupyter kernel | ||
run: julia --color=yes --project=. -e 'ENV["JULIA_PKG_PRECOMPILE_AUTO"]=0; using Pkg; pkg"add IJulia"' | ||
- name: Install Julia dependencies | ||
run: julia --color=yes --project=. -e 'import Pkg; Pkg.instantiate(); Pkg.resolve(); Pkg.precompile()' | ||
- uses: yaananth/run-notebook@v2 | ||
env: | ||
RUNNER: ${{ toJson(runner) }} | ||
SECRETS: ${{ toJson(secrets) }} | ||
GITHUB: ${{ toJson(github) }} | ||
with: | ||
notebook: "examples/full_fledged_schema_examples_new/stratification/diabetes_diagnose.ipynb" | ||
- uses: yaananth/run-notebook@v2 | ||
env: | ||
RUNNER: ${{ toJson(runner) }} | ||
SECRETS: ${{ toJson(secrets) }} | ||
GITHUB: ${{ toJson(github) }} | ||
with: | ||
notebook: "examples/full_fledged_schema_examples_new/composition/diabetes_model.ipynb" | ||
- uses: yaananth/run-notebook@v2 | ||
env: | ||
RUNNER: ${{ toJson(runner) }} | ||
SECRETS: ${{ toJson(secrets) }} | ||
GITHUB: ${{ toJson(github) }} | ||
with: | ||
notebook: "examples/full_fledged_schema_examples_new/CausalLoopDiagrams/convert_from_SEIR_stockFlowDiagram.ipynb" | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: output | ||
path: ${{ RUNNER.temp }}/nb-runner | ||
env: | ||
RUNNER: ${{ toJson(runner) }} |
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 @@ | ||
build/ | ||
src/generated/ |
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,59 @@ | ||
using Documenter | ||
using Literate | ||
|
||
const literate_dir = joinpath(@__DIR__, "literate") | ||
const generated_dir = joinpath(@__DIR__, "src", "generated") | ||
|
||
@info "Loading StockFlow.jl" | ||
using StockFlow | ||
|
||
const no_literate = "--no-literate" in ARGS | ||
if !no_literate | ||
@info "Building Literate.jl docs" | ||
|
||
# XXX: Work around old LaTeX distribution in GitHub CI. | ||
if haskey(ENV, "GITHUB_ACTIONS") | ||
import TikzPictures | ||
TikzPictures.standaloneWorkaround(true) | ||
end | ||
|
||
# Set Literate.jl config if not being compiled on recognized service. | ||
config = Dict{String,String}() | ||
if !(haskey(ENV, "GITHUB_ACTIONS") || haskey(ENV, "GITLAB_CI")) | ||
config["nbviewer_root_url"] = "https://nbviewer.jupyter.org/github/AlgebraicJulia/StockFlow.jl/blob/gh-pages/dev" | ||
config["repo_root_url"] = "https://github.com/AlgebraicJulia/StockFlow.jl/blob/main/docs" | ||
end | ||
|
||
for (root, dirs, files) in walkdir(literate_dir) | ||
out_dir = joinpath(generated_dir, relpath(root, literate_dir)) | ||
for file in files | ||
if last(splitext(file)) == ".jl" | ||
Literate.markdown(joinpath(root, file), out_dir; | ||
config=config, documenter=true, credit=false) | ||
Literate.notebook(joinpath(root, file), out_dir; | ||
execute=true, documenter=true, credit=false) | ||
end | ||
end | ||
end | ||
end | ||
|
||
@info "Building Documenter.jl docs" | ||
makedocs( | ||
modules = [StockFlow], | ||
format = Documenter.HTML( | ||
assets = ["assets/analytics.js"], | ||
), | ||
sitename = "StockFlow.jl", | ||
doctest = false, | ||
checkdocs = :none, | ||
pages = Any[ | ||
"StockFlow.jl" => "index.md", | ||
] | ||
) | ||
|
||
@info "Deploying docs" | ||
deploydocs( | ||
target = "build", | ||
repo = "github.com/AlgebraicJulia/StockFlow.jl.git", | ||
branch = "gh-pages" | ||
) |
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,10 @@ | ||
# [StockFlow](@id StockFlow) | ||
|
||
```@autodocs | ||
Modules = [ | ||
StockFlow, | ||
StockFlow.Syntax, | ||
StockFlow.PremadeModels | ||
] | ||
Private = false | ||
``` |
755 changes: 7 additions & 748 deletions
755
...l_fledged_schema_examples_new/CausalLoopDiagrams/convert_from_SEIR_stockFlowDiagram.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
3,016 changes: 5 additions & 3,011 deletions
3,016
examples/full_fledged_schema_examples_new/composition/diabetes_model.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
814 changes: 4 additions & 810 deletions
814
examples/full_fledged_schema_examples_new/stratification/diabetes_diagnose.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.