[Git][debian-gis-team/glymur][master] 6 commits: New upstream version 0.11.2
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Aug 13 16:24:47 BST 2022
Antonio Valentino pushed to branch master at Debian GIS Project / glymur
Commits:
db2acaf3 by Antonio Valentino at 2022-08-13T15:00:04+00:00
New upstream version 0.11.2
- - - - -
99220adb by Antonio Valentino at 2022-08-13T15:00:07+00:00
Update upstream source from tag 'upstream/0.11.2'
Update to upstream version '0.11.2'
with Debian dir 4cf6c0b153e7b30a3a7c42a1d483fb682806cb4d
- - - - -
06d35c78 by Antonio Valentino at 2022-08-13T15:00:43+00:00
New upstream release
- - - - -
ff0ffc5e by Antonio Valentino at 2022-08-13T15:03:02+00:00
Drop 0001-Remove-breakpoint.patch
- - - - -
633723ae by Antonio Valentino at 2022-08-13T15:19:29+00:00
Add d/not-installed
- - - - -
621921c7 by Antonio Valentino at 2022-08-13T15:19:45+00:00
Set distribution to unstable
- - - - -
11 changed files:
- CHANGES.txt
- debian/changelog
- + debian/not-installed
- − debian/patches/0001-Remove-breakpoint.patch
- − debian/patches/series
- docs/source/conf.py
- docs/source/whatsnew/0.11.rst
- glymur/jp2k.py
- glymur/version.py
- setup.cfg
- tests/test_jp2k.py
Changes:
=====================================
CHANGES.txt
=====================================
@@ -1,11 +1,14 @@
+August 9, 2022 - v0.11.2
+ Relax ResolutionBox requirement on child boxes.
+
August 6, 2022 - v0.11.1
- Improve efficiency of striped TIFF to tiled JP2 conversion
+ Improve efficiency of striped TIFF to tiled JP2 conversion.
July 29, 2022 - v0.11.0
- Add options for supporting ResolutionBoxes
- Fix ctypes interface to C library on windows
- Add option to convert XMLPacket into UUID box
- Add option for excluding tags from Exif UUID box
+ Add options for supporting ResolutionBoxes.
+ Fix ctypes interface to C library on windows.
+ Add option to convert XMLPacket into UUID box.
+ Add option for excluding tags from Exif UUID box.
July 16, 2022 - v0.10.2
Fix appveyor builds
=====================================
debian/changelog
=====================================
@@ -1,8 +1,12 @@
-glymur (0.11.1-2) UNRELEASED; urgency=medium
+glymur (0.11.2-1) unstable; urgency=medium
+ * New upstream release.
* Fix d/copyright formatting.
+ * debian/patches:
+ - drop 0001-Remove-breakpoint.patch, applied upstream.
+ * add d/not-installed file.
- -- Antonio Valentino <antonio.valentino at tiscali.it> Wed, 10 Aug 2022 06:41:06 +0000
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sat, 13 Aug 2022 15:19:35 +0000
glymur (0.11.1-1) unstable; urgency=medium
=====================================
debian/not-installed
=====================================
@@ -0,0 +1,2 @@
+usr/lib/python3.10/dist-packages/tests/*
+usr/lib/python3.10/dist-packages/tmp.*
=====================================
debian/patches/0001-Remove-breakpoint.patch deleted
=====================================
@@ -1,21 +0,0 @@
-From: Antonio Valentino <antonio.valentino at tiscali.it>
-Date: Tue, 9 Aug 2022 07:00:57 +0000
-Subject: Remove breakpoint
-
-Forwarded: https://github.com/quintusdias/glymur/pull/570
----
- tests/test_jp2k.py | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/tests/test_jp2k.py b/tests/test_jp2k.py
-index ec85cb3..af43f4d 100644
---- a/tests/test_jp2k.py
-+++ b/tests/test_jp2k.py
-@@ -1259,7 +1259,6 @@ class TestJp2k_write(fixtures.MetadataBase):
-
- EXPECTED RESULT: A TLM segment is detected.
- """
-- breakpoint()
- kwargs = {
- 'data': self.jp2_data,
- 'tlm': True
=====================================
debian/patches/series deleted
=====================================
@@ -1 +0,0 @@
-0001-Remove-breakpoint.patch
=====================================
docs/source/conf.py
=====================================
@@ -78,7 +78,7 @@ copyright = '2013-2022, John Evans'
# The short X.Y version.
version = '0.11'
# The full version, including alpha/beta/rc tags.
-release = '0.11.1'
+release = '0.11.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
=====================================
docs/source/whatsnew/0.11.rst
=====================================
@@ -2,17 +2,22 @@
Changes in glymur 0.11
######################
+*****************
+Changes in 0.11.2
+*****************
+ * Relax requirement on ResolutionBox number of child boxes.
+
*****************
Changes in 0.11.1
*****************
- * Improve efficiency of striped TIFF to tiled JP2 conversion
+ * Improve efficiency of striped TIFF to tiled JP2 conversion.
*****************
Changes in 0.11.0
*****************
- * Add options for supporting ResolutionBoxes
- * Fix ctypes interface to C library on windows
- * Add option to convert XMLPacket into UUID box
- * Add option for excluding tags from Exif UUID box
+ * Add options for supporting ResolutionBoxes.
+ * Fix ctypes interface to C library on windows.
+ * Add option to convert XMLPacket into UUID box.
+ * Add option for excluding tags from Exif UUID box.
=====================================
glymur/jp2k.py
=====================================
@@ -276,7 +276,10 @@ class Jp2k(Jp2kBox):
return
# So now we are basically done writing a JP2/Jp2k file ...
- if self._capture_resolution is None:
+ if (
+ self._capture_resolution is None
+ and self._display_resolution is None
+ ):
# ... and we don't have any extra boxes, so go ahead and parse.
self.parse()
return
@@ -291,13 +294,22 @@ class Jp2k(Jp2kBox):
file if we were so instructed.
"""
with open(self.filename, mode='ab') as f:
- resc = glymur.jp2box.CaptureResolutionBox(
- self._capture_resolution[0], self._capture_resolution[1],
- )
- resd = glymur.jp2box.DisplayResolutionBox(
- self._display_resolution[0], self._display_resolution[1],
- )
- rbox = glymur.jp2box.ResolutionBox([resc, resd])
+
+ extra_boxes = []
+
+ if self._capture_resolution is not None:
+ resc = glymur.jp2box.CaptureResolutionBox(
+ self._capture_resolution[0], self._capture_resolution[1],
+ )
+ extra_boxes.append(resc)
+
+ if self._display_resolution is not None:
+ resd = glymur.jp2box.DisplayResolutionBox(
+ self._display_resolution[0], self._display_resolution[1],
+ )
+ extra_boxes.append(resd)
+
+ rbox = glymur.jp2box.ResolutionBox(extra_boxes)
rbox.write(f)
# self.box.append(rbox)
@@ -368,16 +380,6 @@ class Jp2k(Jp2kBox):
)
raise InvalidJp2kError(msg)
- if (
- (self._capture_resolution is not None)
- ^ (self._display_resolution is not None)
- ):
- msg = (
- 'The capture_resolution and display resolution keywords must'
- 'both be supplied or neither supplied.'
- )
- raise RuntimeError(msg)
-
if self._readonly and self._capture_resolution is not None:
msg = (
'Capture/Display resolution keyword parameters cannot be '
=====================================
glymur/version.py
=====================================
@@ -21,7 +21,7 @@ from .lib import tiff
# Do not change the format of this next line! Doing so risks breaking
# setup.py
-version = "0.11.1"
+version = "0.11.2"
version_tuple = parse(version).release
=====================================
setup.cfg
=====================================
@@ -1,6 +1,6 @@
[metadata]
name = Glymur
-version = 0.11.1
+version = 0.11.2
author = 'John Evans'
author_email = "John Evans" <john.g.evans.ne at gmail.com>
license = 'MIT'
=====================================
tests/test_jp2k.py
=====================================
@@ -1186,27 +1186,51 @@ class TestJp2k_write(fixtures.MetadataBase):
display_resolution=[vresd, hresd],
)
- def test_one_of_capture_display_resolution_but_not_both(self):
+ def test_capture_resolution_supplied_but_not_display(self):
"""
- Scenario: Writing a JP2 is intended, but not both of capture/display
- resolution key word parameters are supplied.
+ Scenario: Writing a JP2 is intended, but only a capture resolution
+ box is specified, and not a display resolution box.
- Expected Result: RuntimeError
+ Expected Result: No errors, the boxes are validated.
"""
vresc, hresc = 0.1, 0.2
+
+ j = glymur.Jp2k(
+ self.temp_jp2_filename, data=self.jp2_data,
+ capture_resolution=[vresc, hresc],
+ )
+
+ self.assertEqual(j.box[-1].box_id, 'res ')
+
+ self.assertEqual(j.box[-1].box[0].box_id, 'resc')
+ self.assertEqual(j.box[-1].box[0].vertical_resolution, vresc)
+ self.assertEqual(j.box[-1].box[0].horizontal_resolution, hresc)
+
+ # there's just one child box
+ self.assertEqual(len(j.box[-1].box), 1)
+
+ def test_display_resolution_supplied_but_not_capture(self):
+ """
+ Scenario: Writing a JP2 is intended, but only a capture resolution
+ box is specified, and not a display resolution box.
+
+ Expected Result: No errors, the boxes are validated.
+ """
vresd, hresd = 0.3, 0.4
- with self.assertRaises(RuntimeError):
- glymur.Jp2k(
- self.temp_jp2_filename, data=self.jp2_data,
- capture_resolution=[vresc, hresc],
- )
+ j = glymur.Jp2k(
+ self.temp_jp2_filename, data=self.jp2_data,
+ display_resolution=[vresd, hresd],
+ )
- with self.assertRaises(RuntimeError):
- glymur.Jp2k(
- self.temp_jp2_filename, data=self.jp2_data,
- display_resolution=[vresd, hresd],
- )
+ self.assertEqual(j.box[-1].box_id, 'res ')
+
+ self.assertEqual(j.box[-1].box[0].box_id, 'resd')
+ self.assertEqual(j.box[-1].box[0].vertical_resolution, vresd)
+ self.assertEqual(j.box[-1].box[0].horizontal_resolution, hresd)
+
+ # there's just one child box
+ self.assertEqual(len(j.box[-1].box), 1)
def test_no_jp2c_box_in_outermost_jp2_list(self):
"""
@@ -1259,7 +1283,6 @@ class TestJp2k_write(fixtures.MetadataBase):
EXPECTED RESULT: A TLM segment is detected.
"""
- breakpoint()
kwargs = {
'data': self.jp2_data,
'tlm': True
View it on GitLab: https://salsa.debian.org/debian-gis-team/glymur/-/compare/da8cfdcdf4a56d24e3b90cc244ac29ed542feefe...621921c747c927fdefe6c0208914617bee53c3cd
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/glymur/-/compare/da8cfdcdf4a56d24e3b90cc244ac29ed542feefe...621921c747c927fdefe6c0208914617bee53c3cd
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/20220813/e7d8ed27/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list