Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare v0.12.3 #314

Merged
merged 7 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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' ]
Expand Down
11 changes: 4 additions & 7 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
^^^^^^^^^^^^^^^^
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ravenpy/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

__author__ = "David Huard"
__email__ = "[email protected]"
__version__ = "0.12.2"
__version__ = "0.12.3"
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.12.2
current_version = 0.12.3
commit = True
tag = False

Expand Down Expand Up @@ -66,3 +66,4 @@ statistics = True
[pydocstyle]
convention = numpy
match = ((?!(test_|conftest|conf)).)*\.py

2 changes: 2 additions & 0 deletions tests/test_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@


@pytest.mark.slow
@pytest.mark.xfail(reason="SpotPy Calibration is not entirely stable.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite weird though. What kind of instabilities are we talking about ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one of the tests that "sometimes" fails, regardless of build environment. There are a handful of tests that are not threadsafe, but because they kill the pytest workers when they fail, there's no way to mark them as xfailable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't be surprised if the failures are due to the longstanding libnetcdf issues with asynchronous read of NetCDF4 files.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, it seems this test can also fail with a crash as well:
image

def test_spotpy_calibration(symbolic_config, tmpdir):
"""Confirm that calibration actually improves the NSE."""
name, cls = symbolic_config
Expand All @@ -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

Expand Down