From d124549df1221fcabd73ef2219714b40e2538e6a Mon Sep 17 00:00:00 2001 From: jevans Date: Thu, 19 Sep 2013 21:43:31 -0400 Subject: [PATCH 1/6] Prepping for 0.5.1 release. --- CHANGES.txt | 3 +++ docs/source/conf.py | 2 +- glymur/version.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 35b355e..03d3b94 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +Sep 19, 2013 - v0.5.1 Added more resiliency to XML box parsing. Fixed tests + that failed if OPJ_DATA_ROOT not set. + Sep 16, 2013 - v0.5.0 Added write support for 1.5.x. Added version module. Aug 21, 2013 - v0.4.1 Fixed segfault with openjpeg 1.x when rlevel=-1 diff --git a/docs/source/conf.py b/docs/source/conf.py index 6b9eb18..25d944f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -78,7 +78,7 @@ copyright = u'2013, John Evans' # The short X.Y version. version = '0.5' # The full version, including alpha/beta/rc tags. -release = '0.5.0' +release = '0.5.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/glymur/version.py b/glymur/version.py index 740d610..274a222 100644 --- a/glymur/version.py +++ b/glymur/version.py @@ -13,7 +13,7 @@ from distutils.version import LooseVersion from .lib import openjpeg as opj from .lib import openjp2 as opj2 -version = "0.5.0" +version = "0.5.1rc1" _sv = LooseVersion(version) version_tuple = _sv.version From ce23560062423abfedd0c153f71202f1bab800a1 Mon Sep 17 00:00:00 2001 From: jevans Date: Thu, 19 Sep 2013 21:45:59 -0400 Subject: [PATCH 2/6] Finalizing 0.5.1 release. --- glymur/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glymur/version.py b/glymur/version.py index 274a222..8b1eb50 100644 --- a/glymur/version.py +++ b/glymur/version.py @@ -13,7 +13,7 @@ from distutils.version import LooseVersion from .lib import openjpeg as opj from .lib import openjp2 as opj2 -version = "0.5.1rc1" +version = "0.5.1" _sv = LooseVersion(version) version_tuple = _sv.version From 008048b25ecaa0c42b1fe51b958a43bee3bc18ae Mon Sep 17 00:00:00 2001 From: John Evans Date: Mon, 23 Sep 2013 12:33:05 -0400 Subject: [PATCH 3/6] Removed some "skipIf" conditions that no loger seem relevant. #121 --- glymur/test/test_jp2box.py | 8 -------- glymur/test/test_jp2k.py | 2 -- glymur/test/test_opj_suite_neg.py | 7 +++---- glymur/test/test_printing.py | 4 ++-- 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/glymur/test/test_jp2box.py b/glymur/test/test_jp2box.py index 71dbd72..0d265b0 100644 --- a/glymur/test/test_jp2box.py +++ b/glymur/test/test_jp2box.py @@ -57,11 +57,7 @@ def load_tests(loader, tests, ignore): return tests -@unittest.skipIf(OPENJP2_IS_V2_OFFICIAL, - "Requires v2.0.0+ in order to run.") @unittest.skipIf(os.name == "nt", "Temporary file issue on window.") -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, - "Missing openjp2 library.") class TestChannelDefinition(unittest.TestCase): """Test suite for channel definition boxes.""" @@ -505,8 +501,6 @@ class TestColourSpecificationBox(unittest.TestCase): approximation=approx) -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, - "Missing openjp2 library.") class TestAppend(unittest.TestCase): """Tests for append method.""" @@ -599,8 +593,6 @@ class TestAppend(unittest.TestCase): jp2.append(uuidbox) -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, - "Missing openjp2 library.") class TestWrap(unittest.TestCase): """Tests for wrap method.""" diff --git a/glymur/test/test_jp2k.py b/glymur/test/test_jp2k.py index bbf551b..b6390c4 100644 --- a/glymur/test/test_jp2k.py +++ b/glymur/test/test_jp2k.py @@ -56,8 +56,6 @@ def load_tests(loader, tests, ignore): @unittest.skipIf(os.name == "nt", "NamedTemporaryFile issue on windows") -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, - "Missing openjp2 library.") class TestJp2kBadXmlFile(unittest.TestCase): """Test suite for bad XML box situations""" diff --git a/glymur/test/test_opj_suite_neg.py b/glymur/test/test_opj_suite_neg.py index 66115a2..2e7e3b2 100644 --- a/glymur/test/test_opj_suite_neg.py +++ b/glymur/test/test_opj_suite_neg.py @@ -12,6 +12,7 @@ seem like logical negative tests to add. # pylint: disable=F0401 import os +import re import sys import tempfile @@ -22,16 +23,14 @@ else: import numpy as np -from .fixtures import read_image, NO_READ_BACKEND, NO_READ_BACKEND_MSG from .fixtures import OPJ_DATA_ROOT, opj_data_file from glymur import Jp2k import glymur -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, - "Missing openjp2 library.") -@unittest.skipIf(NO_READ_BACKEND, NO_READ_BACKEND_MSG) +@unittest.skipIf(re.match(r"""1\.[01234]""", glymur.version.openjpeg_version), + "Functionality not implemented for 1.3, 1.4") @unittest.skipIf(OPJ_DATA_ROOT is None, "OPJ_OPJ_DATA_ROOT environment variable not set") class TestSuiteNegative(unittest.TestCase): diff --git a/glymur/test/test_printing.py b/glymur/test/test_printing.py index 8591b1b..81f998e 100644 --- a/glymur/test/test_printing.py +++ b/glymur/test/test_printing.py @@ -36,8 +36,8 @@ from .fixtures import OPJ_DATA_ROOT, opj_data_file @unittest.skipIf(os.name == "nt", "Temporary file issue on window.") -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, - "Missing openjp2 library.") +@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] == 0, + "Missing library.") class TestPrintingNeedsLib(unittest.TestCase): """These tests require the library, mostly in order to just setup the test. """ From bf9833550452b29b3e29e5ee3b91d4df95c4b3e3 Mon Sep 17 00:00:00 2001 From: John Evans Date: Mon, 23 Sep 2013 16:09:01 -0400 Subject: [PATCH 4/6] Fixed some tests failing in 2.0 official. --- glymur/test/test_jp2box.py | 3 +++ glymur/test/test_jp2k.py | 5 +++-- glymur/test/test_opj_suite.py | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/glymur/test/test_jp2box.py b/glymur/test/test_jp2box.py index 0d265b0..15aed61 100644 --- a/glymur/test/test_jp2box.py +++ b/glymur/test/test_jp2box.py @@ -57,6 +57,9 @@ def load_tests(loader, tests, ignore): return tests +@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] > 1 and + OPENJP2_IS_V2_OFFICIAL, + "Not supported until 2.0+.") @unittest.skipIf(os.name == "nt", "Temporary file issue on window.") class TestChannelDefinition(unittest.TestCase): """Test suite for channel definition boxes.""" diff --git a/glymur/test/test_jp2k.py b/glymur/test/test_jp2k.py index b6390c4..394f9e5 100644 --- a/glymur/test/test_jp2k.py +++ b/glymur/test/test_jp2k.py @@ -117,7 +117,8 @@ class TestJp2kBadXmlFile(unittest.TestCase): self.assertIsNone(jp2k.box[3].xml) -@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None and not OPENJP2_IS_V2_OFFICIAL, +@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] > 1 and + OPENJP2_IS_V2_OFFICIAL, "Missing openjp2 library version 2.0+.") class TestJp2k_2_1(unittest.TestCase): """Test suite for version 2.0+ of openjpeg software""" @@ -201,7 +202,7 @@ class TestJp2k_2_0(unittest.TestCase): def tearDown(self): pass - @unittest.skipIf(not OPENJP2_IS_V2_OFFICIAL, + @unittest.skipIf(OPENJP2_IS_V2_OFFICIAL, "Behavior is specific to 2.0 official.") @unittest.skipIf(os.name == "nt", "NamedTemporaryFile issue on windows") def test_extra_components_on_v2(self): diff --git a/glymur/test/test_opj_suite.py b/glymur/test/test_opj_suite.py index a5daf3e..3543e01 100644 --- a/glymur/test/test_opj_suite.py +++ b/glymur/test/test_opj_suite.py @@ -6724,6 +6724,8 @@ class TestSuiteDump(unittest.TestCase): [8, 9, 9, 10, 9, 9, 10, 9, 9, 10, 9, 9, 10, 9, 9, 10]) +@unittest.skipIf(OPJ_DATA_ROOT is None, + "OPJ_DATA_ROOT environment variable not set") @unittest.skipIf(glymur.version.openjpeg_version_tuple[0] == 1, "Feature not supported in glymur until openjpeg 2.0") class TestSuite_bands(unittest.TestCase): @@ -6853,6 +6855,8 @@ class TestSuite_bands(unittest.TestCase): self.assertTrue(True) +@unittest.skipIf(OPJ_DATA_ROOT is None, + "OPJ_DATA_ROOT environment variable not set") @unittest.skipIf(glymur.version.openjpeg_version_tuple[0] == 1, "Tests not passing until 2.0") class TestSuite2point0(unittest.TestCase): From e20cf07a8a6f50c325f2ca60e81f28e5db43e2db Mon Sep 17 00:00:00 2001 From: John Evans Date: Mon, 23 Sep 2013 16:22:49 -0400 Subject: [PATCH 5/6] Requalified on 1.3. #121 --- glymur/test/test_jp2box.py | 2 +- glymur/test/test_jp2k.py | 2 +- glymur/test/test_printing.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/glymur/test/test_jp2box.py b/glymur/test/test_jp2box.py index 15aed61..ff69f75 100644 --- a/glymur/test/test_jp2box.py +++ b/glymur/test/test_jp2box.py @@ -57,7 +57,7 @@ def load_tests(loader, tests, ignore): return tests -@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] > 1 and +@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] < 2 or OPENJP2_IS_V2_OFFICIAL, "Not supported until 2.0+.") @unittest.skipIf(os.name == "nt", "Temporary file issue on window.") diff --git a/glymur/test/test_jp2k.py b/glymur/test/test_jp2k.py index 394f9e5..ed78870 100644 --- a/glymur/test/test_jp2k.py +++ b/glymur/test/test_jp2k.py @@ -117,7 +117,7 @@ class TestJp2kBadXmlFile(unittest.TestCase): self.assertIsNone(jp2k.box[3].xml) -@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] > 1 and +@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] < 2 or OPENJP2_IS_V2_OFFICIAL, "Missing openjp2 library version 2.0+.") class TestJp2k_2_1(unittest.TestCase): diff --git a/glymur/test/test_printing.py b/glymur/test/test_printing.py index 81f998e..2694aa2 100644 --- a/glymur/test/test_printing.py +++ b/glymur/test/test_printing.py @@ -10,6 +10,7 @@ # pylint: disable=R0904 import os +import re import struct import sys import tempfile @@ -36,8 +37,8 @@ from .fixtures import OPJ_DATA_ROOT, opj_data_file @unittest.skipIf(os.name == "nt", "Temporary file issue on window.") -@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] == 0, - "Missing library.") +@unittest.skipIf(re.match(r"""1\.[01234]""", glymur.version.openjpeg_version), + "Need at least 1.5 in order to write jp2 files.") class TestPrintingNeedsLib(unittest.TestCase): """These tests require the library, mostly in order to just setup the test. """ From c7372552721454f101a7fefc0a55307f18d190e9 Mon Sep 17 00:00:00 2001 From: jevans Date: Mon, 23 Sep 2013 20:17:15 -0400 Subject: [PATCH 6/6] Releasing 0.5.2 --- CHANGES.txt | 3 +++ docs/source/conf.py | 2 +- glymur/version.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 03d3b94..7d437d3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +Sep 23, 2013 - v0.5.2 Fixed some teests that have been failing since 0.5. + under various edge cases. + Sep 19, 2013 - v0.5.1 Added more resiliency to XML box parsing. Fixed tests that failed if OPJ_DATA_ROOT not set. diff --git a/docs/source/conf.py b/docs/source/conf.py index 25d944f..75404f9 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -78,7 +78,7 @@ copyright = u'2013, John Evans' # The short X.Y version. version = '0.5' # The full version, including alpha/beta/rc tags. -release = '0.5.1' +release = '0.5.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/glymur/version.py b/glymur/version.py index 8b1eb50..4386ba6 100644 --- a/glymur/version.py +++ b/glymur/version.py @@ -13,7 +13,7 @@ from distutils.version import LooseVersion from .lib import openjpeg as opj from .lib import openjp2 as opj2 -version = "0.5.1" +version = "0.5.2" _sv = LooseVersion(version) version_tuple = _sv.version