[Git][debian-gis-team/pyresample][upstream] New upstream version 1.22.3

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Wed Dec 8 10:40:37 GMT 2021



Antonio Valentino pushed to branch upstream at Debian GIS Project / pyresample


Commits:
76f2e2d1 by Antonio Valentino at 2021-12-08T09:33:21+00:00
New upstream version 1.22.3
- - - - -


10 changed files:

- .github/workflows/deploy.yaml
- CHANGELOG.md
- docs/source/conf.py
- pyresample/bilinear/_base.py
- pyresample/ewa/dask_ewa.py
- pyresample/image.py
- pyresample/test/test_dask_ewa.py
- pyresample/test/test_spherical.py
- pyresample/test/test_swath.py
- pyresample/version.py


Changes:

=====================================
.github/workflows/deploy.yaml
=====================================
@@ -5,7 +5,12 @@ concurrency:
   group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.type }}
   cancel-in-progress: true
 
-on: [push, pull_request, release]
+on:
+  push:
+  pull_request:
+  release:
+    types:
+      - published
 
 jobs:
   build_sdist:
@@ -93,8 +98,8 @@ jobs:
   upload_test_pypi:
     needs: [build_sdist, build_wheels]
     runs-on: ubuntu-latest
-    # upload to Test PyPI for every commit on main branch
-    if: github.event_name == 'push' && github.event.ref == 'refs/heads/main'
+    # upload to PyPI on every tag starting with 'v'
+    if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
     steps:
       - name: Download sdist artifact
         uses: actions/download-artifact at v2


