Contributing

Ribasim welcomes contributions.

There is developer documentation for the Julia core, the Basic Model Interface (BMI), Python tooling, and the QGIS plugin. A guide on how to add a new node type to both is written in adding node types. Release process describes the steps to follow when creating a new Ribasim release.

1 Setting up the developer environment

1.1 Clone Ribasim

In order to have the Ribasim repository locally available, you can clone it with Git. Git can be installed from git-scm.com. Once installed, run the following command at a directory of your choice:

In order to have the Ribasim repository locally available, run the following command at a directory of your choice:

git clone https://github.com/Deltares/Ribasim.git

To continue with the following steps, make the root of the repository your working directory by running

cd Ribasim

1.2 Setting up Pixi

First, set up Pixi as described on their getting started page.

We require at least Pixi version v0.48.1, but generally recommend the latest release. Check the version with pixi --version, update with pixi self-update.

Windows users should enable Developer Mode, because the install task creates symlinks for the QGIS plugin.

Then set up the environment by running the following command. It will take a while. You can interrupt the task if you don’t want to precompile the Julia dependencies at this moment, because that is the last task. Check out the pixi.toml file to see the tasks that are part of this, you can also run them individually.

pixi run install

The install task automatically installs all required Python and Julia packages for development. Our Pixi environment also provides Juliaup, QGIS and the Rust compiler. These will not conflict with any pre-installed applications, as long as you have the pixi environment enabled. You can do this in a terminal by calling pixi shell, or starting programs with pixi run julia, or pixi run qgis. The first time you open the Ribasim repo in Visual Studio Code you need to tell it where it can find the Pixi environment. Open the command box with Ctrl+Shift+P (Cmd+Shift+P on macOS) and run Python: Select Interpreter. Select ('default': Pixi) in the /.pixi folder. Unless the setting python.terminal.activateEnvironment is disabled, it will already activate the environment in your terminal.

If you encounter issues related to Pixi dependencies, it might help to clean your Pixi environment with pixi clean, followed by pixi run install.