[Git][debian-gis-team/satpy][master] 2 commits: Fix compatibility with new trollimage
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Sep 16 12:22:25 BST 2023
Antonio Valentino pushed to branch master at Debian GIS Project / satpy
Commits:
e11866fe by Antonio Valentino at 2023-09-16T11:21:08+00:00
Fix compatibility with new trollimage
- - - - -
73940992 by Antonio Valentino at 2023-09-16T11:21:37+00:00
Set distribution to unstable
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/0008-Fix-colormap-based-tests-with-new-version-of-trollim.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,15 +1,16 @@
-satpy (0.43.0-4) UNRELEASED; urgency=medium
+satpy (0.43.0-4) unstable; urgency=medium
[ Antonio Valentino ]
* debian/patches:
- rename 0001-Disable-extra-dependency-form-geoviews.patch
into 0001-Disable-extra-dependency-from-geoviews.patch
+ - new 0008-Fix-colormap-based-tests-with-new-version-of-trollim.patch.
[ Bas Couwenberg ]
* Switch to dh-sequence-*.
* Remove generated files in clean target.
- -- Antonio Valentino <antonio.valentino at tiscali.it> Mon, 14 Aug 2023 13:30:59 +0000
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sat, 16 Sep 2023 11:21:12 +0000
satpy (0.43.0-3) unstable; urgency=medium
=====================================
debian/patches/0008-Fix-colormap-based-tests-with-new-version-of-trollim.patch
=====================================
@@ -0,0 +1,67 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sat, 16 Sep 2023 11:17:09 +0000
+Subject: Fix colormap-based tests with new version of trollimage
+
+Forwarded: not-needed
+Applied-Upstream: https://github.com/pytroll/satpy/pull/2568
+---
+ satpy/tests/enhancement_tests/test_enhancements.py | 20 +++++++-------------
+ satpy/tests/test_composites.py | 14 +++++++-------
+ 2 files changed, 14 insertions(+), 20 deletions(-)
+
+diff --git a/satpy/tests/enhancement_tests/test_enhancements.py b/satpy/tests/enhancement_tests/test_enhancements.py
+index 4420f4e..e95c55a 100644
+--- a/satpy/tests/enhancement_tests/test_enhancements.py
++++ b/satpy/tests/enhancement_tests/test_enhancements.py
+@@ -149,19 +149,13 @@ class TestEnhancementStretch:
+ from trollimage.colormap import brbg
+
+ from satpy.enhancements import colorize
+- expected = np.array([[
+- [np.nan, 3.29409498e-01, 3.29409498e-01,
+- 4.35952940e-06, 4.35952940e-06],
+- [4.35952940e-06, 4.35952940e-06, 4.35952940e-06,
+- 4.35952940e-06, 4.35952940e-06]],
+- [[np.nan, 1.88249866e-01, 1.88249866e-01,
+- 2.35302110e-01, 2.35302110e-01],
+- [2.35302110e-01, 2.35302110e-01, 2.35302110e-01,
+- 2.35302110e-01, 2.35302110e-01]],
+- [[np.nan, 1.96102817e-02, 1.96102817e-02,
+- 1.88238767e-01, 1.88238767e-01],
+- [1.88238767e-01, 1.88238767e-01, 1.88238767e-01,
+- 1.88238767e-01, 1.88238767e-01]]])
++ expected = np.array([
++ [[np.nan, 3.29411723e-01, 3.29411723e-01, 3.21825881e-08, 3.21825881e-08],
++ [3.21825881e-08, 3.21825881e-08, 3.21825881e-08, 3.21825881e-08, 3.21825881e-08]],
++ [[np.nan, 1.88235327e-01, 1.88235327e-01, 2.35294109e-01, 2.35294109e-01],
++ [2.35294109e-01, 2.35294109e-01, 2.35294109e-01, 2.35294109e-01, 2.35294109e-01]],
++ [[np.nan, 1.96078164e-02, 1.96078164e-02, 1.88235281e-01, 1.88235281e-01],
++ [1.88235281e-01, 1.88235281e-01, 1.88235281e-01, 1.88235281e-01, 1.88235281e-01]]])
+ run_and_check_enhancement(colorize, self.ch1, expected, palettes=brbg)
+
+ def test_palettize(self):
+diff --git a/satpy/tests/test_composites.py b/satpy/tests/test_composites.py
+index f27c73d..f056d2f 100644
+--- a/satpy/tests/test_composites.py
++++ b/satpy/tests/test_composites.py
+@@ -773,13 +773,13 @@ class TestColorizeCompositor(unittest.TestCase):
+ dims=['y', 'x'],
+ attrs={'valid_range': np.array([2, 4])})
+ res = colormap_composite([data, palette])
+- exp = np.array([[[1.0000149, 0.49804664, 0.24907766],
+- [0., 0.59844028, 1.0000149]],
+- [[1.00005405, 0.49806613, 0.24902255],
+- [0., 0.59846373, 1.00005405]],
+- [[1.00001585, 0.49804711, 0.24896771],
+- [0., 0.59844073, 1.00001585]]])
+- self.assertTrue(np.allclose(res, exp, atol=1e-4))
++ exp = np.array([[[1.0, 0.498039, 0.246575],
++ [0., 0.59309977, 1.0]],
++ [[1.0, 0.49803924, 0.24657543],
++ [0., 0.59309983, 1.0]],
++ [[1.0, 0.4980392, 0.24657541],
++ [0., 0.59309978, 1.0]]])
++ np.testing.assert_allclose(res, exp, atol=1e-4)
+
+
+ class TestCloudCompositorWithoutCloudfree:
=====================================
debian/patches/series
=====================================
@@ -5,3 +5,4 @@
0005-Relax-test-tolerance.patch
0006-Fix-privacy-breach.patch
0007-Fix-compatibility-with-old-dask-versions.patch
+0008-Fix-colormap-based-tests-with-new-version-of-trollim.patch
View it on GitLab: https://salsa.debian.org/debian-gis-team/satpy/-/compare/3ca94647304c8a3321997a142b3b400bd1c06187...73940992b41ba435a4ab57ca05c919d5d4b93fb2
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/satpy/-/compare/3ca94647304c8a3321997a142b3b400bd1c06187...73940992b41ba435a4ab57ca05c919d5d4b93fb2
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/20230916/8c5e4bc1/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list