diff --git a/.cruft.json b/.cruft.json index 818b2016..c6133680 100644 --- a/.cruft.json +++ b/.cruft.json @@ -10,7 +10,7 @@ "project_slug": "ravenpy", "project_short_description": "A Python wrapper to setup and run the hydrologic modelling framework Raven.", "pypi_username": "CSHS-CWRA", - "version": "0.12.2", + "version": "0.12.3", "use_pytest": "y", "use_black": "y", "use_pypi_deployment_with_travis": "y", diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d91cdad7..7aad7bea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,11 +13,10 @@ jobs: black: name: Code linting runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - access_token: ${{ github.token }} - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 490d11e2..1910dbe2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,7 @@ repos: - id: trailing-whitespace exclude: setup.cfg - id: end-of-file-fixer + exclude: setup.cfg - id: check-json - id: check-toml - id: check-yaml @@ -48,7 +49,7 @@ repos: rev: 1.7.0 hooks: - id: nbqa-pyupgrade - args: [ --py38-plus ] + args: [ '--py38-plus' ] additional_dependencies: [ 'pyupgrade==3.10.1' ] - id: nbqa-black additional_dependencies: [ 'black==23.9.1' ] diff --git a/HISTORY.rst b/HISTORY.rst index df8f0a6d..1edfe834 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,8 +2,10 @@ History ======= -0.12.4 (unreleased) +0.12.3 (2023-10-02) ------------------- +* `RavenPy` now uses `platformdirs` to write `raven_testing` to the user's cache directory. Dynamic paths are now used to cache data dependent on the user's operating system. Developers can now safely delete the `.raven_testing_data` folder in their home directory without affecting the functionality of `RavenPy`. +* Updated `raven-hydro` to v0.2.4 to address CMake build issues. Breaking changes ^^^^^^^^^^^^^^^^ @@ -12,18 +14,13 @@ Breaking changes Internal changes ^^^^^^^^^^^^^^^^ +* Added a GitHub Actions workflow to remove obsolete GitHub Workflow cache files. * `RavenPy` now accepts a `RAVENPY_THREDDS_URL` for setting the URL globally to the THREDDS-hosted climate data service. Defaults to `https://pavics.ouranos.ca/twitcher/ows/proxy/thredds`. * `RavenPy` processes and tests that depend on remote GeoServer calls now allow for optional server URL and file location targets. The server URL can be set globally with the following environment variable: * `RAVENPY_GEOSERVER_URL`: URL to the GeoServer-hosted vector/raster data. Defaults to `https://pavics.ouranos.ca/geoserver`. This environment variable was previously called `GEO_URL` but was renamed to narrow its scope to `RavenPy`. * `GEO_URL` is still supported for backward compatibility but may eventually be removed in a future release. * `RavenPy` has temporarily pinned `xarray` below v2023.9.0 due to incompatibilities with `xclim` v0.45.0`. -0.12.3 (2023-08-25) -------------------- -* `RavenPy` now uses `platformdirs` to write `raven_testing` to the user's cache directory. Dynamic paths are now used to cache data dependent on the user's operating system. Developers can now safely delete the `.raven_testing_data` folder in their home directory without affecting the functionality of `RavenPy`. -* Updated `raven-hydro` to v0.2.4 to address CMake build issues. -* Added a workflow to remove obsolete GitHub Workflow cache files. - 0.12.2 (2023-07-04) ------------------- This release is primarily a bugfix to address issues arising from dependencies. diff --git a/ravenpy/__version__.py b/ravenpy/__version__.py index 9c9ef481..f213e71b 100644 --- a/ravenpy/__version__.py +++ b/ravenpy/__version__.py @@ -4,4 +4,4 @@ __author__ = "David Huard" __email__ = "huard.david@ouranos.ca" -__version__ = "0.12.2" +__version__ = "0.12.3" diff --git a/setup.cfg b/setup.cfg index 4331b22f..697227b3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.12.2 +current_version = 0.12.3 commit = True tag = False @@ -66,3 +66,4 @@ statistics = True [pydocstyle] convention = numpy match = ((?!(test_|conftest|conf)).)*\.py + diff --git a/tests/test_calibration.py b/tests/test_calibration.py index e07c5561..0fab3d7e 100644 --- a/tests/test_calibration.py +++ b/tests/test_calibration.py @@ -375,6 +375,7 @@ @pytest.mark.slow +@pytest.mark.xfail(reason="SpotPy Calibration is not entirely stable.") def test_spotpy_calibration(symbolic_config, tmpdir): """Confirm that calibration actually improves the NSE.""" name, cls = symbolic_config @@ -398,6 +399,7 @@ def test_spotpy_calibration(symbolic_config, tmpdir): # d2 = sampler.status.objectivefunction_max # assert d2 > d1 + # FIXME: This step often fails with "CHydroUnit constructor:: HRU 2 has a negative or zero area" error sampler.sample(20, trials=1) assert spot_setup.diagnostics is not None