=====================================
CHANGELOG.md
=====================================
@@ -1,3 +1,28 @@
+## Version 1.22.3 (2021/12/07)
+
+### Issues Closed
+
+* [Issue 375](https://github.com/pytroll/pyresample/issues/375) - Importing pyresample without having Xarray and/or zarray raises UserWarning ([PR 400](https://github.com/pytroll/pyresample/pull/400) by [@yunjunz](https://github.com/yunjunz))
+* [Issue 318](https://github.com/pytroll/pyresample/issues/318) - Add fill_value keyword argument for AreaDefinition.get_lonlats
+* [Issue 231](https://github.com/pytroll/pyresample/issues/231) - Copyright notice out of date ([PR 403](https://github.com/pytroll/pyresample/pull/403) by [@gerritholl](https://github.com/gerritholl))
+
+In this release 3 issues were closed.
+
+### Pull Requests Merged
+
+#### Bugs fixed
+
+* [PR 404](https://github.com/pytroll/pyresample/pull/404) - Fix dask EWA code not creating unique dask task names for different target areas
+* [PR 400](https://github.com/pytroll/pyresample/pull/400) - Move bilinear import to avoid unnecessary warning ([375](https://github.com/pytroll/pyresample/issues/375))
+* [PR 399](https://github.com/pytroll/pyresample/pull/399) - Fix deprecated numpy data type usage in bilinear resampling
+
+#### Documentation changes
+
+* [PR 403](https://github.com/pytroll/pyresample/pull/403) - Update copyright note in documentation ([231](https://github.com/pytroll/pyresample/issues/231))
+
+In this release 4 pull requests were closed.
+
+
 ## Version 1.22.2 (2021/12/03)
 
 ### Pull Requests Merged


=====================================
docs/source/conf.py
=====================================
@@ -14,6 +14,7 @@
 
 import os
 import sys
+from datetime import datetime
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
@@ -69,7 +70,7 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'pyresample'
-copyright = u'2013, Esben S. Nielsen'
+copyright = f"2013-{datetime.utcnow():%Y}, Pyresample developers"
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the


=====================================
pyresample/bilinear/_base.py
=====================================
@@ -217,7 +217,7 @@ class BilinearBase(object):
                                    self._radius_of_influence)
         input_coords = lonlat2xyz(source_lons, source_lats)
         valid_input_index = np.ravel(valid_input_index)
-        input_coords = input_coords[valid_input_index, :].astype(np.float)
+        input_coords = input_coords[valid_input_index, :].astype(np.float64)
 
         return valid_input_index, input_coords
 


=====================================
pyresample/ewa/dask_ewa.py
=====================================
@@ -350,7 +350,7 @@ class DaskEWAResampler(BaseResampler):
         ll2cr_result = self.cache['ll2cr_result']
         ll2cr_blocks = self.cache['ll2cr_blocks'].items()
         ll2cr_numblocks = ll2cr_result.shape if isinstance(ll2cr_result, np.ndarray) else ll2cr_result.numblocks
-        fornav_task_name = "fornav-{}".format(data.name)
+        fornav_task_name = f"fornav-{data.name}-{ll2cr_result.name}"
         maximum_weight_mode = kwargs.setdefault('maximum_weight_mode', False)
         weight_sum_min = kwargs.setdefault('weight_sum_min', -1.0)
         output_stack = self._generate_fornav_dask_tasks(out_chunks,


=====================================
pyresample/image.py
=====================================
@@ -23,7 +23,7 @@ import warnings
 
 import numpy as np
 
-from pyresample import bilinear, geometry, grid, kd_tree
+from pyresample import geometry, grid, kd_tree
 
 
 class ImageContainer(object):
@@ -368,6 +368,10 @@ class ImageContainerBilinear(ImageContainer):
         image_container : object
             ImageContainerBilinear object of resampled geometry
         """
+        # import here, instead of the top of the script, to avoid xarray/zarr warning msg
+        # while import the top level pyresample module
+        from pyresample import bilinear
+
         image_data = self.image_data
 
         try:


=====================================
pyresample/test/test_dask_ewa.py
=====================================
@@ -357,3 +357,20 @@ class TestDaskEWAResampler:
         exp_exc = ValueError if len(input_shape) != 4 else NotImplementedError
         with pytest.raises(exp_exc):
             resampler.resample(swath_data, rows_per_scan=10)
+
+    def test_multiple_targets(self):
+        """Test that multiple targets produce unique results."""
+        input_shape = (100, 50)
+        output_shape = (200, 100)
+        swath_data, source_swath, target_area1 = get_test_data(
+            input_shape=input_shape, output_shape=output_shape,
+        )
+        target_area2 = _get_test_target_area((250, 150))
+
+        resampler1 = DaskEWAResampler(source_swath, target_area1)
+        res1 = resampler1.resample(swath_data, rows_per_scan=10)
+        resampler2 = DaskEWAResampler(source_swath, target_area2)
+        res2 = resampler2.resample(swath_data, rows_per_scan=10)
+
+        assert res1.name != res2.name
+        assert res1.compute().shape != res2.compute().shape


=====================================
pyresample/test/test_spherical.py
=====================================
@@ -112,7 +112,7 @@ class TestSCoordinate(unittest.TestCase):
     def test_distance(self):
         """Test Vincenty formula."""
         d = SCoordinate(0, 0).distance(SCoordinate(1, 1))
-        self.assertEqual(d, 1.2745557823062943)
+        np.testing.assert_equal(d, 1.2745557823062943)
 
     def test_hdistance(self):
         """Test Haversine formula."""


=====================================
pyresample/test/test_swath.py
=====================================
@@ -18,7 +18,6 @@
 """Test resampling swath definitions."""
 
 import os
-import sys
 import unittest
 import warnings
 
@@ -57,12 +56,10 @@ class Test(unittest.TestCase):
             self.assertFalse(('Possible more' not in str(
                 w[0].message)), 'Failed to create correct neighbour radius warning')
 
-        if sys.platform == 'darwin':
-            # OSX seems to get slightly different results for `_spatial_mp.Cartesian`
-            truth_value = 668848.144817
-        else:
-            truth_value = 668848.082208
-        self.assertAlmostEqual(res.sum() / 100., truth_value, 1,
+        # only compare the whole number as different OSes and versions of numpy
+        # can produce slightly different results
+        truth_value = 668848.0
+        self.assertAlmostEqual(res.sum() / 100., truth_value, 0,
                                msg='Failed self mapping swath for 1 channel')
 
     def test_self_map_multi(self):
@@ -77,14 +74,10 @@ class Test(unittest.TestCase):
             self.assertFalse(('Possible more' not in str(
                 w[0].message)), 'Failed to create correct neighbour radius warning')
 
-        if sys.platform == 'darwin':
-            # OSX seems to get slightly different results for `_spatial_mp.Cartesian`
-            truth_value = 668848.144817
-        else:
-            truth_value = 668848.082208
-        self.assertAlmostEqual(res[:, 0].sum() / 100., truth_value, 1,
+        truth_value = 668848.0
+        self.assertAlmostEqual(res[:, 0].sum() / 100., truth_value, 0,
                                msg='Failed self mapping swath multi for channel 1')
-        self.assertAlmostEqual(res[:, 1].sum() / 100., truth_value, 1,
+        self.assertAlmostEqual(res[:, 1].sum() / 100., truth_value, 0,
                                msg='Failed self mapping swath multi for channel 2')
-        self.assertAlmostEqual(res[:, 2].sum() / 100., truth_value, 1,
+        self.assertAlmostEqual(res[:, 2].sum() / 100., truth_value, 0,
                                msg='Failed self mapping swath multi for channel 3')


=====================================
pyresample/version.py
=====================================
@@ -23,9 +23,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.22.2)"
-    git_full = "0b35d70040062e95c5862f3fc8d42a2dc987391e"
-    git_date = "2021-12-03 13:02:48 -0600"
+    git_refnames = " (HEAD -> main, tag: v1.22.3)"
+    git_full = "3e8d2442790455493e6c376408e90607bd485aad"
+    git_date = "2021-12-07 20:02:34 -0600"
     keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
     return keywords
 



View it on GitLab: https://salsa.debian.org/debian-gis-team/pyresample/-/commit/76f2e2d136ab3cdce621edf3dac3ab1f2a50a70c

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyresample/-/commit/76f2e2d136ab3cdce621edf3dac3ab1f2a50a70c
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/20211208/232a4cb7/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list