Skip to content

Commit

Permalink
Skip test for #714 on py3.8 due to lack of geopandas support
Browse files Browse the repository at this point in the history
Workaround for #714 requires at least geopandas 0.14 but that version is
not available on Python 3.8 (#717)
  • Loading branch information
soxofaan committed Jan 28, 2025
1 parent 0d295dc commit bd9c9d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
"urllib3<2.3.0", # httpretty doesn't work properly with urllib3>=2.3.0. See #700 and https://github.com/gabrielfalcao/HTTPretty/issues/484
"netCDF4>=1.7.0",
"matplotlib", # TODO: eliminate matplotlib as test dependency
"geopandas>0.13.2",
# TODO #717 Simplify geopandas constraints when Python 3.8 support is dropped
"geopandas>=0.14; python_version>='3.9'",
"geopandas", # Best-effort geopandas dependency for Python 3.8
"flake8>=5.0.0",
"time_machine",
"pyproj>=3.2.0", # Pyproj is an optional, best-effort runtime dependency
Expand Down
7 changes: 6 additions & 1 deletion tests/extra/job_management/test_job_management.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import copy
import datetime
import json
import logging
import re
Expand All @@ -7,7 +8,6 @@
from time import sleep
from typing import Callable, Union
from unittest import mock
import datetime

import dirty_equals
import geopandas
Expand Down Expand Up @@ -40,6 +40,7 @@
)
from openeo.rest._testing import OPENEO_BACKEND, DummyBackend, build_capabilities
from openeo.util import rfc3339
from openeo.utils.version import ComparableVersion


@pytest.fixture
Expand Down Expand Up @@ -977,6 +978,10 @@ def test_initialize_from_df_on_exists_skip(self, tmp_path):
)
assert set(db.read()["some_number"]) == {1, 2, 3}

@pytest.mark.skipif(
ComparableVersion(geopandas.__version__) < "0.14",
reason="This issue has no workaround with geopandas < 0.14 (highest available version on Python 3.8 is 0.13.2)",
)
def test_read_with_crs_column(self, tmp_path):
"""
Having a column named "crs" can cause obscure error messages when creating a GeoPandas dataframe
Expand Down

0 comments on commit bd9c9d4

Please sign in to comment.