From 6217d7cc05bfa4c679ca45d92a774a1ae30a1610 Mon Sep 17 00:00:00 2001 From: Pariksheet Nanda Date: Tue, 16 Apr 2024 14:21:42 -0400 Subject: [PATCH] drop unmaintained pygeos for shapely 2.0 --- pyproject.toml | 3 +-- src/spatialdata/__init__.py | 7 ------- src/spatialdata/_compat.py | 27 --------------------------- 3 files changed, 1 insertion(+), 36 deletions(-) delete mode 100644 src/spatialdata/_compat.py diff --git a/pyproject.toml b/pyproject.toml index e6c187c1..860a2062 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ dependencies = [ "dask-image", "dask<=2024.2.1", "fsspec<=2023.6", - "geopandas", + "geopandas>=0.14", "multiscale_spatial_image==0.11.2", "networkx", "numpy", @@ -35,7 +35,6 @@ dependencies = [ "pandas", "pooch", "pyarrow", - "pygeos", "rich", "shapely>=2.0.1", "spatial_image==0.3.0", diff --git a/src/spatialdata/__init__.py b/src/spatialdata/__init__.py index 18eae0f8..3fd835d9 100644 --- a/src/spatialdata/__init__.py +++ b/src/spatialdata/__init__.py @@ -4,13 +4,6 @@ __version__ = version("spatialdata") -# Forcing usage of shapely 2.0 by geopandas -# https://geopandas.org/en/stable/getting_started/install.html#using-the-optional-pygeos-dependency -from ._compat import _check_geopandas_using_shapely - -_check_geopandas_using_shapely() - - __all__ = [ "models", "transformations", diff --git a/src/spatialdata/_compat.py b/src/spatialdata/_compat.py deleted file mode 100644 index 3fb9b57a..00000000 --- a/src/spatialdata/_compat.py +++ /dev/null @@ -1,27 +0,0 @@ -def _check_geopandas_using_shapely() -> None: - """Check if geopandas is using shapely. - - This is required until it becomes the default. - """ - import warnings - - with warnings.catch_warnings(): - warnings.filterwarnings( - "ignore", - "Shapely 2.0 is installed, but because PyGEOS is also installed", - category=UserWarning, - ) - import geopandas - - if geopandas.options.use_pygeos is True: - geopandas.options.use_pygeos = False - - warnings.warn( - ( - "Geopandas was set to use PyGEOS, changing to shapely 2.0 with:" - "\n\n\tgeopandas.options.use_pygeos = True\n\n" - "If you intended to use PyGEOS, set the option to False." - ), - UserWarning, - stacklevel=2, - )