[Git][debian-gis-team/python-geotiepoints][master] 6 commits: New upstream version 1.7.3
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Apr 20 08:55:19 BST 2024
Antonio Valentino pushed to branch master at Debian GIS Project / python-geotiepoints
Commits:
95fca397 by Antonio Valentino at 2024-04-20T06:54:23+00:00
New upstream version 1.7.3
- - - - -
98d72f75 by Antonio Valentino at 2024-04-20T06:54:57+00:00
Update upstream source from tag 'upstream/1.7.3'
Update to upstream version '1.7.3'
with Debian dir 4ebf41bb4771130e6e719f61c205830eb5deb41a
- - - - -
9f3e3730 by Antonio Valentino at 2024-04-20T06:55:58+00:00
New upstream release
- - - - -
28a58e23 by Antonio Valentino at 2024-04-20T07:01:30+00:00
Refresh all patches
- - - - -
a0e31f18 by Antonio Valentino at 2024-04-20T07:39:26+00:00
New 0002-Compatibility-with-numpy-2.patch
- - - - -
ae7d3b4e by Antonio Valentino at 2024-04-20T07:54:10+00:00
Set distribution to unstable
Changes-By: lintian-brush
Fixes: lintian: trailing-whitespace
See-also: https://lintian.debian.org/tags/trailing-whitespace.html
- - - - -
13 changed files:
- .github/workflows/ci.yaml
- .github/workflows/deploy.yaml
- CHANGELOG.md
- debian/changelog
- debian/patches/0001-Skip-tests-using-external-data.patch
- + debian/patches/0002-Compatibility-with-numpy-2.patch
- debian/patches/series
- geotiepoints/multilinear.py
- geotiepoints/tests/test_interpolator.py
- geotiepoints/tests/test_modis.py
- geotiepoints/tests/test_multilinear.py
- geotiepoints/version.py
- pyproject.toml
Changes:
=====================================
.github/workflows/ci.yaml
=====================================
@@ -42,17 +42,23 @@ jobs:
if: matrix.experimental == true
shell: bash -l {0}
run: |
+ python -m pip install versioneer pkgconfig setuptools-scm; \
+ conda uninstall --force-remove -y scipy h5py pyresample pykdtree pandas xarray; \
python -m pip install \
-f https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ \
+ --trusted-host pypi.anaconda.org \
--no-deps --pre --upgrade \
matplotlib \
numpy \
pandas \
scipy; \
python -m pip install \
- --no-deps --upgrade \
+ --no-deps --upgrade --pre --no-build-isolation \
git+https://github.com/dask/dask \
git+https://github.com/dask/distributed \
+ git+https://github.com/h5py/h5py \
+ git+https://github.com/storpipfugl/pykdtree \
+ git+https://github.com/pytroll/pyresample \
git+https://github.com/zarr-developers/zarr \
git+https://github.com/pydata/bottleneck \
git+https://github.com/pydata/xarray;
=====================================
.github/workflows/deploy.yaml
=====================================
@@ -59,14 +59,11 @@ jobs:
platforms: all
- name: Build wheels
- uses: pypa/cibuildwheel at v2.16.5
+ uses: pypa/cibuildwheel at v2.17.0
env:
CIBW_SKIP: "cp36-* cp37-* cp38-* pp* *-manylinux_i686 *-musllinux_i686 *-musllinux_aarch64 *-win32"
CIBW_ARCHS: "${{ matrix.cibw_archs }}"
CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64"
- # below only for building against unstable numpy
- CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
- CIBW_BEFORE_BUILD: "pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython setuptools versioneer"
- uses: actions/upload-artifact at v4
with:
@@ -104,14 +101,14 @@ jobs:
path: dist
- name: Publish package to Test PyPI
if: github.event.action != 'published' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
- uses: pypa/gh-action-pypi-publish at v1.8.11
+ uses: pypa/gh-action-pypi-publish at v1.8.14
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish package to PyPI
if: github.event.action == 'published'
- uses: pypa/gh-action-pypi-publish at v1.8.11
+ uses: pypa/gh-action-pypi-publish at v1.8.14
with:
user: __token__
password: ${{ secrets.pypi_password }}
=====================================
CHANGELOG.md
=====================================
@@ -1,3 +1,14 @@
+## Version 1.7.3 (2024/04/15)
+
+### Pull Requests Merged
+
+#### Bugs fixed
+
+* [PR 74](https://github.com/pytroll/python-geotiepoints/pull/74) - Build wheels with numpy 2.0rc1 and fix scipy 1.13.0 compatibility
+
+In this release 1 pull request was closed.
+
+
## Version 1.7.2 (2024/02/14)
### Pull Requests Merged
=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+python-geotiepoints (1.7.3-1) unstable; urgency=medium
+
+ * New upstream release.
+ * debian/patches:
+ - Refresh all patches.
+ - New 0002-Compatibility-with-numpy-2.patch.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sat, 20 Apr 2024 07:05:08 +0000
+
python-geotiepoints (1.7.2-1) unstable; urgency=medium
* New upstream release.
=====================================
debian/patches/0001-Skip-tests-using-external-data.patch
=====================================
@@ -10,7 +10,7 @@ Forwarded: not-needed
3 files changed, 15 insertions(+)
diff --git a/geotiepoints/tests/test_modis.py b/geotiepoints/tests/test_modis.py
-index c039683..1f52c76 100644
+index b1532ff..4bc1fd6 100644
--- a/geotiepoints/tests/test_modis.py
+++ b/geotiepoints/tests/test_modis.py
@@ -19,6 +19,7 @@
@@ -19,9 +19,9 @@ index c039683..1f52c76 100644
import os
+import unittest
- FILENAME_250M_RESULT = os.path.join(
- os.path.dirname(__file__), '../../testdata/250m_lonlat_section_result.h5')
-@@ -52,6 +53,8 @@ class TestUtils:
+ import pytest
+
+@@ -54,6 +55,8 @@ class TestUtils:
class TestMODIS:
"""Class for system testing the MODIS interpolation."""
@@ -30,15 +30,15 @@ index c039683..1f52c76 100644
def test_5_to_1(self):
"""Test the 5km to 1km interpolation facility."""
-@@ -68,6 +71,8 @@ class TestMODIS:
+@@ -70,6 +73,8 @@ class TestMODIS:
np.testing.assert_allclose(tlons, glons, atol=0.05)
np.testing.assert_allclose(tlats, glats, atol=0.05)
+ @unittest.skipIf(not os.path.isfile(FILENAME_250M_RESULT), 'deta file not available')
+ @unittest.skipIf(not os.path.isfile(FILENAME_250M_INPUT), 'deta file not available')
- def test_1000m_to_250m(self):
+ @pytest.mark.parametrize("ncores", [None, 4])
+ def test_1000m_to_250m(self, ncores):
"""Test the 1 km to 250 meter interpolation facility."""
-
diff --git a/geotiepoints/tests/test_modisinterpolator.py b/geotiepoints/tests/test_modisinterpolator.py
index 35d5ff5..78ac1ce 100644
--- a/geotiepoints/tests/test_modisinterpolator.py
=====================================
debian/patches/0002-Compatibility-with-numpy-2.patch
=====================================
@@ -0,0 +1,69 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sat, 20 Apr 2024 07:03:50 +0000
+Subject: Compatibility with numpy < 2
+
+Forwarded: not-needed
+---
+ geotiepoints/tests/test_interpolator.py | 14 ++++++++++----
+ pyproject.toml | 2 +-
+ 2 files changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/geotiepoints/tests/test_interpolator.py b/geotiepoints/tests/test_interpolator.py
+index 567e686..9f67a51 100644
+--- a/geotiepoints/tests/test_interpolator.py
++++ b/geotiepoints/tests/test_interpolator.py
+@@ -50,6 +50,12 @@ TIES_EXP1 = np.array([[-2.00000000e+00, -4.00000000e-01, 3.60000000e+00,
+ 2.02000000e+01]])
+
+
++if np.__version__[0] < "2":
++ CUBIC_LEGACY = "cubic"
++else:
++ CUBIC_LEGACY = "cubic_legacy"
++
++
+ class TestInterpolator(unittest.TestCase):
+ """Test the interpolator."""
+
+@@ -349,12 +355,12 @@ class TestSingleGridInterpolator:
+ fine_x = np.arange(16)
+ fine_y = np.arange(32)
+
+- res = grid_interpolator.interpolate((fine_y, fine_x), method="cubic_legacy")
++ res = grid_interpolator.interpolate((fine_y, fine_x), method=CUBIC_LEGACY)
+ np.testing.assert_allclose(res, self.expected, atol=2e-9)
+
+ def test_interpolate_slices(self, grid_interpolator):
+ """Test that interpolation from slices is working."""
+- res = grid_interpolator.interpolate_slices((slice(0, 32), slice(0, 16)), method="cubic_legacy")
++ res = grid_interpolator.interpolate_slices((slice(0, 32), slice(0, 16)), method=CUBIC_LEGACY)
+ np.testing.assert_allclose(res, self.expected, atol=2e-9)
+
+ @pytest.mark.parametrize("chunks, expected_chunks", [(10, (10, 10)),
+@@ -369,7 +375,7 @@ class TestSingleGridInterpolator:
+ with mock.patch.object(grid_interpolator,
+ "interpolate_numpy",
+ wraps=grid_interpolator.interpolate_numpy) as interpolate:
+- res = grid_interpolator.interpolate((fine_y, fine_x), method="cubic_legacy", chunks=chunks)
++ res = grid_interpolator.interpolate((fine_y, fine_x), method=CUBIC_LEGACY, chunks=chunks)
+ assert not interpolate.called
+
+ assert isinstance(res, da.Array)
+@@ -395,5 +401,5 @@ class TestSingleGridInterpolator:
+ fine_x = np.arange(16)
+ fine_y = np.arange(32)
+
+- res = grid_interpolator.interpolate((fine_y, fine_x), method="cubic_legacy")
++ res = grid_interpolator.interpolate((fine_y, fine_x), method=CUBIC_LEGACY)
+ assert res.dtype == data.dtype
+diff --git a/pyproject.toml b/pyproject.toml
+index 57e52e0..04eafb3 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["setuptools", "wheel", "numpy>=2.0.0rc1,<3", "Cython>=3", "versioneer"]
++requires = ["setuptools", "wheel", "numpy", "Cython>=3", "versioneer"]
+ build-backend = "setuptools.build_meta"
+
+ [tool.coverage.run]
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
0001-Skip-tests-using-external-data.patch
+0002-Compatibility-with-numpy-2.patch
=====================================
geotiepoints/multilinear.py
=====================================
@@ -13,7 +13,7 @@ def mlinspace(smin, smax, orders):
else:
meshes = np.meshgrid(
*[np.linspace(smin[i], smax[i], orders[i]) for i in range(len(orders))], indexing='ij')
- return np.row_stack([l.flatten() for l in meshes])
+ return np.vstack([l.flatten() for l in meshes])
class MultilinearInterpolator:
@@ -44,8 +44,8 @@ class MultilinearInterpolator:
smax = [1,1]
orders = [5,5]
- f = lambda x: np.row_stack([np.sqrt( x[0,:]**2 + x[1,:]**2 ),
- np.power( x[0,:]**3 + x[1,:]**3, 1.0/3.0 )])
+ f = lambda x: np.vstack([np.sqrt( x[0,:]**2 + x[1,:]**2 ),
+ np.power( x[0,:]**3 + x[1,:]**3, 1.0/3.0 )])
interp = MultilinearInterpolator(smin,smax,orders)
interp.set_values( f(interp.grid) )
@@ -59,9 +59,9 @@ class MultilinearInterpolator:
__grid__ = None
def __init__(self, smin, smax, orders, values=None, dtype=np.float64):
- self.smin = np.array(smin, dtype=dtype, copy=False)
- self.smax = np.array(smax, dtype=dtype, copy=False)
- self.orders = np.array(orders, dtype=np.int_, copy=False)
+ self.smin = np.asarray(smin, dtype=dtype)
+ self.smax = np.asarray(smax, dtype=dtype)
+ self.orders = np.asarray(orders, dtype=np.int_)
self.d = len(orders)
self.dtype = dtype
if values is not None:
=====================================
geotiepoints/tests/test_interpolator.py
=====================================
@@ -349,12 +349,12 @@ class TestSingleGridInterpolator:
fine_x = np.arange(16)
fine_y = np.arange(32)
- res = grid_interpolator.interpolate((fine_y, fine_x), method="cubic")
+ res = grid_interpolator.interpolate((fine_y, fine_x), method="cubic_legacy")
np.testing.assert_allclose(res, self.expected, atol=2e-9)
def test_interpolate_slices(self, grid_interpolator):
"""Test that interpolation from slices is working."""
- res = grid_interpolator.interpolate_slices((slice(0, 32), slice(0, 16)), method="cubic")
+ res = grid_interpolator.interpolate_slices((slice(0, 32), slice(0, 16)), method="cubic_legacy")
np.testing.assert_allclose(res, self.expected, atol=2e-9)
@pytest.mark.parametrize("chunks, expected_chunks", [(10, (10, 10)),
@@ -369,7 +369,7 @@ class TestSingleGridInterpolator:
with mock.patch.object(grid_interpolator,
"interpolate_numpy",
wraps=grid_interpolator.interpolate_numpy) as interpolate:
- res = grid_interpolator.interpolate((fine_y, fine_x), method="cubic", chunks=chunks)
+ res = grid_interpolator.interpolate((fine_y, fine_x), method="cubic_legacy", chunks=chunks)
assert not interpolate.called
assert isinstance(res, da.Array)
@@ -395,5 +395,5 @@ class TestSingleGridInterpolator:
fine_x = np.arange(16)
fine_y = np.arange(32)
- res = grid_interpolator.interpolate((fine_y, fine_x), method="cubic")
+ res = grid_interpolator.interpolate((fine_y, fine_x), method="cubic_legacy")
assert res.dtype == data.dtype
=====================================
geotiepoints/tests/test_modis.py
=====================================
@@ -20,6 +20,8 @@ import numpy as np
import h5py
import os
+import pytest
+
FILENAME_250M_RESULT = os.path.join(
os.path.dirname(__file__), '../../testdata/250m_lonlat_section_result.h5')
FILENAME_250M_INPUT = os.path.join(
@@ -68,8 +70,12 @@ class TestMODIS:
np.testing.assert_allclose(tlons, glons, atol=0.05)
np.testing.assert_allclose(tlats, glats, atol=0.05)
- def test_1000m_to_250m(self):
+ @pytest.mark.parametrize("ncores", [None, 4])
+ def test_1000m_to_250m(self, ncores):
"""Test the 1 km to 250 meter interpolation facility."""
+ if ncores:
+ import multiprocessing as mp
+ mp.set_start_method("spawn", force=True)
with h5py.File(FILENAME_250M_RESULT) as h5f:
glons = h5f['longitude'][:] / 1000.
@@ -79,10 +85,7 @@ class TestMODIS:
lons = h5f['longitude'][:] / 1000.
lats = h5f['latitude'][:] / 1000.
- tlons, tlats = modis1kmto250m(lons, lats)
- np.testing.assert_allclose(tlons, glons, atol=0.05)
- np.testing.assert_allclose(tlats, glats, atol=0.05)
-
- tlons, tlats = modis1kmto250m(lons, lats, cores=4)
+ kwargs = {"cores": ncores} if ncores is not None else {}
+ tlons, tlats = modis1kmto250m(lons, lats, **kwargs)
np.testing.assert_allclose(tlons, glons, atol=0.05)
np.testing.assert_allclose(tlats, glats, atol=0.05)
=====================================
geotiepoints/tests/test_multilinear.py
=====================================
@@ -70,7 +70,7 @@ class TestMultilinearInterpolator(unittest.TestCase):
smax = [1, 1]
orders = [5, 5]
- f = lambda x: np.row_stack([
+ f = lambda x: np.vstack([
np.sqrt(x[0, :]**2 + x[1, :]**2),
np.power(x[0, :]**3 + x[1, :]**3, 1.0 / 3.0)
])
=====================================
geotiepoints/version.py
=====================================
@@ -26,9 +26,9 @@ def get_keywords():
# setup.py/versioneer.py will grep for the variable names, so they must
# each be defined on a line of their own. _version.py will just call
# get_keywords().
- git_refnames = " (HEAD -> main, tag: v1.7.2)"
- git_full = "5fabadb7b11aabeb06020044ca79e7f8a862456a"
- git_date = "2024-02-14 14:16:40 -0600"
+ git_refnames = " (HEAD -> main, tag: v1.7.3)"
+ git_full = "2d67be201f1fd54374c72865e284689404fbfd94"
+ git_date = "2024-04-15 21:09:21 -0500"
keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
return keywords
=====================================
pyproject.toml
=====================================
@@ -1,5 +1,5 @@
[build-system]
-requires = ["setuptools", "wheel", "oldest-supported-numpy", "Cython>=3", "versioneer"]
+requires = ["setuptools", "wheel", "numpy>=2.0.0rc1,<3", "Cython>=3", "versioneer"]
build-backend = "setuptools.build_meta"
[tool.coverage.run]
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-geotiepoints/-/compare/3133184446fa83ee8673ddf9e57a6c381b4471ec...ae7d3b4ea131bcc5789cfccf0274d6e2c2ac7779
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-geotiepoints/-/compare/3133184446fa83ee8673ddf9e57a6c381b4471ec...ae7d3b4ea131bcc5789cfccf0274d6e2c2ac7779
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20240420/105216b1/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list