-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
143 changed files
with
29,427 additions
and
2,137 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 |
---|---|---|
@@ -1,5 +1 @@ | ||
* text=auto | ||
|
||
**/Project.toml eol=lf | ||
**/Manifest.toml eol=lf | ||
**/*.json eol=lf | ||
* text=auto eol=lf |
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,36 +1 @@ | ||
Fixes # | ||
|
||
# Description | ||
|
||
|
||
|
||
|
||
--- | ||
text below is for instruction and can be removed | ||
|
||
# New node types | ||
Typically new node types require an update of: | ||
|
||
- `core/src/create.jl` | ||
- `core/src/validation.jl` | ||
- `core/src/solve.jl` | ||
|
||
Updating other julia files may be required. | ||
|
||
|
||
## ribasim_python | ||
- `new_node_type.py` with associated implementation in `python/ribasim/ribasim`. | ||
- add/update nodetype to `python/ribasim/ribasim/model.py` | ||
- add/update nodetype to `python/ribasim/tests/conftest.py` | ||
- add/update nodetype to `python/ribasim_api/tests/conftest.py` | ||
|
||
## documentation | ||
|
||
- update `docs/core/equations.qmd` | ||
- update `docs/core/usage.qmd` | ||
- update `docs/python/examples.ipynb` # or start a new example model | ||
- update `docs/schema*.json` by running `julia --project=docs docs/gen_schema.jl` and `datamodel-codegen --use-title-as-name --input docs/schema/root.schema.json --output python/ribasim/ribasim/models.py` | ||
- update the instructions in `docs/contribute/*.qmd` if something changes there, e.g. something changes in how a new node type must be defined. | ||
|
||
## QGIS | ||
- update `qgis/core/nodes.py` |
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 |
---|---|---|
|
@@ -13,9 +13,6 @@ jobs: | |
test: | ||
name: Julia ${{ matrix.julia_version }} - ${{ matrix.os }} - ${{ matrix.arch }} | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -28,19 +25,16 @@ jobs: | |
arch: | ||
- x64 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
- uses: actions/checkout@v4 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
cache-downloads: true | ||
cache-environment: true | ||
environment-file: ./environment.yml | ||
- name: Install ribasim | ||
run: pip install --editable python/ribasim | ||
- name: Install ribasim_testmodels | ||
run: pip install --editable python/ribasim_testmodels | ||
pixi-version: "v0.3.0" | ||
cache: true | ||
- name: Prepare pixi | ||
run: pixi run post-install-without-pre-commit | ||
- name: Prepare model input | ||
run: python python/ribasim/tests/conftest.py | ||
run: | | ||
pixi run generate-testmodels | ||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: ${{ matrix.julia_version }} | ||
|
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 |
---|---|---|
|
@@ -14,17 +14,14 @@ jobs: | |
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
strategy: | ||
matrix: | ||
julia_version: | ||
- "1.9" | ||
arch: | ||
- x64 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: julia-actions/setup-julia@v1 | ||
with: | ||
|
@@ -40,38 +37,24 @@ jobs: | |
cache-compiled: "true" | ||
cache-registries: "true" | ||
|
||
- name: Setup Micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
cache-downloads: true | ||
cache-environment: true | ||
environment-file: ./environment.yml | ||
|
||
- name: Install ribasim-python | ||
run: pip install --editable python/ribasim | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
pixi-version: "v0.3.0" | ||
cache: true | ||
- name: Prepare pixi | ||
run: pixi run post-install-without-pre-commit | ||
|
||
- name: Check Quarto installation and all engines | ||
run: quarto check all | ||
|
||
- name: Generate API pages | ||
working-directory: docs | ||
# objects.json: https://github.com/machow/quartodoc/issues/63 | ||
run: | | ||
quartodoc build | ||
rm objects.json | ||
run: pixi run quarto-check | ||
|
||
- name: Generate Julia docs | ||
working-directory: docs | ||
run: | | ||
julia --project -e "using Pkg; Pkg.instantiate()" | ||
julia --project make.jl | ||
run: pixi run build-julia-docs | ||
|
||
- name: Render Quarto Project | ||
run: "quarto render docs --to html --execute" | ||
run: pixi run quarto-render | ||
|
||
- name: Set up Quarto for publish | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
- name: Publish Quarto Project | ||
if: github.ref == 'refs/heads/main' | ||
uses: quarto-dev/quarto-actions/publish@v2 | ||
|
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 |
---|---|---|
|
@@ -14,28 +14,20 @@ jobs: | |
name: Mypy | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
- uses: actions/checkout@v4 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
cache-downloads: true | ||
cache-environment: true | ||
environment-file: ./environment.yml | ||
- name: Install python packages | ||
run: | | ||
pip install python/ribasim | ||
pip install python/ribasim_testmodels | ||
pip install python/ribasim_api | ||
pixi-version: "latest" | ||
cache: true | ||
- name: Prepare pixi | ||
run: pixi run post-install-without-pre-commit | ||
- name: Run mypy on python/ribasim | ||
run: | | ||
mypy --ignore-missing-imports python/ribasim/ribasim | ||
pixi run mypy-ribasim-python | ||
- name: Run mypy on python/ribasim_testmodels | ||
run: | | ||
mypy --ignore-missing-imports python/ribasim_testmodels/ribasim_testmodels | ||
pixi run mypy-ribasim-testmodels | ||
- name: Run mypy on python/ribasim_api | ||
run: | | ||
mypy --ignore-missing-imports python/ribasim_api/ribasim_api | ||
pixi run mypy-ribasim-api |
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 |
---|---|---|
|
@@ -13,9 +13,6 @@ jobs: | |
test: | ||
name: Python ${{ matrix.python_version }} - ${{ matrix.os }} - ${{ matrix.arch }} | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -30,25 +27,17 @@ jobs: | |
arch: | ||
- x86 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
cache-downloads: true | ||
cache-environment: true | ||
environment-file: ./environment.yml | ||
create-args: >- | ||
python=${{ matrix.python_version }} | ||
- name: Install ribasim | ||
run: pip install --editable python/ribasim | ||
|
||
- name: Install ribasim_testmodels | ||
run: pip install --editable python/ribasim_testmodels | ||
pixi-version: "v0.3.0" | ||
cache: true | ||
- name: Prepare pixi | ||
run: pixi run post-install-without-pre-commit | ||
|
||
- name: Run tests | ||
run: pytest --cov=ribasim --cov-report=xml python/ribasim/tests | ||
run: pixi run test-ribasim-python-cov | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 |
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
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.