diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 0506b40b0..a3e177cb8 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -8,6 +8,7 @@ "quarto.quarto", "tamasfe.even-better-toml", "samuelcolvin.jinjahtml", - "yy0931.vscode-sqlite3-editor" + "yy0931.vscode-sqlite3-editor", + "streetsidesoftware.code-spell-checker" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index f8c8eb036..b634ff85e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -24,5 +24,57 @@ ".pixi" ], "julia.lint.run": true, - "files.insertFinalNewline": true + "files.insertFinalNewline": true, + "cSpell.enabledLanguageIds": [ + "asciidoc", + "c", + "cpp", + "csharp", + "css", + "elixir", + "erlang", + "git-commit", + "go", + "graphql", + "handlebars", + "haskell", + "html", + "jade", + "java", + "javascript", + "javascriptreact", + "json", + "jsonc", + "jupyter", + "latex", + "less", + "markdown", + "php", + "plaintext", + "python", + "pug", + "restructuredtext", + "rust", + "scala", + "scss", + "scminput", + "swift", + "text", + "typescript", + "typescriptreact", + "vue", + "yaml", + "yml", + "quarto", + "julia" + ], + "cSpell.words": [ + "gpkg", + "ipynb", + "pixi", + "pkgdown", + "qgis", + "quartodoc", + "Ribasim" + ] } diff --git a/docs/_quarto.yml b/docs/_quarto.yml index 59d6333f5..b12255a8e 100644 --- a/docs/_quarto.yml +++ b/docs/_quarto.yml @@ -10,12 +10,10 @@ website: left: - text: "Overview" file: index.qmd - - text: "Tutorials" - file: tutorial/index.qmd - text: "How-to guides" - file: guide/index.qmd + file: guide/examples.ipynb - text: "Concepts" - file: concept/index.qmd + file: concept/concept.qmd - text: "Reference" file: reference/index.qmd right: @@ -31,16 +29,12 @@ website: - index.qmd - install.qmd - changelog.qmd - - - title: "Tutorials" - contents: - - tutorial/index.qmd - - tutorial/qgis.qmd + - known_issues.qmd - title: "How-to guides" contents: - - guide/index.qmd - guide/examples.ipynb + - guide/qgis.qmd - guide/coupling.qmd - section: "Coupling guides" contents: @@ -48,7 +42,6 @@ website: - title: "Concepts" contents: - - concept/index.qmd - concept/concept.qmd - section: "Numerics" contents: @@ -85,18 +78,21 @@ website: - reference/node/continuous-control.qmd - reference/node/pid-control.qmd - - title: "Dev docs" + - title: "Contributing" contents: - dev/index.qmd - dev/core.qmd - dev/benchmark.qmd - dev/addnode.qmd - dev/python.qmd - - dev/qgis.qmd - dev/allocation.qmd - dev/bmi.qmd - dev/ci.qmd - dev/release.qmd + - section: QGIS + contents: + - dev/qgis.qmd + - dev/qgis_test_plan.qmd format: html: diff --git a/docs/concept/index.qmd b/docs/concept/index.qmd deleted file mode 100644 index 1d8a24132..000000000 --- a/docs/concept/index.qmd +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "Concepts" ---- diff --git a/docs/dev/index.qmd b/docs/dev/index.qmd index d9e4d0a45..56938e676 100644 --- a/docs/dev/index.qmd +++ b/docs/dev/index.qmd @@ -8,7 +8,7 @@ There is developer documentation for the [Julia core](/dev/core.qmd), the [Basic A guide on how to add a new node type to both is written in [adding node types](/dev/addnode.qmd). [Release process](/dev/release.qmd) describes the steps to follow when creating a new Ribasim release. -# Set up the developer environment +# Setting up the developer environment ## Clone Ribasim diff --git a/docs/dev/qgis_test_plan.qmd b/docs/dev/qgis_test_plan.qmd new file mode 100644 index 000000000..407dbdae1 --- /dev/null +++ b/docs/dev/qgis_test_plan.qmd @@ -0,0 +1,227 @@ +--- +title: "QGIS plugin manual test plan" +--- + +This document describes how to perform a full manual test on the Ribasim QGIS plugin. +Known shortcomings and issues can be documented [here](/known_issues.qmd). +Bugs can be reported on [GitHub](https://github.com/Deltares/Ribasim/issues). + +# Clean slate tests +Before starting with data, perform the following tests to see if the plugin doesn't result in any errors. + +## Enable and disable + +- Open QGIS and navigate to "Plugins > Manage and Install Plugins...": _The plugin management window opens_. +- Navigate to "Installed": _Ribasim plugin is in the list (enabled)_. +- Disable the Ribasim plugin: _Ribasim plugin panel hides if it was open, Ribasim button hides from navigation toolbar_. +- Enable the Ribasim plugin: _Ribasim button shows on the navigation toolbar_. + +## Open and close + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the Ribasim button on the QGIS toolbar: _Ribasim panel hides_. + +## Button states on startup + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- _In the Model tab, the "Add to QGIS" and "Remove from Dataset" buttons are disabled_. +- _In the Nodes tab, all buttons are disabled_. + +[Failing](https://github.com/Deltares/Ribasim/issues/1678) + +# New model tests + +## New and cancel + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name. +- Press "Cancel": _Ensure that no files are created in that location_. + +## New single model + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test1"). +- Press OK: _A TOML and database file are created on the given location_. +- _The layers tab shows a group with a "Node" and "Edge" layer, the canvas is empty._ +- _The Ribasim panel shows a Node and Edge layer, the file path is set in the text field, all nodes buttons are enabled_. +- Cleanup: Delete the created files from disk. + +## New model in same folder + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test1"). +- Press OK: _A TOML and database file are created on the given location_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test2"). +- Press OK: _An error is given that the database.gpkg already exists, test2.toml is not written_. +- Cleanup: Delete the created files from disk. + +[Failing](https://github.com/Deltares/Ribasim/issues/1679) + +## New model with same name + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test1"). +- Press OK: _A TOML and database file are created on the given location_. +- Open test1.toml in a text editor and write "EXTRA_LINE=true" +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test1"). +- Press OK: _Shows a popup window to ask if you want to overwrite_. +- Press Yes: _An error is given that the database.gpkg already exists, test1.toml is not overwritten (EXTRA_LINE=true) is still in test1.toml_. +- Cleanup: Delete the created files from disk. + +Unsure if this is wanted behavior, as we said we wanted to overwrite the TOML file, and therefore also the database file. +Perhaps we should create folders instead of TOML files only. + +[Failing](https://github.com/Deltares/Ribasim/issues/1681) + +## New model and clean new project cleans Ribasim plugin + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test1"). +- Press OK: _A TOML and database file are created on the given location_. +- Press "Project > New": _Popup asks to save the project_. +- Press Discard: _Layers tab is emptied, Ribasim panel is emptied_. + +[Failing](https://github.com/Deltares/Ribasim/issues/1682) + +# Model tab button interaction tests + +## Open model twice + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test1"). +- Press OK: _A TOML and database file are created on the given location_. +- Press the "Open" button in the Model tab: _file navigation window pops up_. +- Open test1.toml: _A new layer group is added to the layers panel_. +- In the Nodes tab press "Basin / profile": _A Basin / profile table layer is added to the last layer group only_. + +Intended behavior: The same model is loaded twice, but there is only a connection on the last loaded model when interacting with the plugin. + +## Add to QGIS button + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test1"). +- Press OK: _A TOML and database file are created on the given location_. +- Press "Add to QGIS": _Nothing happens_. +- Press the "Edge" layer in the Model tab: _"Add to QGIS" button is disabled_. + +[Failing](https://github.com/Deltares/Ribasim/issues/1683) + +## Remove from Dataset button + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test1"). +- Press OK: _A TOML and database file are created on the given location_. +- Press the "Edge" layer in the Model tab, press "Remove from Dataset": _Popup shows "Deleting: Edge"_. +- Press "Yes": "Edge" layer is removed from Layers panel and from Model tab. + +Unsure if this is wanted behavior, it is now impossible to load the model afterwards because it no longer contains an Edge layer. +Perhaps better if we only allow removal of the optional tables. See this [bug report](https://github.com/Deltares/Ribasim/issues/1684). + +# Nodes tab button interaction tests + +## Add all tables to new model + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test1"). +- Press OK: _A TOML and database file are created on the given location_. +- Go to the Nodes tab: _All buttons are enabled_. +- From left to right, top to bottom, press every button to add tables to the layers: _The layer group contains extra layers for every button clicked. Basin / area is a MultiPolygon layer_. +- Navigate to Model tab: _All layers are added to the panel_. +- Press the "Open" button to open the same model once again: _The layers panel adds the model containing all of its layers, the Model tab was refreshed_. + +## Add table twice to new model + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test1"). +- Press OK: _A TOML and database file are created on the given location_. +- Go to the Nodes tab: _All buttons are enabled_. +- Press the Basin / time button: _A layer is added to the layers panel with that name, the button becomes disabled_. + +[Failing](https://github.com/Deltares/Ribasim/issues/1685) + +# Map interaction tests + +## Add points to Node layer + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test1"). +- Press OK: _A TOML and database file are created on the given location_. +- Select the Node layer in the Layers tab: _edit buttons in the toolbar become enabled_. +- Edit the layer by pressing the pencil button: _Add Point Feature button becomes enabled_. +- Click in the canvas: _Popup appears with Feature Attributes to fill in_. +- Press OK: _The first Node appears on the map_. +- Click in the canvas again: _Popup appears with Feature Attributes to fill in_. +- Press OK: _The second Node appears on the map_. + +Unexpected behavior: The default type of the nodes is NULL, and therefore undefined. +Should be enforced and validated. +See [issue](https://github.com/Deltares/Ribasim/issues/1688#issuecomment-2265315907). + +## Add edges to Edge layer + +- Open QGIS and ensure that the Ribasim plugin is installed and enabled. +- Open the application via the Ribasim button on the QGIS toolbar: _Ribasim panel opens_. +- Press the "New" button in the Model tab: _file navigation window pops up_. +- Fill in a name ("test1"). +- Press OK: _A TOML and database file are created on the given location_. +- Select the Node layer in the Layers tab: _edit buttons in the toolbar become enabled_. +- Edit the layer by pressing the pencil button: _Add Point Feature button becomes enabled_. +- Click in the canvas: _Popup appears with Feature Attributes to fill in_. +- Add a node id of 1, press OK: _The first Node appears on the map_. +- Click in the canvas again: _Popup appears with Feature Attributes to fill in_. +- Add a node id of 2, press OK: _The second Node appears on the map_. +- Select the Edge layer in the Layers tab: _edit buttons in the toolbar become enabled_. +- Enable snapping under View > Toolbars > Snapping Toolbars: _Magnet button is enabled and active_. +- Press the Add Line Feature button: _Mouse becomes a crosshair_. +- Snap a line between the two nodes, click the two nodes and then right click to finish: _Popup shows with input, all is set to NULL_. +- Press OK: _Line appears on screen between the two nodes_. +- Save the layer's edits: _The line becomes blue_. +- Open the attribute table: _The information shows the from_node_id, to_node_id. This information matches the information from the Node table._ + +# Tables tests + +## Edit tables with data +TODO + +## Edit the type of a node +TODO + +## Edit information in optional tables +TODO + +# Result inspection tests + +## Run a model and check the time series +TODO + +# Tutorial tests + +## Perform tutorial in documentation + +Go through the tutorial as described in the [How-to guide](/guide/qgis.qmd). diff --git a/docs/dev/release.qmd b/docs/dev/release.qmd index 4fb764f89..e7d29ea48 100644 --- a/docs/dev/release.qmd +++ b/docs/dev/release.qmd @@ -84,10 +84,10 @@ In order to publish Ribasim Python or Ribasim API follow the following steps: 2) Open a terminal and run `pixi run publish-ribasim-api` -## Do manual checks +## QGIS manual testing Our continuous integration (CI) should have caught most issues. -A current weak spot in our testing is the QGIS plugin, so it is a good idea to do some manual checks to see if it works properly. +A current weak spot in our testing is the QGIS plugin, so a manual test plan is in place. Start with running the automated task to see if it can be correctly installed. ```sh @@ -96,7 +96,7 @@ Start with running the automated task to see if it can be correctly installed. pixi run test-ribasim-qgis-ui ``` -It is a good idea to load new test models if there are any, or test any other changed functionality. +Then follow the instructions as described in the [QGIS manual test plan](/dev/qgis_test_plan.qmd). ## Announce release diff --git a/docs/guide/coupling.qmd b/docs/guide/coupling.qmd index c1ac43ecb..3e9d7a7d5 100644 --- a/docs/guide/coupling.qmd +++ b/docs/guide/coupling.qmd @@ -2,13 +2,11 @@ title: "Coupling" --- -# Coupling - -## iMOD +# iMOD Ribasim can also be (online) coupled to other kernels with the help of iMOD Coupler. The corresponding documentation can be found within the [iMOD Suite Documentation](https://deltares.github.io/iMOD-Documentation/coupler.html). -## Water quality +# Water quality Ribasim can be offline coupled to Delwaq, the Deltares Water Quality model. @@ -17,7 +15,7 @@ flowchart LR Ribasim --> Delwaq ``` -### Setup +## Setup Delwaq can calculate the concentration of substances in [Basin](/reference/node/basin.qmd) nodes over time, based on initial concentrations, and of [FlowBoundary](/reference/node/flow-boundary.qmd) nodes. Ribasim exposes the `Basin / concentration`, `Basin / concentration_state`, `FlowBoundary / concentration`, and `LevelBoundary / concentration` tables to setup these substances and concentrations. diff --git a/docs/guide/index.qmd b/docs/guide/index.qmd deleted file mode 100644 index 1d8fbe80e..000000000 --- a/docs/guide/index.qmd +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "How-to guides" ---- diff --git a/docs/tutorial/qgis.qmd b/docs/guide/qgis.qmd similarity index 70% rename from docs/tutorial/qgis.qmd rename to docs/guide/qgis.qmd index 8b4f20748..5b3d5f97d 100644 --- a/docs/tutorial/qgis.qmd +++ b/docs/guide/qgis.qmd @@ -2,42 +2,7 @@ title: "QGIS plugin" --- -# How to - -## Start - -Install [QGIS](https://qgis.org/en/site/) version 3.34 or higher. - -### Install Ribasim plugin - -Download `ribasim_qgis.zip`, see the [download section](/install.qmd#sec-download). - -Plugins menu > Manage and Install Plugins... - -![](https://user-images.githubusercontent.com/4471859/224939069-9aae77ea-898f-442f-83b5-f2671c114956.png){fig-align="left"} - -Select "Install from ZIP": - -- Browse to the `ribasim_qgis.zip` file containing the plugin that was downloaded earlier -- Click "Install Plugin" - -![](https://user-images.githubusercontent.com/4471859/224939080-7fec5db2-4417-4f7b-8e45-034d4cf4fd75.png){fig-align="left"} - -Start the Ribasim plugin. - -![](https://user-images.githubusercontent.com/4471859/224939101-228e068a-875b-4df2-98bb-6ee6a3830ddd.png){fig-align="left"} - -### Add iMOD plugin - -In QGIS, navigate to "Plugins > Manage and Install Plugins > All". -In the search bar, type: "iMOD". Select the iMOD plugin, and click "Install". - -At least version 0.4.0 of the iMOD plugin is required. - -The Time Series widget from the iMOD plugin is used for visualizing Ribasim results, which is described in the [results section](#sec-results). -Documentation on the Time Series widget can be found in the [iMOD documentation](https://deltares.github.io/iMOD-Documentation/qgis_user_manual.html#time-series-time-series). - -### Prepare your model +# Preparing a model Open an existing model or create a new model. As an example of an existing model, you can use the "basic" model from `generated_testmodels.zip`, see the [download section](/install.qmd#sec-download). @@ -57,9 +22,9 @@ If you are modeling the Netherlands, select "Amersfoort / RD New" (EPSG:28992). ![](https://user-images.githubusercontent.com/4471859/224939182-3486ff0b-842b-4f98-a37e-ecd04f29aa7f.png){fig-align="left"} -## Edit nodes +## Editing nodes -### Add nodes on the map +### Adding nodes on the map Select the Node layer. @@ -77,7 +42,7 @@ Turn the edit mode off and save the edits to the Nodes layer. ![](https://user-images.githubusercontent.com/4471859/224946136-e37021d5-80c1-4d90-ac04-d0dbd96879f3.png){fig-align="left"} -### Edit tables +### Editing node properties Right click a layer and select "Open Attribute Table". @@ -102,7 +67,7 @@ snapping mode by clicking the magnet and set the snapping distance to 25 pixels. ![](https://user-images.githubusercontent.com/4471859/224939328-8359272a-30bb-4eb1-ab6c-968318ac3997.png){fig-align="left"} -### Create connecting edges +### Creating connecting edges Select the Edge layer and turn on the edit mode. @@ -116,20 +81,19 @@ Create a connection by left clicking a source node and right clicking the destin ![](https://user-images.githubusercontent.com/4471859/224939363-88716d43-0536-499d-adb8-2fb4223c0f87.png){fig-align="left"} -Now leave the edit mode and save the results to the layer. +Now leave the edit mode and save the results to the layer. Your model is now ready to run. See -## Run a model +# Running a model -- Unzip the Ribasim command line interface, `ribasim_cli.zip` -- Open your terminal and go to the directory where your TOML is stored. Now run - `path/to/ribasim_cli/ribasim ribasim.toml`. Adjust the path to the `ribasim_cli` folder to - where you placed it. This runs the model. +- Install the Ribasim core application as described in the [install section](/install.qmd) +- Open a terminal like Powershell or Cmd and navigate to the model directory. +- Call Ribasim with the `.toml` file as input. E.g. `\ribasim.exe my_model.toml`. - In your model directory there is now a `results/` folder with `basin.arrow` and `flow.arrow` output files. -## Inspect results {#sec-results} +# Inspecting results {#sec-results} -Before trying to inspect the results, verify that the run was successful and the output files are there. +Before inspecting the results, verify that the run was successfully and the output files are there. Click the "Time Series" button of the iMOD plugin. @@ -154,6 +118,6 @@ The associated time series are shown the the graph. ![](https://user-images.githubusercontent.com/4471859/224939471-85a23936-6eb6-4a80-a5b7-8c9a55ddc7f7.png){fig-align="left"} -Only the "basin.arrow" and "flow.arrow" can be inspected with the "iMOD Time Series Plot" panel. +Only the `basin.arrow` and `flow.arrow` can be inspected with the "iMOD Time Series Plot" panel. All Arrow files can be loaded as a layer by dragging the files onto QGIS. Right click the layer and select "Open Attribute Table" to view the contents. diff --git a/docs/install.qmd b/docs/install.qmd index c87362908..93233692c 100644 --- a/docs/install.qmd +++ b/docs/install.qmd @@ -43,9 +43,11 @@ The kernel of Ribasim is written in the [Julia programming language](https://jul The [Ribasim Python package](/install.qmd) is available to build, update and analyze Ribasim models programmatically. For runtime data exchange and coupling with other kernels, the Julia kernel is wrapped in a Python API (`ribasim_api`) which implements the Basic Modelling Interface [BMI](https://bmi-spec.readthedocs.io/en/latest/). -The Ribasim QGIS plugin allows users to view or edit a model without programming. -For specific tasks, like adding long timeseries, using Python is strongly recommended. - +Ribasim uses [GeoPackage](https://www.geopackage.org/) files to store the model database (`database.gpkg`). +[QGIS](https://qgis.org/) works well with GeoPackage files. +This makes QGIS the perfect application to inspect and make edits to Ribasim models. +Deltares also provides the iMOD QGIS plugin, which can be used to inspect the results of a Ribasim model too. +For larger edits using Python is recommended. One can also use Ribasim Python to build entire models from base data, such that your model setup is fully reproducible. # Download {#sec-download} @@ -100,3 +102,36 @@ pip install ribasim ``` For documentation please see the [examples](/guide/examples.ipynb) and [API reference](/reference/reference). + +# Ribasim QGIS plugin + +The Ribasim QGIS plugin requires [QGIS](https://qgis.org/en/site/) 3.34 or higher. + +## Install Ribasim plugin + +Download `ribasim_qgis.zip`, see the [download section](#sec-download). + +Plugins menu > Manage and Install Plugins... + +![](https://user-images.githubusercontent.com/4471859/224939069-9aae77ea-898f-442f-83b5-f2671c114956.png){fig-align="left"} + +Select "Install from ZIP": + +- Browse to the `ribasim_qgis.zip` file containing the plugin that was downloaded earlier +- Click "Install Plugin" + +![](https://user-images.githubusercontent.com/4471859/224939080-7fec5db2-4417-4f7b-8e45-034d4cf4fd75.png){fig-align="left"} + +Open the Ribasim plugin panel. + +![](https://user-images.githubusercontent.com/4471859/224939101-228e068a-875b-4df2-98bb-6ee6a3830ddd.png){fig-align="left"} + +## Install iMOD plugin + +In QGIS, navigate to "Plugins > Manage and Install Plugins > All". +In the search bar, type: "iMOD". Select the iMOD plugin, and click "Install". + +At least version 0.5.2 of the iMOD plugin is required. + +The Time Series widget from the iMOD plugin is used for visualizing Ribasim results, which is described in the [results section](#sec-results). +Documentation on the Time Series widget can be found in the [iMOD documentation](https://deltares.github.io/iMOD-Documentation/qgis_user_manual.html#time-series-time-series). diff --git a/docs/known_issues.qmd b/docs/known_issues.qmd new file mode 100644 index 000000000..0783d358d --- /dev/null +++ b/docs/known_issues.qmd @@ -0,0 +1,15 @@ +--- +title: "Known Issues" +--- + +Known issues can be found on the [GitHub issues page](https://github.com/Deltares/Ribasim/issues). +Besides the issues that need to be fixed, there are also considerations that had to be made while developing the application. + +# QGIS Plugin Known Shortcomings + +- The QGIS plugin does not have a dynamic relation between its own plugin and the layers that are loaded in the QGIS project. + That means that deleting a layer from the layers panel does not automatically remove it from the GeoPackage, as the layers are clones. +- Tables and geometries are not linked. If you remove an edge or a node, the tables containing information about those objects will remain. + It is up to the user to clean up all tables. +- The QGIS plugin does not update edges when nodes are moved. + Snapping is only used to grab the information of the node the user points to. diff --git a/docs/reference/index.qmd b/docs/reference/index.qmd index ed72654ed..b2c44fb8f 100644 --- a/docs/reference/index.qmd +++ b/docs/reference/index.qmd @@ -2,4 +2,4 @@ title: "Reference" --- -These pages contain the test models, node descriptions and developer documentation. +These pages contain the test models, node descriptions and Ribasim Python API documentation. diff --git a/docs/tutorial/index.qmd b/docs/tutorial/index.qmd deleted file mode 100644 index 15b3ce668..000000000 --- a/docs/tutorial/index.qmd +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "Tutorials" ---- diff --git a/pixi.lock b/pixi.lock index 18152a5e1..ddb56a6b9 100644 --- a/pixi.lock +++ b/pixi.lock @@ -1862,6 +1862,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/zlib-1.3.1-h4ab18f5_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/zstandard-0.23.0-py312h3483029_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.6-ha6fb4c9_0.conda + - pypi: https://files.pythonhosted.org/packages/44/5b/fa477e4fd8e62c722febdc52462d7b037a77aa963c3e400a8e90e8f0d2c0/ptvsd-4.3.2-py2.py3-none-any.whl - pypi: python/ribasim - pypi: python/ribasim_api - pypi: python/ribasim_testmodels @@ -2355,6 +2356,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/zlib-1.3.1-h87427d6_1.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/zstandard-0.23.0-py312h331e495_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.6-h915ae27_0.conda + - pypi: https://files.pythonhosted.org/packages/44/5b/fa477e4fd8e62c722febdc52462d7b037a77aa963c3e400a8e90e8f0d2c0/ptvsd-4.3.2-py2.py3-none-any.whl - pypi: python/ribasim - pypi: python/ribasim_api - pypi: python/ribasim_testmodels @@ -2848,6 +2850,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zlib-1.3.1-hfb2fe0b_1.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstandard-0.23.0-py312h721a963_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.6-hb46c0d2_0.conda + - pypi: https://files.pythonhosted.org/packages/44/5b/fa477e4fd8e62c722febdc52462d7b037a77aa963c3e400a8e90e8f0d2c0/ptvsd-4.3.2-py2.py3-none-any.whl - pypi: python/ribasim - pypi: python/ribasim_api - pypi: python/ribasim_testmodels @@ -3320,6 +3323,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/zlib-1.3.1-h2466b09_1.conda - conda: https://conda.anaconda.org/conda-forge/win-64/zstandard-0.23.0-py312h7606c53_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.6-h0ea2cb4_0.conda + - pypi: https://files.pythonhosted.org/packages/44/5b/fa477e4fd8e62c722febdc52462d7b037a77aa963c3e400a8e90e8f0d2c0/ptvsd-4.3.2-py2.py3-none-any.whl - pypi: python/ribasim - pypi: python/ribasim_api - pypi: python/ribasim_testmodels @@ -32410,6 +32414,12 @@ packages: purls: [] size: 144301 timestamp: 1537755684331 +- kind: pypi + name: ptvsd + version: 4.3.2 + url: https://files.pythonhosted.org/packages/44/5b/fa477e4fd8e62c722febdc52462d7b037a77aa963c3e400a8e90e8f0d2c0/ptvsd-4.3.2-py2.py3-none-any.whl + sha256: 459137736068bb02515040b2ed2738169cb30d69a38e0fd5dffcba255f41e68d + requires_python: '>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*' - kind: conda name: ptyprocess version: 0.7.0 @@ -37613,6 +37623,52 @@ packages: - ribasim-testmodels ; extra == 'tests' requires_python: '>=3.10' editable: true +- kind: pypi + name: ribasim + version: 2024.10.0 + path: python/ribasim + sha256: dabdd02a24d0b7d6a745c1bcdd800f8afdeb527b8b294ded4eaaf7205939a9cd + requires_dist: + - geopandas + - matplotlib + - numpy + - pandas + - pandera>=0.20 + - pyarrow + - pydantic~=2.0 + - pyogrio + - shapely>=2.0 + - tomli + - tomli-w + - jinja2 ; extra == 'all' + - networkx ; extra == 'all' + - pytest ; extra == 'all' + - pytest-cov ; extra == 'all' + - pytest-xdist ; extra == 'all' + - ribasim-testmodels ; extra == 'all' + - xugrid ; extra == 'all' + - jinja2 ; extra == 'delwaq' + - networkx ; extra == 'delwaq' + - xugrid ; extra == 'delwaq' + - xugrid ; extra == 'netcdf' + - pytest ; extra == 'tests' + - pytest-cov ; extra == 'tests' + - pytest-xdist ; extra == 'tests' + - ribasim-testmodels ; extra == 'tests' + requires_python: '>=3.10' + editable: true +- kind: pypi + name: ribasim-api + version: 2024.10.0 + path: python/ribasim_api + sha256: dc882869854e0940ab3a12506f5b9508b04045793f6badb644579c43fa2b6cb9 + requires_dist: + - xmipy + - pytest ; extra == 'tests' + - ribasim ; extra == 'tests' + - ribasim-testmodels ; extra == 'tests' + requires_python: '>=3.10' + editable: true - kind: pypi name: ribasim-api version: 2024.10.0 @@ -37638,6 +37694,19 @@ packages: - pytest ; extra == 'tests' requires_python: '>=3.10' editable: true +- kind: pypi + name: ribasim-testmodels + version: 0.5.0 + path: python/ribasim_testmodels + sha256: 2b0165819d6cc5d79b0b65761e8c38b1cc9f34649dea3ed4406013080ea8b112 + requires_dist: + - geopandas + - numpy + - pandas + - ribasim + - pytest ; extra == 'tests' + requires_python: '>=3.10' + editable: true - kind: conda name: rich version: 13.7.1 diff --git a/pixi.toml b/pixi.toml index e8be9c112..da63f7bfa 100644 --- a/pixi.toml +++ b/pixi.toml @@ -127,10 +127,12 @@ qgis = "qgis --profiles-path .pixi/qgis_env" install-ribasim-qgis = "python ribasim_qgis/scripts/install_ribasim_qgis.py" install-imod-qgis = "python ribasim_qgis/scripts/install_qgis_plugin.py iMOD && python ribasim_qgis/scripts/enable_plugin.py imodqgis" install-plugin-reloader-qgis = "python ribasim_qgis/scripts/install_qgis_plugin.py \"Plugin Reloader\" && python ribasim_qgis/scripts/enable_plugin.py plugin_reloader" +install-debugvs-qgis = "python ribasim_qgis/scripts/install_qgis_plugin.py debugvs==0.7 && python ribasim_qgis/scripts/enable_plugin.py debug_vs" install-qgis-plugins = { depends_on = [ "install-plugin-reloader-qgis", "install-ribasim-qgis", "install-imod-qgis", + "install-debugvs-qgis", ] } test-ribasim-qgis-ui = { cmd = "python ribasim_qgis/scripts/run_qgis_ui_tests.py", depends_on = [ "install-ribasim-qgis", @@ -214,8 +216,8 @@ ruff = "*" rust = "*" twine = "*" -[target.win-64.dependencies] -rcedit = "*" +[feature.dev.pypi-dependencies] +ptvsd = "*" [feature.py312.dependencies] python = "3.12.*" @@ -226,6 +228,9 @@ python = "3.11.*" [feature.py310.dependencies] python = "3.10.*" +[target.win-64.dependencies] +rcedit = "*" + [environments] default = { features = ["py312"], solve-group = "py312" } dev = { features = ["py312", "dev"], solve-group = "py312" }