Skip to content

Commit 3ba14b0

Browse files
authored
Merge pull request #295 from CSHS-CWRA/fix_pydantic
Pin Pydantic below v2.0, pin numpy below v1.25, update raven-hydro to v0.2.3, prepare release v0.12.2
2 parents 496cd15 + 32637a5 commit 3ba14b0

10 files changed

+40
-22
lines changed

.cruft.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"project_slug": "ravenpy",
1111
"project_short_description": "A Python wrapper to setup and run the hydrologic modelling framework Raven.",
1212
"pypi_username": "CSHS-CWRA",
13-
"version": "0.12.1",
13+
"version": "0.12.2",
1414
"use_pytest": "y",
1515
"use_black": "y",
1616
"use_pypi_deployment_with_travis": "y",

.github/workflows/main.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,21 @@ jobs:
4040
- tox-env: py38
4141
python-version: "3.8"
4242
os: ubuntu-latest
43-
allow-errors: false
43+
- tox-env: py38
44+
python-version: "3.8"
45+
os: macos-latest
4446
- tox-env: py39
4547
python-version: "3.9"
4648
os: ubuntu-latest
47-
allow-errors: false
4849
- tox-env: py310
4950
python-version: "3.10"
5051
os: ubuntu-latest
51-
allow-errors: false
5252
- tox-env: py311
5353
python-version: "3.11"
5454
os: ubuntu-latest
55-
allow-errors: false
56-
- tox-env: py310
57-
python-version: "3.10"
55+
- tox-env: py311
56+
python-version: "3.11"
5857
os: macos-latest
59-
allow-errors: true
6058
steps:
6159
- uses: actions/checkout@v3
6260
- name: Set up Python ${{ matrix.python-version }}
@@ -90,7 +88,6 @@ jobs:
9088
- name: Test with tox and report coverage
9189
run: |
9290
python3 -m tox -e ${{ matrix.tox-env }}
93-
continue-on-error: ${{ matrix.allow-errors }}
9491
env:
9592
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9693
COVERALLS_FLAG_NAME: run-${{ matrix.tox-env }}

HISTORY.rst

+15-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,23 @@
22
History
33
=======
44

5+
0.12.2 (2023-07-04)
6+
-------------------
7+
This release is primarily a bugfix to address issues arising from dependencies.
8+
9+
Breaking changes
10+
^^^^^^^^^^^^^^^^
11+
* `raven-hydro` version has been bumped from v0.2.1 to v0.2.3. This version provides better support for builds on Windows and MacOS.
12+
* Due to major breaking changes, `pydantic` has been pinned below v2.0 until changes can be made to adapt to their new API.
13+
* `numpy` has been pinned below v1.25.0 to ensure compatibility with `numba`.
14+
15+
Internal changes
16+
^^^^^^^^^^^^^^^^
17+
* ``test_geoserver::test_select_hybas_ar_domain_point`` is now temporarily skipped when testing on MacOS due to a mysterious domain identification error.
18+
519
0.12.1 (2023-06-01)
620
-------------------
7-
This release is largely a bugfix to better stabilize performance and enhance the documentation.
21+
This release is largely a bugfix to better stabilize performance and enhance the documentation.
822

923
* Avoid repeatedly calling `xr.open_dataset` in `OutputReader`'s `hydrograph` and `storage` properties. This seems to cause kernel failures in Jupyter notebooks.
1024

environment-rtd.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
- defaults
55
dependencies:
66
- python >=3.9,<3.10 # fixed to reduce solver time
7-
- raven-hydro ==0.2.1
7+
- raven-hydro ==0.2.3
88
- autodoc-pydantic
99
- click
1010
# - clisops # mocked
@@ -19,7 +19,7 @@ dependencies:
1919
# - netCDF4 # mocked
2020
- notebook
2121
- pandoc
22-
- pydantic
22+
- pydantic >=1.10.8,<2.0
2323
- seaborn
2424
- sphinx
2525
- sphinx-autoapi

environment.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6-
- raven-hydro ==0.2.1
76
- python >=3.8,<3.12
7+
- raven-hydro ==0.2.3
88
- affine
99
- cftime
1010
- cf_xarray
@@ -21,12 +21,12 @@ dependencies:
2121
- lxml
2222
- matplotlib
2323
- netcdf4
24-
- numpy
24+
- numpy <1.25
2525
- owslib <0.29.0 # see: https://github.com/geopython/OWSLib/issues/871
2626
- pandas
2727
- pint >=0.20
2828
- pre-commit
29-
- pydantic
29+
- pydantic >=1.10.8,<2.0
3030
- pymbolic
3131
- pyogrio
3232
- pyproj >=3.0

pyproject.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ dependencies = [
4343
"haversine",
4444
"matplotlib",
4545
"netCDF4",
46-
"numpy",
46+
"numpy<1.25",
4747
"owslib>=0.24.1,<0.29", # see: https://github.com/geopython/OWSLib/issues/871
4848
"pandas<2.0; python_version == '3.8'",
4949
"pandas; python_version >= '3.9'",
5050
"pint>=0.20",
51-
"pydantic>=1.10.8",
51+
"pydantic>=1.10.8,<2.0",
5252
"pymbolic",
53-
"raven-hydro==0.2.1",
53+
"raven-hydro==0.2.3",
5454
"requests",
5555
"scipy",
5656
"spotpy",

ravenpy/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
__author__ = "David Huard"
66
__email__ = "[email protected]"
7-
__version__ = "0.12.1"
7+
__version__ = "0.12.2"

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.12.1
2+
current_version = 0.12.2
33
commit = True
44
tag = False
55

tests/test_geoserver.py

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import os
2+
import sys
13
import tempfile
24
import urllib.request
35

@@ -21,6 +23,13 @@ def test_select_hybas_na_domain_bbox(self):
2123
dom = self.geoserver.select_hybas_domain(bbox=bbox)
2224
assert dom == "na"
2325

26+
27+
if os.getenv("CONDA_DEFAULT_ENV") == "raven-dev":
28+
# FIXME: Investigate why this fails for macOS on PyPI.
29+
@pytest.mark.skip(
30+
sys.platform == "darwin" and not os.getenv("CONDA_PREFIX"),
31+
reason="Fails on MacOS w/ PyPI",
32+
)
2433
def test_select_hybas_ar_domain_point(self):
2534
point = -114.65, 61.35
2635
dom = self.geoserver.select_hybas_domain(point=point)

tox.ini

-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ commands =
5454
python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir netcdf4==1.5.8 --no-binary netcdf4
5555
# Rebuild GDAL in order to gain access to GDAL system-level objects
5656
python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir gdal=={env:GDAL_VERSION} --no-binary gdal
57-
# Build raven-hydro from source distribution
58-
python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir raven-hydro==0.2.0 --no-binary raven-hydro
5957
# Run tests
6058
pytest --cov
6159
# Coveralls requires access to a repo token set in .coveralls.yml in order to report stats

0 commit comments

Comments
 (0)