From 9b61d0c6202bc9b05f849e8f53202b83f5656979 Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Fri, 25 Aug 2023 13:11:33 +0200 Subject: [PATCH] Issue #460/#259/#453/#458 test requirement pyproj>=3.2.0 --- setup.py | 2 +- tests/rest/datacube/test_datacube100.py | 2 +- tests/test_util.py | 9 ++------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index 2c738db2b..c9f5a10e7 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ "geopandas", "flake8>=5.0.0", "time_machine", - "pyproj", # Pyproj is an optional, best-effort runtime dependency # TODO #460 set a high enough minimum version when py3.6 support can be dropped + "pyproj>=3.2.0", # Pyproj is an optional, best-effort runtime dependency ] docs_require = [ diff --git a/tests/rest/datacube/test_datacube100.py b/tests/rest/datacube/test_datacube100.py index d3183d394..302ceb1c0 100644 --- a/tests/rest/datacube/test_datacube100.py +++ b/tests/rest/datacube/test_datacube100.py @@ -192,8 +192,8 @@ def _get_normalizable_crs_inputs(): yield "EPSG:32631" yield 32631 if pyproj.__version__ >= ComparableVersion("3.3.1"): + # TODO drop this skip once support for python 3.7 is dropped (pyproj 3.3.0 requires at least python 3.8) # pyproj below 3.3.1 does not support int-like strings - # TODO #460 this skip is only necessary for python 3.6 and lower yield "32631" yield "+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs" # is also EPSG:32631, in proj format if pyproj.__version__ >= ComparableVersion("3.1.0"): diff --git a/tests/test_util.py b/tests/test_util.py index eb59a563c..f2698417f 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -898,7 +898,7 @@ class TestNormalizeCrs: def test_normalize_crs_succeeds_with_correct_crses(self, epsg_input, expected): """Happy path, values that are allowed""" if isinstance(epsg_input, str) and epsg_input.isnumeric() and pyproj.__version__ < ComparableVersion("3.3.1"): - # TODO #460 this skip is only necessary for python 3.6 and lower + # TODO drop this skip once support for python 3.7 is dropped (pyproj 3.3.0 requires at least python 3.8) pytest.skip("pyproj below 3.3.1 does not support int-like strings") assert normalize_crs(epsg_input) == expected @@ -936,11 +936,6 @@ def test_normalize_crs_without_pyproj_accept_non_epsg_string(self, caplog): in caplog.text ) - @pytest.mark.skipif( - # TODO #460 this skip is only necessary for python 3.6 and lower - pyproj.__version__ < ComparableVersion("3.1.0"), - reason="WKT2 format support requires pyproj 3.1.0 or higher", - ) def test_normalize_crs_succeeds_with_wkt2_input(self): """Test can handle WKT2 strings. @@ -1022,7 +1017,7 @@ def test_normalize_crs_without_pyproj_succeeds_with_wkt2_input(self): } @pytest.mark.skipif( - # TODO #460 this skip is only necessary for python 3.6 and lower + # TODO drop this skip once support for python 3.7 is dropped (pyproj 3.3.0 requires at least python 3.8) pyproj.__version__ < ComparableVersion("3.3.0"), reason="PROJJSON format support requires pyproj 3.3.0 or higher", )