From e2b86cdb0d8d9eadfbd61df97fe5f6374d008d67 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Fri, 17 Jan 2025 20:15:49 +0100 Subject: [PATCH] Prepare release v2025.1.0 (#2013) The first release of 2025 makes the Ribasim core more robust and stable, and speeds up initialization for large models. The biggest new feature is the experimental support for calculating tracers in Ribasim directly, which will hopefully make it easier to track where the water resources are heading. Note that I also pushed a few separate commits with fixes I found during the release process. --- Manifest.toml | 2 +- build/cli/Cargo.lock | 2 +- build/cli/Cargo.toml | 2 +- core/Project.toml | 2 +- core/test/data/config_test.toml | 2 +- .../data/logging_test_loglevel_debug.toml | 2 +- core/test/data/logging_test_no_loglevel.toml | 2 +- core/test/docs.toml | 2 +- docs/changelog.qmd | 27 +++++++++ docs/dev/release.qmd | 28 ++++----- pixi.lock | 4 +- pixi.toml | 2 +- python/ribasim/ribasim/__init__.py | 2 +- python/ribasim_api/ribasim_api/__init__.py | 2 +- ribasim_qgis/core/nodes.py | 57 +++++++++++++++++++ ribasim_qgis/metadata.txt | 2 +- ribasim_qgis/tests/data/simple_valid.toml | 2 +- ribasim_qgis/widgets/dataset_widget.py | 4 +- 18 files changed, 115 insertions(+), 31 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index 1877fd4cc..a235dd97e 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2101,7 +2101,7 @@ version = "3.6.5" deps = ["Accessors", "Arrow", "BasicModelInterface", "CodecZstd", "ComponentArrays", "Configurations", "DBInterface", "DataInterpolations", "DataStructures", "Dates", "DiffEqBase", "DiffEqCallbacks", "EnumX", "FiniteDiff", "Graphs", "HiGHS", "IterTools", "JuMP", "Legolas", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "LoggingExtras", "MetaGraphsNext", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqTsit5", "PreallocationTools", "SQLite", "SciMLBase", "SparseArrays", "SparseConnectivityTracer", "StructArrays", "Tables", "TerminalLoggers", "TranscodingStreams"] path = "core" uuid = "aac5e3d9-0b8f-4d4f-8241-b1a7a9632635" -version = "2024.11.0" +version = "2025.1.0" weakdeps = ["DataFrames", "Makie"] [deps.Ribasim.extensions] diff --git a/build/cli/Cargo.lock b/build/cli/Cargo.lock index 484bae57b..56357a9d7 100644 --- a/build/cli/Cargo.lock +++ b/build/cli/Cargo.lock @@ -144,7 +144,7 @@ dependencies = [ [[package]] name = "ribasim" -version = "2024.11.0" +version = "2025.1.0" dependencies = [ "clap", "libc", diff --git a/build/cli/Cargo.toml b/build/cli/Cargo.toml index da349088d..73a901138 100644 --- a/build/cli/Cargo.toml +++ b/build/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ribasim" -version = "2024.11.0" +version = "2025.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/core/Project.toml b/core/Project.toml index 422e22e74..33fdf7f95 100644 --- a/core/Project.toml +++ b/core/Project.toml @@ -2,7 +2,7 @@ name = "Ribasim" uuid = "aac5e3d9-0b8f-4d4f-8241-b1a7a9632635" authors = ["Deltares and contributors "] manifest = "../Manifest.toml" -version = "2024.11.0" +version = "2025.1.0" [deps] Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" diff --git a/core/test/data/config_test.toml b/core/test/data/config_test.toml index 7f5353e32..cdbf757e9 100644 --- a/core/test/data/config_test.toml +++ b/core/test/data/config_test.toml @@ -3,7 +3,7 @@ endtime = 2019-12-31 crs = "EPSG:28992" input_dir = "../../generated_testmodels/lhm" results_dir = "../../generated_testmodels/lhm" -ribasim_version = "2024.11.0" +ribasim_version = "2025.1.0" [basin] time = "basin/time.arrow" diff --git a/core/test/data/logging_test_loglevel_debug.toml b/core/test/data/logging_test_loglevel_debug.toml index 661661d9b..c0ecd68b0 100644 --- a/core/test/data/logging_test_loglevel_debug.toml +++ b/core/test/data/logging_test_loglevel_debug.toml @@ -3,7 +3,7 @@ endtime = 2019-12-31 crs = "EPSG:28992" input_dir = "." results_dir = "results" -ribasim_version = "2024.11.0" +ribasim_version = "2025.1.0" [logging] verbosity = "debug" diff --git a/core/test/data/logging_test_no_loglevel.toml b/core/test/data/logging_test_no_loglevel.toml index 3f27121d2..4ecb56631 100644 --- a/core/test/data/logging_test_no_loglevel.toml +++ b/core/test/data/logging_test_no_loglevel.toml @@ -3,4 +3,4 @@ endtime = 2019-12-31 crs = "EPSG:28992" input_dir = "." results_dir = "results" -ribasim_version = "2024.11.0" +ribasim_version = "2025.1.0" diff --git a/core/test/docs.toml b/core/test/docs.toml index 12c336535..927ab0178 100644 --- a/core/test/docs.toml +++ b/core/test/docs.toml @@ -12,7 +12,7 @@ crs = "EPSG:4326" # required input_dir = "." # required results_dir = "results" # required -ribasim_version = "2024.11.0" # required +ribasim_version = "2025.1.0" # required # Specific tables can also go into Arrow files rather than the database. # For large tables this can benefit from better compressed file sizes. diff --git a/docs/changelog.qmd b/docs/changelog.qmd index 373ab6cc8..875d4f23b 100644 --- a/docs/changelog.qmd +++ b/docs/changelog.qmd @@ -5,9 +5,36 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ## [Unreleased] +## [v2025.1.0] - 2025-01-17 + +The first release of 2025 makes the Ribasim core more robust and stable, and speeds up +initialization for large models. The biggest new feature is the experimental support for +calculating tracers in Ribasim directly, which will hopefully make it easier to track where +the water resources are heading. + +### Added +- Remove Z coordinate on constructing Node in Python. [#1986](https://github.com/Deltares/Ribasim/pull/1986) +- Add "Basin / subgrid_time" table. [#1975](https://github.com/Deltares/Ribasim/pull/1975) +- Sign Ribasim binaries. [#2007](https://github.com/Deltares/Ribasim/pull/2007) +- Experimental: Calculate tracer concentrations internally. [#1849](https://github.com/Deltares/Ribasim/pull/1849) +- Document [parsing Delwaq results](https://ribasim.org/guide/delwaq). [#1845](https://github.com/Deltares/Ribasim/pull/1845) + +### Removed +- Drop Python 3.10 support. [#2012](https://github.com/Deltares/Ribasim/pull/2012) + ### Changed +- Allocation: optimize per source. [#1927](https://github.com/Deltares/Ribasim/pull/1927) - The Edge table no longer supports `subnetwork_id`; this is automatically inferred. [#1956](https://github.com/Deltares/Ribasim/pull/1956) +### Fixed +- ManningResistance is more stable around Δh=0. [#1896](https://github.com/Deltares/Ribasim/pull/1896) +- Fixes to Delwaq model generation. [#1903](https://github.com/Deltares/Ribasim/pull/1903) [#1917](https://github.com/Deltares/Ribasim/pull/1917) [#1948](https://github.com/Deltares/Ribasim/pull/1948) +- Add step limiter to avoid negative flows or too large flows. [#1911](https://github.com/Deltares/Ribasim/pull/1911) [#1912](https://github.com/Deltares/Ribasim/pull/1912) +- Fix README.md in builds. [#1935](https://github.com/Deltares/Ribasim/pull/1935) [#1938](https://github.com/Deltares/Ribasim/pull/1938) +- Speed up initialization. [#1977](https://github.com/Deltares/Ribasim/pull/1977) +- Automatically name index in Python. [#1974](https://github.com/Deltares/Ribasim/pull/1974) +- Table sorting related fixes. [#2003](https://github.com/Deltares/Ribasim/pull/2003) + ## [v2024.11.0] - 2024-10-08 This major new release contains many improvements. diff --git a/docs/dev/release.qmd b/docs/dev/release.qmd index e2cec853e..3480eabad 100644 --- a/docs/dev/release.qmd +++ b/docs/dev/release.qmd @@ -17,6 +17,20 @@ This section provides a guide for developers to follow when preparing a new rele Before starting the release process, ensure that all tests are passing and that all features intended for the release are complete and merged into the main branch. +## QGIS manual testing + +Our continuous integration (CI) should have caught most issues. +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 +# This test might give a fatal error on the first run, this is most likely a timing issue. +# Try to run it again when that happens. +pixi run test-ribasim-qgis-ui +``` + +Then follow the instructions as described in the [QGIS manual test plan](/dev/qgis_test_plan.qmd). + ## Update version numbers of the components Determine the new version number like `2023.1.0`, filling in the current year, a bumped `MINOR` number for normal releases and a bumped `MICRO` number for non-breaking, hotfix releases. @@ -84,20 +98,6 @@ In order to publish Ribasim Python or Ribasim API follow the following steps: 2) Open a terminal and run `pixi run publish-ribasim-api` -## QGIS manual testing - -Our continuous integration (CI) should have caught most issues. -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 -# This test might give a fatal error on the first run, this is most likely a timing issue. -# Try to run it again when that happens. -pixi run test-ribasim-qgis-ui -``` - -Then follow the instructions as described in the [QGIS manual test plan](/dev/qgis_test_plan.qmd). - ## Announce release Announce the release in appropriate channels. diff --git a/pixi.lock b/pixi.lock index 1623c105e..c016d93f8 100644 --- a/pixi.lock +++ b/pixi.lock @@ -21908,7 +21908,7 @@ packages: timestamp: 1598024297745 - pypi: python/ribasim name: ribasim - version: 2024.11.0 + version: 2025.1.0 sha256: bc76f0d6b28e203efbaa6ced5c6e7c542e2304e784989ec6c3152a516cd1c041 requires_dist: - geopandas>=1.0 @@ -21943,7 +21943,7 @@ packages: editable: true - pypi: python/ribasim_api name: ribasim-api - version: 2024.11.0 + version: 2025.1.0 sha256: 73658444714bf6027302b5bf1ec3da2cad1a265d8d1e3c0f4dcb9a17c02b704c requires_dist: - xmipy>=1.3 diff --git a/pixi.toml b/pixi.toml index a009d17eb..ff91bc92b 100644 --- a/pixi.toml +++ b/pixi.toml @@ -1,6 +1,6 @@ [project] name = "Ribasim" -version = "2024.11.0" +version = "2025.1.0" description = "Water resources modeling" authors = ["Deltares and contributors "] channels = ["conda-forge"] diff --git a/python/ribasim/ribasim/__init__.py b/python/ribasim/ribasim/__init__.py index 9deb0099f..9f3c41138 100644 --- a/python/ribasim/ribasim/__init__.py +++ b/python/ribasim/ribasim/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2024.11.0" +__version__ = "2025.1.0" # Keep synced write_schema_version in ribasim_qgis/core/geopackage.py __schema_version__ = 3 diff --git a/python/ribasim_api/ribasim_api/__init__.py b/python/ribasim_api/ribasim_api/__init__.py index bf12dd287..de7e50546 100644 --- a/python/ribasim_api/ribasim_api/__init__.py +++ b/python/ribasim_api/ribasim_api/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2024.11.0" +__version__ = "2025.1.0" from ribasim_api.ribasim_api import RibasimApi diff --git a/ribasim_qgis/core/nodes.py b/ribasim_qgis/core/nodes.py index d2274b3ee..058f96328 100644 --- a/ribasim_qgis/core/nodes.py +++ b/ribasim_qgis/core/nodes.py @@ -609,6 +609,25 @@ def attributes(cls) -> list[QgsField]: ] +class LevelBoundaryConcentration(Input): + @classmethod + def input_type(cls) -> str: + return "LevelBoundary / concentration" + + @classmethod + def geometry_type(cls) -> str: + return "No Geometry" + + @classmethod + def attributes(cls) -> list[QgsField]: + return [ + QgsField("node_id", QVariant.Int), + QgsField("time", QVariant.DateTime), + QgsField("substance", QVariant.String), + QgsField("concentration", QVariant.Double), + ] + + class PumpStatic(Input): @classmethod def input_type(cls) -> str: @@ -688,6 +707,25 @@ def attributes(cls) -> list[QgsField]: ] +class FlowBoundaryConcentration(Input): + @classmethod + def input_type(cls) -> str: + return "FlowBoundary / concentration" + + @classmethod + def geometry_type(cls) -> str: + return "No Geometry" + + @classmethod + def attributes(cls) -> list[QgsField]: + return [ + QgsField("node_id", QVariant.Int), + QgsField("time", QVariant.DateTime), + QgsField("substance", QVariant.String), + QgsField("concentration", QVariant.Double), + ] + + class DiscreteControlVariable(Input): @classmethod def input_type(cls) -> str: @@ -868,6 +906,25 @@ def attributes(cls) -> list[QgsField]: ] +class UserDemandConcentration(Input): + @classmethod + def input_type(cls) -> str: + return "UserDemand / concentration" + + @classmethod + def geometry_type(cls) -> str: + return "No Geometry" + + @classmethod + def attributes(cls) -> list[QgsField]: + return [ + QgsField("node_id", QVariant.Int), + QgsField("time", QVariant.DateTime), + QgsField("substance", QVariant.String), + QgsField("concentration", QVariant.Double), + ] + + class LevelDemandStatic(Input): @classmethod def input_type(cls) -> str: diff --git a/ribasim_qgis/metadata.txt b/ribasim_qgis/metadata.txt index e8ee3ce45..169d8cb74 100644 --- a/ribasim_qgis/metadata.txt +++ b/ribasim_qgis/metadata.txt @@ -7,7 +7,7 @@ name=Ribasim qgisMinimumVersion=3.34 description=QGIS plugin to setup Ribasim models -version=2024.11.0 +version=2025.1.0 author=Deltares and contributors email=ribasim.info@deltares.nl diff --git a/ribasim_qgis/tests/data/simple_valid.toml b/ribasim_qgis/tests/data/simple_valid.toml index 443dbadff..481c22638 100644 --- a/ribasim_qgis/tests/data/simple_valid.toml +++ b/ribasim_qgis/tests/data/simple_valid.toml @@ -3,4 +3,4 @@ endtime = 2021-01-01 00:00:00 crs = "EPSG:28992" input_dir = "." results_dir = "results" -ribasim_version = "2024.11.0" +ribasim_version = "2025.1.0" diff --git a/ribasim_qgis/widgets/dataset_widget.py b/ribasim_qgis/widgets/dataset_widget.py index 079fad59f..3959f862d 100644 --- a/ribasim_qgis/widgets/dataset_widget.py +++ b/ribasim_qgis/widgets/dataset_widget.py @@ -77,7 +77,7 @@ def remove_geopackage_layers(self) -> None: selection = self.selectedItems() # Warn before deletion - message = "\n".join([f"- {item.text(1)}" for item in selection]) + message = "\n".join([f"- {item.text(0)}" for item in selection]) reply = QMessageBox.question( self, "Deleting from Geopackage", @@ -337,7 +337,7 @@ def _write_toml(self) -> None: f'crs = "{self.ribasim_widget.crs.authid()}"\n', 'input_dir = "."\n', 'results_dir = "results"\n', - 'ribasim_version = "2024.11.0"\n', + 'ribasim_version = "2025.1.0"\n', ] )