From ac35a38459cbcf8e5c33a73cc9813a5cd6bc4cb0 Mon Sep 17 00:00:00 2001 From: gampnico <45390064+gampnico@users.noreply.github.com> Date: Fri, 13 Mar 2026 13:48:09 +0000 Subject: [PATCH 1/9] refactor: update tests file and versioning --- .github/workflows/run-tests.yml | 6 ++++-- pyproject.toml | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 7d52a70..d0cb3c4 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -18,6 +18,8 @@ jobs: - py310-all - py311-all - py312-all + - py313-all + - py314-all use-mpl: - "--mpl --mpl-results-path=/tmp/salem-mpl-results" include: @@ -31,7 +33,7 @@ jobs: shell: bash -leo pipefail {0} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Conda uses: conda-incubator/setup-miniconda@v3 with: @@ -60,7 +62,7 @@ jobs: run: coveralls - name: Upload pytest-mpl artifacts if: "${{ failure() && matrix.use-mpl != '' }}" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: "pytest-mpl-results-${{ matrix.test-env }}" path: /tmp/salem-mpl-results/ diff --git a/pyproject.toml b/pyproject.toml index db9de26..b0e7675 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,9 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] requires-python = ">=3.8" dependencies = [ From ea0b3f1298ac25d12251cf00b2b4f55a1204a1ba Mon Sep 17 00:00:00 2001 From: gampnico <45390064+gampnico@users.noreply.github.com> Date: Fri, 13 Mar 2026 14:35:56 +0000 Subject: [PATCH 2/9] fix(tests): remove skip decorators for passing tests --- salem/tests/test_graphics.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/salem/tests/test_graphics.py b/salem/tests/test_graphics.py index 63f3c89..bca809d 100644 --- a/salem/tests/test_graphics.py +++ b/salem/tests/test_graphics.py @@ -972,7 +972,6 @@ def test_lookup_transform(): @requires_matplotlib @requires_cartopy @pytest.mark.mpl_image_compare(baseline_dir=baseline_dir, tolerance=10) -@pytest.mark.skip(reason='There is an unknown issue with cartopy') def test_cartopy(): import cartopy @@ -1022,7 +1021,6 @@ def test_cartopy(): @requires_cartopy @pytest.mark.mpl_image_compare(baseline_dir=baseline_dir, tolerance=7) -@pytest.mark.skip(reason='There is an unknown issue with cartopy') def test_cartopy_polar(): import cartopy From 43cb670750aec8ba46ea534c643b21ccfee14d53 Mon Sep 17 00:00:00 2001 From: gampnico <45390064+gampnico@users.noreply.github.com> Date: Mon, 16 Mar 2026 08:14:10 +0000 Subject: [PATCH 3/9] fix: add ci requirements --- ci/requirements-py313-all.yml | 26 ++++++++++++++++++++++++++ ci/requirements-py314-all.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 ci/requirements-py313-all.yml create mode 100644 ci/requirements-py314-all.yml diff --git a/ci/requirements-py313-all.yml b/ci/requirements-py313-all.yml new file mode 100644 index 0000000..d39a736 --- /dev/null +++ b/ci/requirements-py313-all.yml @@ -0,0 +1,26 @@ +name: test_env +channels: + - conda-forge +dependencies: + - python=3.13 + - numpy + - scipy + - pyproj + - joblib + - netCDF4 + - shapely + - geopandas + - rasterio + - pandas + - xarray + - dask + - matplotlib + - scikit-image + - Pillow + - cartopy + - pip + - pip: + - coveralls==3.2.0 + - pytest-cov + - pytest-mpl + - motionless diff --git a/ci/requirements-py314-all.yml b/ci/requirements-py314-all.yml new file mode 100644 index 0000000..7ae04f9 --- /dev/null +++ b/ci/requirements-py314-all.yml @@ -0,0 +1,26 @@ +name: test_env +channels: + - conda-forge +dependencies: + - python=3.14 + - numpy + - scipy + - pyproj + - joblib + - netCDF4 + - shapely + - geopandas + - rasterio + - pandas + - xarray + - dask + - matplotlib + - scikit-image + - Pillow + - cartopy + - pip + - pip: + - coveralls==3.2.0 + - pytest-cov + - pytest-mpl + - motionless From d556358c1b473f0d4f9b40a3fe5e6ca220e99297 Mon Sep 17 00:00:00 2001 From: gampnico <45390064+gampnico@users.noreply.github.com> Date: Tue, 17 Mar 2026 09:16:33 +0000 Subject: [PATCH 4/9] fix: test failing due to inconsistent ticks --- salem/tests/test_graphics.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/salem/tests/test_graphics.py b/salem/tests/test_graphics.py index af38647..e936a2a 100644 --- a/salem/tests/test_graphics.py +++ b/salem/tests/test_graphics.py @@ -934,6 +934,8 @@ def test_colormaps(): cb = mpl.colorbar.ColorbarBase(ax, cmap=get_cmap(cm), orientation='horizontal') cb.set_label(cm); + # force identical ticks to baseline, since we want to check the colours + cb.set_ticks(np.arange(0, 1.1, 0.1)) return fig @@ -1007,7 +1009,7 @@ def test_cartopy(): ds = ds.T2C.mean(dim='time', keep_attrs=True) ax = plt.subplot(3, 2, 5) - smap = ds.salem.quick_map(ax=ax, factor=1) + smap = ds.salem.quick_map(ax=ax, factor=.5) ax.scatter(ds.lon, ds.lat, transform=smap.transform(ax=ax)) p = ds.salem.cartopy() From 76b5f8d86a438793859db0c0ef272b4e8c78d579 Mon Sep 17 00:00:00 2001 From: gampnico <45390064+gampnico@users.noreply.github.com> Date: Thu, 19 Mar 2026 11:57:52 +0000 Subject: [PATCH 5/9] fix: revert factor in test --- salem/tests/test_graphics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salem/tests/test_graphics.py b/salem/tests/test_graphics.py index e936a2a..0353a89 100644 --- a/salem/tests/test_graphics.py +++ b/salem/tests/test_graphics.py @@ -1009,7 +1009,7 @@ def test_cartopy(): ds = ds.T2C.mean(dim='time', keep_attrs=True) ax = plt.subplot(3, 2, 5) - smap = ds.salem.quick_map(ax=ax, factor=.5) + smap = ds.salem.quick_map(ax=ax, factor=1) ax.scatter(ds.lon, ds.lat, transform=smap.transform(ax=ax)) p = ds.salem.cartopy() From ba7147fe6351735d8e78dd2aad136b6f232a91a0 Mon Sep 17 00:00:00 2001 From: gampnico <45390064+gampnico@users.noreply.github.com> Date: Thu, 19 Mar 2026 12:14:57 +0000 Subject: [PATCH 6/9] tests: revert skip decorators --- salem/tests/test_graphics.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/salem/tests/test_graphics.py b/salem/tests/test_graphics.py index 0353a89..28ff751 100644 --- a/salem/tests/test_graphics.py +++ b/salem/tests/test_graphics.py @@ -974,6 +974,7 @@ def test_lookup_transform(): @requires_matplotlib @requires_cartopy @pytest.mark.mpl_image_compare(baseline_dir=baseline_dir, tolerance=10) +@pytest.mark.skip(reason='There is an unknown issue with cartopy') def test_cartopy(): import cartopy @@ -1023,6 +1024,7 @@ def test_cartopy(): @requires_cartopy @pytest.mark.mpl_image_compare(baseline_dir=baseline_dir, tolerance=7) +@pytest.mark.skip(reason='There is an unknown issue with cartopy') def test_cartopy_polar(): import cartopy From 97329cc20139d94039e48ab8ab1d57c24f55a8a3 Mon Sep 17 00:00:00 2001 From: gampnico <45390064+gampnico@users.noreply.github.com> Date: Thu, 19 Mar 2026 12:20:53 +0000 Subject: [PATCH 7/9] docs: update whats-new --- docs/whats-new.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/whats-new.rst b/docs/whats-new.rst index 10c5d24..3024793 100644 --- a/docs/whats-new.rst +++ b/docs/whats-new.rst @@ -5,7 +5,8 @@ What's New v0.3.x (Unreleased) ------------------- - +- address deprecations, including dropping support for numpy and pandas below +versions 2.0 (:pull:`259`). v0.3.11 (12 July 2024) ---------------------- From 28ec571f988de39182dc96d516aa064ee95e12e5 Mon Sep 17 00:00:00 2001 From: gampnico <45390064+gampnico@users.noreply.github.com> Date: Wed, 25 Mar 2026 12:16:44 +0000 Subject: [PATCH 8/9] fix: update sample data hash to point to new image Ref: #259 --- salem/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salem/__init__.py b/salem/__init__.py index 6207420..692240e 100644 --- a/salem/__init__.py +++ b/salem/__init__.py @@ -39,7 +39,7 @@ def _lazy_property(self): if not path.exists(download_dir): makedirs(download_dir) -sample_data_gh_commit = '77d826a80cf7afec213df06fb33c31491bbd049d' +sample_data_gh_commit = '5dae2f6aa189ab9b6c6f2292c8933ef3902f0a49' sample_data_dir = path.join(cache_dir, 'salem-sample-data-' + sample_data_gh_commit) From da6640127cb45af38e1dc3c189fd133cf29f5e36 Mon Sep 17 00:00:00 2001 From: gampnico <45390064+gampnico@users.noreply.github.com> Date: Wed, 25 Mar 2026 14:31:13 +0000 Subject: [PATCH 9/9] tests: update sample data hash --- salem/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salem/__init__.py b/salem/__init__.py index 692240e..6d6e703 100644 --- a/salem/__init__.py +++ b/salem/__init__.py @@ -39,7 +39,7 @@ def _lazy_property(self): if not path.exists(download_dir): makedirs(download_dir) -sample_data_gh_commit = '5dae2f6aa189ab9b6c6f2292c8933ef3902f0a49' +sample_data_gh_commit = '8ad39d156828af1aff54db327bd6855d1335fde4' sample_data_dir = path.join(cache_dir, 'salem-sample-data-' + sample_data_gh_commit)