Skip to content

Commit

Permalink
Merge branch 'main' into allocation_input
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed Oct 30, 2023
2 parents 9124bf5 + afe1bcc commit e0a3495
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 25 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ libraries, notably [ModelingToolkit.jl](https://mtk.sciml.ai/stable/).
For most users the [latest release](https://github.com/Deltares/Ribasim/releases/latest) is recommended, it can be downloaded here:

- Ribasim executable: [ribasim_cli.zip](https://github.com/Deltares/Ribasim/releases/latest/download/ribasim_cli.zip).
- Python package: [ribasim-0.4.0-py3-none-any.whl](https://github.com/Deltares/Ribasim/releases/latest/download/ribasim-0.4.0-py3-none-any.whl)
- Python package: [ribasim-0.5.0-py3-none-any.whl](https://github.com/Deltares/Ribasim/releases/latest/download/ribasim-0.5.0-py3-none-any.whl)
- QGIS plugin: [ribasim_qgis.zip](https://github.com/Deltares/Ribasim/releases/latest/download/ribasim_qgis.zip).
- Generated testmodels: [generated_testmodels.zip](https://github.com/Deltares/Ribasim/releases/latest/download/generated_testmodels.zip)

The nightly builds contain the latest developments and can be found below. It is important to either use the release or nightly for all components.

- Ribasim executable: [ribasim_cli.zip](https://ribasim.s3.eu-west-3.amazonaws.com/teamcity/Ribasim_Ribasim/BuildRibasimCliWindows/latest/ribasim_cli.zip).
- Python package: [ribasim-0.4.0-py3-none-any.whl](https://ribasim.s3.eu-west-3.amazonaws.com/teamcity/Ribasim_Ribasim/BuildRibasimCliWindows/latest/ribasim-0.4.0-py3-none-any.whl)
- Python package: [ribasim-0.5.0-py3-none-any.whl](https://ribasim.s3.eu-west-3.amazonaws.com/teamcity/Ribasim_Ribasim/BuildRibasimCliWindows/latest/ribasim-0.5.0-py3-none-any.whl)
- QGIS plugin: [ribasim_qgis.zip](https://ribasim.s3.eu-west-3.amazonaws.com/teamcity/Ribasim_Ribasim/BuildRibasimCliWindows/latest/ribasim_qgis.zip).

Currently only Windows builds for `ribasim_cli.zip` are available.
Expand Down
2 changes: 1 addition & 1 deletion core/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Ribasim"
uuid = "aac5e3d9-0b8f-4d4f-8241-b1a7a9632635"
authors = ["Deltares and contributors <[email protected]>"]
version = "0.3.0"
version = "0.4.0"

[deps]
Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45"
Expand Down
10 changes: 8 additions & 2 deletions docs/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,17 @@ quartodoc:
contents:
- Basin
- FractionalFlow
- TabulatedRatingCurve
- Pump
- Outlet
- User
- LevelBoundary
- FlowBoundary
- LinearResistance
- ManningResistance
- Pump
- TabulatedRatingCurve
- Terminal
- DiscreteControl
- PidControl
- title: Utility functions
desc: Collection of utility functions.
contents:
Expand Down
20 changes: 9 additions & 11 deletions docs/contribute/addnode.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -239,26 +239,24 @@ There are several parts of the documentation which should be updated with the ne
- `docs/core/equations` should contain a short explanation and if possible an analytical expression for the behaviour of the new node;
- `docs/core/usage.qmd` should contain a short explanation of the node and the possible schemas associated with it;
- The example models constructed in `docs/python/examples.ipynb` should be extended with the new node type or a new example model with the new node type should be made.
- In `_quarto.yml` add `NewNodeType` to the "Node types" contents for the Python API reference.


# Finishing up

When a new node type is created, one needs to run

```
julia --project=docs docs/gen_schema.jl
pixi run codegen
```
to create new JSON Schemas in the docs folder.

:::{.callout-note}
If you haven't done so before, you first need to instantiate your docs environment.
Run `julia --project=docs`, followed by running `instantiate` in the Pkg mode (press `]`).
:::
This will derive all JSON Schemas from the julia code, and write them to the docs folder.
From these JSON Schemas the Python modules `models.py` and `config.py` are generated.

To generate the Python module `models.py` and `config.py` from the JSON Schemas, run:
Since adding a node type touches both the Python and Julia code,
it is a good idea to run both the [Python test suite](python.qmd#test) and [Julia test suite](core.qmd#test) locally before creating a pull request.
You can run all tests with:

```
pixi run codegen
pixi run tests
```

Since adding a node type touches both the Python and Julia code,
it is a good idea to run both the [Python test suite](python.qmd#test) and [Julia test suite](core.qmd#test) locally before creating a pull request.
2 changes: 1 addition & 1 deletion docs/contribute/release.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ If this succeeds, the release assets are uploaded to an S3 link with the version

```
https://ribasim.s3.eu-west-3.amazonaws.com/teamcity/Ribasim_Ribasim/BuildRibasimCliWindows/v2023.07.0/ribasim_cli.zip
https://ribasim.s3.eu-west-3.amazonaws.com/teamcity/Ribasim_Ribasim/BuildRibasimCliWindows/v2023.07.0/ribasim-0.4.0-py3-none-any.whl
https://ribasim.s3.eu-west-3.amazonaws.com/teamcity/Ribasim_Ribasim/BuildRibasimCliWindows/v2023.07.0/ribasim-0.5.0-py3-none-any.whl
https://ribasim.s3.eu-west-3.amazonaws.com/teamcity/Ribasim_Ribasim/BuildRibasimCliWindows/v2023.07.0/ribasim_qgis.zip
```

Expand Down
4 changes: 2 additions & 2 deletions docs/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ libraries, notably [DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/s
For most users the [latest release](https://github.com/Deltares/Ribasim/releases/latest) is recommended, it can be downloaded here:

- Ribasim executable: [ribasim_cli.zip](https://github.com/Deltares/Ribasim/releases/latest/download/ribasim_cli.zip).
- Python package: [ribasim-0.4.0-py3-none-any.whl](https://github.com/Deltares/Ribasim/releases/latest/download/ribasim-0.4.0-py3-none-any.whl)
- Python package: [ribasim-0.5.0-py3-none-any.whl](https://github.com/Deltares/Ribasim/releases/latest/download/ribasim-0.5.0-py3-none-any.whl)
- QGIS plugin: [ribasim_qgis.zip](https://github.com/Deltares/Ribasim/releases/latest/download/ribasim_qgis.zip).
- Generated testmodels: [generated_testmodels.zip](https://github.com/Deltares/Ribasim/releases/latest/download/generated_testmodels.zip)

The nightly builds contain the latest developments and can be found below. It is important to either use the release or nightly for all components.

- Ribasim executable: [ribasim_cli.zip](https://ribasim.s3.eu-west-3.amazonaws.com/teamcity/Ribasim_Ribasim/BuildRibasimCliWindows/latest/ribasim_cli.zip).
- Python package: [ribasim-0.4.0-py3-none-any.whl](https://ribasim.s3.eu-west-3.amazonaws.com/teamcity/Ribasim_Ribasim/BuildRibasimCliWindows/latest/ribasim-0.4.0-py3-none-any.whl)
- Python package: [ribasim-0.5.0-py3-none-any.whl](https://ribasim.s3.eu-west-3.amazonaws.com/teamcity/Ribasim_Ribasim/BuildRibasimCliWindows/latest/ribasim-0.5.0-py3-none-any.whl)
- QGIS plugin: [ribasim_qgis.zip](https://ribasim.s3.eu-west-3.amazonaws.com/teamcity/Ribasim_Ribasim/BuildRibasimCliWindows/latest/ribasim_qgis.zip).

Currently only Windows builds for `ribasim_cli.zip` are available.
Expand Down
6 changes: 4 additions & 2 deletions pixi.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "Ribasim"
version = "0.2.0"
version = "0.3.0"
description = "Water resources modeling"
authors = ["Deltares and contributors <[email protected]>"]
channels = ["conda-forge"]
Expand Down Expand Up @@ -72,7 +72,9 @@ test-ribasim-core = { cmd = "julia --project=core --eval 'using Pkg; Pkg.instant
generate-testmodels = "python utils/generate-testmodels.py"
tests = { depends_on = ["lint", "test-ribasim-python", "test-ribasim-core"] }
# Codegen
generate-schema = "julia --project=docs docs/gen_schema.jl"
generate-schema = { cmd = "julia --project=docs docs/gen_schema.jl", depends_on = [
"instantiate-julia-docs",
] }
generate-python = """\
datamodel-codegen --use-title-as-name --use-double-quotes --disable-timestamp --use-default --strict-nullable --input-file-type=jsonschema --input docs/schema/root.schema.json --output python/ribasim/ribasim/models.py && \
datamodel-codegen --use-title-as-name --use-double-quotes --disable-timestamp --use-default --strict-nullable --input-file-type=jsonschema --input docs/schema/Config.schema.json --output python/ribasim/ribasim/config.py"""
Expand Down
2 changes: 1 addition & 1 deletion python/ribasim/ribasim/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.4.0"
__version__ = "0.5.0"


from ribasim import models, utils
Expand Down
2 changes: 1 addition & 1 deletion python/ribasim_api/ribasim_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.2.0"
__version__ = "0.3.0"

from ribasim_api.ribasim_api import RibasimApi

Expand Down
2 changes: 1 addition & 1 deletion python/ribasim_testmodels/ribasim_testmodels/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.2.0"
__version__ = "0.3.0"

from typing import Callable, Dict

Expand Down
2 changes: 1 addition & 1 deletion qgis/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
name=Ribasim-QGIS
qgisMinimumVersion=3.0
description=QGIS plugin to setup Ribasim models
version=0.2
version=0.3
author=Deltares and contributors
[email protected]

Expand Down

0 comments on commit e0a3495

Please sign in to comment.