Skip to content

Commit

Permalink
Issue #460/#259/#453/#458 test requirement pyproj>=3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Aug 25, 2023
1 parent 880bf38 commit 3e8ecd6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion tests/rest/datacube/test_datacube100.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down
9 changes: 2 additions & 7 deletions tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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",
)
Expand Down

0 comments on commit 3e8ecd6

Please sign in to comment.