Skip to content

Commit

Permalink
fix(deps): update dependency geopandas to v1 (#9437)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Phillip Cloud <[email protected]>
  • Loading branch information
renovate[bot] and cpcloud authored Jun 25, 2024
1 parent 88a2785 commit fa1037b
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 96 deletions.
30 changes: 27 additions & 3 deletions ibis/backends/duckdb/tests/test_geospatial.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from __future__ import annotations

from operator import methodcaller
from operator import attrgetter, methodcaller

import numpy.testing as npt
import pandas.testing as tm
import pyarrow as pa
import pytest
from packaging.version import parse as vparse
from pytest import param

import ibis
Expand Down Expand Up @@ -168,10 +169,33 @@ def test_geospatial_start_point(lines, lines_gdf):


# this one takes a bit longer than the rest.
def test_geospatial_unary_union(zones, zones_gdf):
@pytest.mark.parametrize(
"expected_func",
[
param(
attrgetter("unary_union"),
marks=pytest.mark.xfail(
condition=vparse(gpd.__version__) >= vparse("1"),
raises=Warning,
reason="unary_union property is deprecated",
),
id="version<1",
),
param(
methodcaller("union_all"),
marks=pytest.mark.xfail(
condition=vparse(gpd.__version__) < vparse("1"),
raises=AttributeError,
reason="union_all doesn't exist",
),
id="version>=1",
),
],
)
def test_geospatial_unary_union(zones, zones_gdf, expected_func):
unary_union = zones.geom.unary_union().name("unary_union")
# this returns a shapely geometry object
gp_unary_union = zones_gdf.geometry.unary_union
gp_unary_union = expected_func(zones_gdf.geometry)

# using set_precision because https://github.com/duckdb/duckdb_spatial/issues/189
assert shapely.equals(
Expand Down
143 changes: 56 additions & 87 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ datafusion = { version = ">=0.6,<39", optional = true }
db-dtypes = { version = ">=0.3,<2", optional = true }
deltalake = { version = ">=0.9.0,<1", optional = true }
duckdb = { version = ">=0.8.1,<2", optional = true }
geopandas = { version = ">=0.6,<1", optional = true }
geopandas = { version = ">=0.6,<2", optional = true }
google-cloud-bigquery = { version = ">=3,<4", optional = true }
google-cloud-bigquery-storage = { version = ">=2,<3", optional = true }
graphviz = { version = ">=0.16,<1", optional = true }
Expand Down
8 changes: 3 additions & 5 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ cfgv==3.4.0 ; python_version >= "3.10" and python_version < "4.0"
chardet==5.2.0 ; python_version >= "3.10" and python_version < "4.0"
charset-normalizer==3.3.2 ; python_version >= "3.10" and python_version < "4.0"
cleo==2.1.0 ; python_version >= "3.10" and python_version < "4.0"
click-plugins==1.1.1 ; python_version >= "3.10" and python_version < "4.0"
click==8.1.7 ; python_version >= "3.10" and python_version < "4.0"
clickhouse-connect[arrow,numpy,pandas]==0.7.12 ; python_version >= "3.10" and python_version < "4.0"
cligj==0.7.2 ; python_version >= "3.10" and python_version < "4"
cloudpickle==3.0.0 ; python_version >= "3.10" and python_version < "4.0"
codespell[hard-encoding-detection,toml]==2.3.0 ; python_version >= "3.10" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" and (sys_platform == "win32" or platform_system == "Windows" or os_name == "nt" or python_version < "3.13")
colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" and (sys_platform == "win32" or platform_system == "Windows" or python_version < "3.13" or os_name == "nt")
comm==0.2.2 ; python_version >= "3.10" and python_version < "3.13"
contourpy==1.2.1 ; python_version >= "3.10" and python_version < "3.13"
coverage[toml]==7.5.4 ; python_version >= "3.10" and python_version < "4.0"
Expand All @@ -61,13 +59,12 @@ execnet==2.1.1 ; python_version >= "3.10" and python_version < "4.0"
executing==2.0.1 ; python_version >= "3.10" and python_version < "4.0"
fastjsonschema==2.20.0 ; python_version >= "3.10" and python_version < "4.0"
filelock==3.15.4 ; python_version >= "3.10" and python_version < "4.0"
fiona==1.9.6 ; python_version >= "3.10" and python_version < "4.0"
fonttools==4.53.0 ; python_version >= "3.10" and python_version < "3.13"
fqdn==1.5.1 ; python_version >= "3.10" and python_version < "3.13"
frozenlist==1.4.1 ; python_version >= "3.10" and python_version < "4.0"
fsspec==2024.6.0 ; python_version >= "3.10" and python_version < "4.0"
gcsfs==2024.6.0 ; python_version >= "3.10" and python_version < "4.0"
geopandas==0.14.4 ; python_version >= "3.10" and python_version < "4.0"
geopandas==1.0.0 ; python_version >= "3.10" and python_version < "4.0"
google-api-core==2.19.0 ; python_version >= "3.10" and python_version < "4.0"
google-api-core[grpc]==2.19.0 ; python_version >= "3.10" and python_version < "4.0"
google-auth-oauthlib==1.2.0 ; python_version >= "3.10" and python_version < "4.0"
Expand Down Expand Up @@ -204,6 +201,7 @@ pyinstrument==4.6.2 ; python_version >= "3.10" and python_version < "4.0"
pyjwt==2.8.0 ; python_version >= "3.10" and python_version < "4.0"
pymysql==1.1.1 ; python_version >= "3.10" and python_version < "4.0"
pyodbc==5.1.0 ; python_version >= "3.10" and python_version < "4.0"
pyogrio==0.9.0 ; python_version >= "3.10" and python_version < "4.0"
pyopenssl==24.1.0 ; python_version >= "3.10" and python_version < "4.0"
pyparsing==3.1.2 ; python_version >= "3.10" and python_version < "3.13"
pyproj==3.6.1 ; python_version >= "3.10" and python_version < "4.0"
Expand Down

0 comments on commit fa1037b

Please sign in to comment.