From 72f3694cb4cc6a53c62ea6c4dfe5f2260dd3dcb8 Mon Sep 17 00:00:00 2001 From: Huite Date: Mon, 5 Feb 2024 16:43:15 +0100 Subject: [PATCH 1/3] Testmodels: run one year instead of ten (#1080) No adverse effects: results have already achieved steady-state after one year. This obviously reduces running times, especially when a MODFLOW6 model is run as well. Fixes #1031 --------- Co-authored-by: Martijn Visser --- python/ribasim_testmodels/ribasim_testmodels/backwater.py | 2 +- python/ribasim_testmodels/ribasim_testmodels/two_basin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ribasim_testmodels/ribasim_testmodels/backwater.py b/python/ribasim_testmodels/ribasim_testmodels/backwater.py index 42e950ec9..ea90ad597 100644 --- a/python/ribasim_testmodels/ribasim_testmodels/backwater.py +++ b/python/ribasim_testmodels/ribasim_testmodels/backwater.py @@ -101,7 +101,7 @@ def backwater_model(): flow_boundary=flow_boundary, manning_resistance=manning_resistance, starttime="2020-01-01 00:00:00", - endtime="2030-01-01 00:00:00", + endtime="2021-01-01 00:00:00", ) return model diff --git a/python/ribasim_testmodels/ribasim_testmodels/two_basin.py b/python/ribasim_testmodels/ribasim_testmodels/two_basin.py index 5618ea7b1..afd3e8842 100644 --- a/python/ribasim_testmodels/ribasim_testmodels/two_basin.py +++ b/python/ribasim_testmodels/ribasim_testmodels/two_basin.py @@ -121,6 +121,6 @@ def two_basin_model() -> ribasim.Model: tabulated_rating_curve=rating_curve, terminal=terminal, starttime="2020-01-01 00:00:00", - endtime="2030-01-01 00:00:00", + endtime="2021-01-01 00:00:00", ) return ribasim_model From 729b4db58a0615479c1f254ab521827ee7213945 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:20:34 +0100 Subject: [PATCH 2/3] Bump codecov/codecov-action from 3 to 4 (#1070) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
Release notes

Sourced from codecov/codecov-action's releases.

v4.0.0

v4 of the Codecov Action uses the CLI as the underlying upload. The CLI has helped to power new features including local upload, the global upload token, and new upcoming features.

Breaking Changes

  • The Codecov Action runs as a node20 action due to node16 deprecation. See this post from GitHub on how to migrate.
  • Tokenless uploading is unsupported. However, PRs made from forks to the upstream public repos will support tokenless (e.g. contributors to OS projects do not need the upstream repo's Codecov token). This doc shows instructions on how to add the Codecov token.
  • OS platforms have been added, though some may not be automatically detected. To see a list of platforms, see our CLI download page
  • Various arguments to the Action have been changed. Please be aware that the arguments match with the CLI's needs

v3 versions and below will not have access to CLI features (e.g. global upload token, ATS).

What's Changed

... (truncated)

Changelog

Sourced from codecov/codecov-action's changelog.

4.0.0-beta.2

Fixes

  • #1085 not adding -n if empty to do-upload command

4.0.0-beta.1

v4 represents a move from the universal uploader to the Codecov CLI. Although this will unlock new features for our users, the CLI is not yet at feature parity with the universal uploader.

Breaking Changes

  • No current support for aarch64 and alpine architectures.
  • Tokenless uploading is unsuported
  • Various arguments to the Action have been removed

3.1.4

Fixes

  • #967 Fix typo in README.md
  • #971 fix: add back in working dir
  • #969 fix: CLI option names for uploader

Dependencies

  • #970 build(deps-dev): bump @​types/node from 18.15.12 to 18.16.3
  • #979 build(deps-dev): bump @​types/node from 20.1.0 to 20.1.2
  • #981 build(deps-dev): bump @​types/node from 20.1.2 to 20.1.4

3.1.3

Fixes

  • #960 fix: allow for aarch64 build

Dependencies

  • #957 build(deps-dev): bump jest-junit from 15.0.0 to 16.0.0
  • #958 build(deps): bump openpgp from 5.7.0 to 5.8.0
  • #959 build(deps-dev): bump @​types/node from 18.15.10 to 18.15.12

3.1.2

Fixes

  • #718 Update README.md
  • #851 Remove unsupported path_to_write_report argument
  • #898 codeql-analysis.yml
  • #901 Update README to contain correct information - inputs and negate feature
  • #955 fix: add in all the extra arguments for uploader

Dependencies

  • #819 build(deps): bump openpgp from 5.4.0 to 5.5.0
  • #835 build(deps): bump node-fetch from 3.2.4 to 3.2.10
  • #840 build(deps): bump ossf/scorecard-action from 1.1.1 to 2.0.4
  • #841 build(deps): bump @​actions/core from 1.9.1 to 1.10.0
  • #843 build(deps): bump @​actions/github from 5.0.3 to 5.1.1
  • #869 build(deps): bump node-fetch from 3.2.10 to 3.3.0
  • #872 build(deps-dev): bump jest-junit from 13.2.0 to 15.0.0
  • #879 build(deps): bump decode-uri-component from 0.2.0 to 0.2.2

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=codecov/codecov-action&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Martijn Visser --- .github/workflows/core_tests.yml | 4 +++- .github/workflows/python_tests.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/core_tests.yml b/.github/workflows/core_tests.yml index 3f0718576..f5a143e4b 100644 --- a/.github/workflows/core_tests.yml +++ b/.github/workflows/core_tests.yml @@ -44,6 +44,8 @@ jobs: - uses: julia-actions/julia-processcoverage@v1 with: directories: core/src - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: files: lcov.info + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index 6089785e8..024e31f9a 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -43,4 +43,6 @@ jobs: run: pytest --numprocesses=auto --cov=ribasim --cov-report=xml python/ribasim/tests - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 83de69fd7128ae666634f53f054947199b314c84 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Tue, 6 Feb 2024 17:57:58 +0100 Subject: [PATCH 3/3] Switch components over to the same calver version number (#1086) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #1076 The new logging looks like this: ``` ┌ Info: Starting a Ribasim simulation. │ ribasim_version = v"2024.2.0" │ starttime = 2020-01-01T00:00:00 └ endtime = 2021-01-01T00:00:00 Simulating 100%|███████████████████████████████████████| Time: 0:00:00 [ Info: The model finished successfully ``` --- core/Project.toml | 2 +- core/src/main.jl | 3 ++ docs/contribute/release.qmd | 38 ++++++++++++---------- pixi.toml | 2 +- python/ribasim/ribasim/__init__.py | 2 +- python/ribasim_api/ribasim_api/__init__.py | 2 +- ribasim_qgis/metadata.txt | 2 +- 7 files changed, 29 insertions(+), 22 deletions(-) diff --git a/core/Project.toml b/core/Project.toml index a8010212a..dd3b5b263 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 = "0.7.0" +version = "2024.02.0" [deps] Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" diff --git a/core/src/main.jl b/core/src/main.jl index 465dfe4be..a1227d89a 100644 --- a/core/src/main.jl +++ b/core/src/main.jl @@ -41,6 +41,9 @@ function main(ARGS::Vector{String})::Cint logger = Ribasim.setup_logger(; verbosity = config.logging.verbosity, stream = io) with_logger(logger) do + ribasim_version = pkgversion(Ribasim) + (; starttime, endtime) = config + @info "Starting a Ribasim simulation." ribasim_version starttime endtime model = Ribasim.run(config) if successful_retcode(model) @info "The model finished successfully" diff --git a/docs/contribute/release.qmd b/docs/contribute/release.qmd index a32bd32eb..e069cce55 100644 --- a/docs/contribute/release.qmd +++ b/docs/contribute/release.qmd @@ -5,8 +5,8 @@ title: "Release process" # What is a release The [Ribasim repository](https://github.com/Deltares/Ribasim) contains several components, e.g., the Julia core, the Python tooling and QGIS plugin. -The components are currently only guaranteed to work together if they are built at the same time. -Therefore we release Ribasim as a collection of all the components at once. +The components are currently only guaranteed to work together if they have the same version number. +Therefore we release Ribasim as a collection of all the components at once, all carrying the same version number. For maximum interoperability it is suggested to only release all components together, and not individually. For these releases we use [Calender Versioning](https://calver.org/), which makes it clear in which month the release was made. @@ -19,19 +19,28 @@ 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. -## Update version numbers of the components as needed +## Update version numbers of the components -The components have their own version number which generally uses [Semantic Versioning](https://semver.org/), with minor version signifying a breaking release for pre-1.0 versions, as [documented here](https://pkgdocs.julialang.org/v1/compatibility/#compat-pre-1.0). If a component did not change at all between releases, the version number can stay the same. +Determine the new version number like `2023.08.0`, filling in the current year, month and a sequential "MICRO" number. +This follows `YYYY.0M.MICRO` from [calver](https://calver.org/). -Now submit a pull request which updates the version numbers of the components as needed. -You can use [PR #623](https://github.com/Deltares/Ribasim/pull/623) as an example. +Update the version numbers in the repository to the new version number. +A single find and replace can update all 5 locations: -In general for Python packages the version number is in `__init__.py`, for Julia it is `Project.toml`, and for QGIS `metadata.txt` +- `pixi.toml` +- `core/Project.toml` +- `python/ribasim/ribasim/__init__.py` +- `python/ribasim_api/ribasim_api/__init__.py` +- `ribasim_qgis/metadata.txt` + +Now submit a pull request to update the version numbers. ## Create a new release -Create a new tag like `v2023.08.0`, filling in the current year, month and a sequential "MICRO" number. -This follows `vYYYY.0M.MICRO` from [calver](https://calver.org/). +When the pull request is merged to main, checkout the commit that updates the version numbers. + +Create a new tag, which is the letter `v` followed by the version number, like, `v2023.08.0`. + This can be done by executing: ```bash git tag @@ -59,19 +68,14 @@ All changes ``` -## Release Ribasim Python to PyPI +## Release the Ribasim Python packages to PyPI To be able to install packages with `pip`, they need to be released on the Python Package Index (PyPI). In order to publish Ribasim Python or Ribasim API follow the following steps: -1) Update `__version__` in `__init__.py` - -2) Open a terminal and run `pixi run build-ribasim-python-wheel` or `pixi run build-ribasim-api-wheel` - -3) Make a new commit with the updated version number, and push to remote - -4) Publish on PyPI with `pixi run publish-ribasim-python` or `pixi run publish-ribasim-api` +1) Open a terminal and run `pixi run publish-ribasim-python` +2) Open a terminal and run `pixi run publish-ribasim-api` ## Do manual checks diff --git a/pixi.toml b/pixi.toml index f0f7583fe..a09507ee2 100644 --- a/pixi.toml +++ b/pixi.toml @@ -1,6 +1,6 @@ [project] name = "Ribasim" -version = "0.5.0" +version = "2024.02.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 e7b2a7de9..a47bff109 100644 --- a/python/ribasim/ribasim/__init__.py +++ b/python/ribasim/ribasim/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.7.0" +__version__ = "2024.02.0" from ribasim import models, utils diff --git a/python/ribasim_api/ribasim_api/__init__.py b/python/ribasim_api/ribasim_api/__init__.py index d3d2ccdda..2418918e8 100644 --- a/python/ribasim_api/ribasim_api/__init__.py +++ b/python/ribasim_api/ribasim_api/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.6.0" +__version__ = "2024.02.0" from ribasim_api.ribasim_api import RibasimApi diff --git a/ribasim_qgis/metadata.txt b/ribasim_qgis/metadata.txt index 61134b9ed..2a093277a 100644 --- a/ribasim_qgis/metadata.txt +++ b/ribasim_qgis/metadata.txt @@ -7,7 +7,7 @@ name=Ribasim-QGIS qgisMinimumVersion=3.0 description=QGIS plugin to setup Ribasim models -version=0.7 +version=2024.02.1 author=Deltares and contributors email=ribasim.info@deltares.nl