[Git][debian-gis-team/trollimage][master] 4 commits: New upstream version 1.20.1
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Feb 4 08:25:19 GMT 2023
Antonio Valentino pushed to branch master at Debian GIS Project / trollimage
Commits:
d0f61d39 by Antonio Valentino at 2023-02-04T08:19:44+00:00
New upstream version 1.20.1
- - - - -
30b859aa by Antonio Valentino at 2023-02-04T08:19:49+00:00
Update upstream source from tag 'upstream/1.20.1'
Update to upstream version '1.20.1'
with Debian dir 3d16d70acd39105f0b0c4a1855f04f93a2e49f77
- - - - -
b73d5250 by Antonio Valentino at 2023-02-04T08:20:40+00:00
New upstream release
- - - - -
e30996aa by Antonio Valentino at 2023-02-04T08:22:30+00:00
Set distribution to unstable
- - - - -
6 changed files:
- CHANGELOG.md
- debian/changelog
- rtd_requirements.txt
- trollimage/colormap.py
- trollimage/tests/test_colormap.py
- trollimage/version.py
Changes:
=====================================
CHANGELOG.md
=====================================
@@ -1,3 +1,19 @@
+## Version 1.20.1 (2023/02/03)
+
+
+### Pull Requests Merged
+
+#### Bugs fixed
+
+* [PR 123](https://github.com/pytroll/trollimage/pull/123) - Don't scale colormap values if they're ints ([2376](https://github.com/pytroll/satpy/issues/2376))
+
+#### Features added
+
+* [PR 120](https://github.com/pytroll/trollimage/pull/120) - [Snyk] Security upgrade setuptools from 39.0.1 to 65.5.1
+
+In this release 2 pull requests were closed.
+
+
## Version 1.20.0 (2023/01/11)
=====================================
debian/changelog
=====================================
@@ -1,9 +1,12 @@
-trollimage (1.20.0-2) UNRELEASED; urgency=medium
+trollimage (1.20.1-1) unstable; urgency=medium
- * Team upload.
+ [ Bas Couwenberg ]
* Bump Standards-Version to 4.6.2, no changes.
- -- Bas Couwenberg <sebastic at debian.org> Wed, 18 Jan 2023 17:21:49 +0100
+ [ Antonio Valentino ]
+ * New upstream release.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sat, 04 Feb 2023 08:22:03 +0000
trollimage (1.20.0-1) unstable; urgency=medium
=====================================
rtd_requirements.txt
=====================================
@@ -6,3 +6,4 @@ docutils<0.18
sphinx>=5,<6
sphinx-rtd-theme>=1.1.0,<2.0
+setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability
=====================================
trollimage/colormap.py
=====================================
@@ -681,16 +681,18 @@ class Colormap(object):
color_array,
"VRGB" if color_array.shape[1] == 4 else "VRGBA",
color_scale=color_scale)
+ if dtype == np.dtype("uint8"):
+ return colormap
+
if valid_range is not None:
if set_range:
colormap.set_range(
*(np.array(valid_range) * scale_factor
+ add_offset))
- else:
- if dtype != np.dtype("uint8"):
- raise AttributeError("Data need to have either a valid_range or be of type uint8" +
- " in order to be displayable with an attached color-palette!")
- return colormap
+ return colormap
+
+ raise AttributeError("Data need to have either a valid_range or be of type uint8" +
+ " in order to be displayable with an attached color-palette!")
def _is_actually_a_csv_string(string):
=====================================
trollimage/tests/test_colormap.py
=====================================
@@ -684,11 +684,23 @@ def test_cmap_from_sequence_of_colors():
def test_build_colormap_with_int_data_and_without_meanings():
- """Test colormap building."""
+ """Test colormap building from uint8 array with metadata."""
palette = np.array([[0, 0, 0], [127, 127, 127], [255, 255, 255]])
cmap = colormap.Colormap.from_array_with_metadata(palette, np.uint8)
np.testing.assert_array_equal(cmap.values, [0, 1])
+ # test that values are respected even if valid_range is passed
+ # see https://github.com/pytroll/satpy/issues/2376
+ cmap = colormap.Colormap.from_array_with_metadata(
+ palette, np.uint8, valid_range=[0, 100])
+
+ np.testing.assert_array_equal(cmap.values, [0, 1])
+
+
+def test_build_colormap_with_float_data():
+ """Test colormap building for float data"""
+ palette = np.array([[0, 0, 0], [127, 127, 127], [255, 255, 255]])
+
with pytest.raises(AttributeError):
colormap.Colormap.from_array_with_metadata(palette/100, np.float32)
=====================================
trollimage/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 = " (tag: v1.20.0)"
- git_full = "d87d61cdc9f29998fb26af354fa7e6a897760103"
- git_date = "2023-01-11 12:33:44 +0100"
+ git_refnames = " (HEAD -> main, tag: v1.20.1)"
+ git_full = "02b8330165815649e3570b03d5e8b07d2dbd7fca"
+ git_date = "2023-02-03 15:09:25 +0100"
keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
return keywords
View it on GitLab: https://salsa.debian.org/debian-gis-team/trollimage/-/compare/53d2f61b472e2755582e23de25e49c130ba5f5fc...e30996aaaec1c7e54895cdb66467dabcbb35e716
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/trollimage/-/compare/53d2f61b472e2755582e23de25e49c130ba5f5fc...e30996aaaec1c7e54895cdb66467dabcbb35e716
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/20230204/0a395884/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list