[Git][debian-gis-team/python-geotiepoints][upstream] New upstream version 1.7.3

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Sat Apr 20 08:55:39 BST 2024



Antonio Valentino pushed to branch upstream 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
- - - - -


9 changed files:

- .github/workflows/ci.yaml
- .github/workflows/deploy.yaml
- CHANGELOG.md
- 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


=====================================
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/-/commit/95fca3970437f8df2a4f090af4c34ff39000260c

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-geotiepoints/-/commit/95fca3970437f8df2a4f090af4c34ff39000260c
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/d1a2c13f/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list