Skip to content

Commit 12a33e0

Browse files
committed
spec 0000 Python & deps
1 parent 061942b commit 12a33e0

File tree

16 files changed

+129
-185
lines changed

16 files changed

+129
-185
lines changed

ci/310-oldest.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

ci/311-latest.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies:
2121
- pytest-cov
2222
- pytest-mpl
2323
- pytest-xdist
24-
# optional
24+
# optional
2525
- geodatasets
2626
- joblib
2727
- networkx
@@ -34,4 +34,4 @@ dependencies:
3434
- pandana
3535
- pip
3636
- pip:
37-
- pulp
37+
- pulp

ci/311-oldest.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: py311_libpysal-oldest
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.11
6+
- beautifulsoup4=4.13
7+
- geopandas=0.14.0
8+
- jinja2
9+
- numpy=1.26.0
10+
- packaging=23.2
11+
- pandas=2.1.0
12+
- requests=2.32
13+
- scikit-learn=1.4.0
14+
- scipy=1.12.0
15+
- shapely=2.0
16+
# testing
17+
- codecov
18+
- matplotlib=3.8
19+
- pytest
20+
- pytest-cov
21+
- pytest-mpl
22+
- pytest-xdist
23+
# optional
24+
- geodatasets=2023.12.0
25+
- joblib=1.4.0
26+
- networkx=3.2
27+
- numba=0.58
28+
- pyarrow=11.0
29+
- sqlalchemy=2.0
30+
- zstd
31+
- xarray=2023.6
32+
- pandana
33+
- h3-py<4
34+
- pip
35+
- pip:
36+
- pulp
37+
- platformdirs==3.11.0

ci/312-dev.yaml

Lines changed: 0 additions & 43 deletions
This file was deleted.

ci/312-latest.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ dependencies:
3232
- zstd
3333
- pandana
3434
- xarray
35-
# for docs build action (this env only)
36-
- myst-parser
37-
- nbsphinx
38-
- numpydoc
39-
- pandoc
40-
- sphinx
41-
- sphinxcontrib-bibtex
42-
- sphinx_bootstrap_theme
4335
- pip
4436
- pip:
45-
- pulp
37+
- pulp

ci/313-dev.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: test
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.13
6+
- beautifulsoup4
7+
- jinja2
8+
- platformdirs
9+
- requests
10+
# testing
11+
- codecov
12+
- matplotlib
13+
- h3-py
14+
- pytest
15+
- pytest-cov
16+
- pytest-mpl
17+
- pytest-xdist
18+
# optional
19+
- fiona
20+
- geodatasets
21+
- joblib
22+
- networkx
23+
- numba
24+
- packaging
25+
- pyarrow
26+
- pyproj
27+
- sqlalchemy
28+
- zstd
29+
- pandana
30+
- pip
31+
- pip:
32+
# dev versions of packages
33+
- --pre \
34+
--index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
35+
--extra-index-url https://pypi.org/simple
36+
- pandas
37+
- pulp
38+
- scikit-learn
39+
- scipy
40+
- shapely
41+
- xarray
42+
- git+https://github.com/geopandas/geopandas.git@main
43+
- git+https://github.com/pysal/tobler.git@main
Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: test
22
channels:
33
- conda-forge
44
dependencies:
5-
- python=3.10
5+
- python=3.13
66
- beautifulsoup4
77
- geopandas
88
- jinja2
@@ -29,9 +29,17 @@ dependencies:
2929
- pyarrow
3030
- scikit-learn
3131
- sqlalchemy
32-
- xarray
3332
- zstd
34-
- pandana
33+
#- pandana # not compatible with Python 3.13 as of 2025-06
34+
- xarray
35+
# for docs build action (this env only)
36+
- myst-parser
37+
- nbsphinx
38+
- numpydoc
39+
- pandoc
40+
- sphinx
41+
- sphinxcontrib-bibtex
42+
- sphinx_bootstrap_theme
3543
- pip
3644
- pip:
37-
- pulp
45+
- pulp

ci/312-min.yaml renamed to ci/313-min.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: test
22
channels:
33
- conda-forge
44
dependencies:
5-
- python=3.12
5+
- python=3.13
66
- beautifulsoup4
77
- fiona
8-
- geopandas-base>=0.12.0 # base to avoid pulling sklearn
8+
- geopandas-base>=0.14.0 # base to avoid pulling sklearn
99
- jinja2
1010
- pandas
1111
- platformdirs

libpysal/cg/alpha_shapes.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import numpy as np
1313
import scipy.spatial as spat
14-
from packaging.version import Version
1514
from scipy import sparse
1615

1716
from ..common import HAS_JIT, jit, requires
@@ -26,8 +25,6 @@
2625
try:
2726
import shapely
2827

29-
assert Version(shapely.__version__) >= Version("2")
30-
3128
HAS_SHAPELY = True
3229
except (ModuleNotFoundError, AssertionError):
3330
HAS_SHAPELY = False
@@ -653,18 +650,14 @@ def _filter_holes(geoms, points): # noqa: ARG001
653650
"""
654651
Filter hole polygons using a computational geometry solution
655652
"""
656-
import geopandas
657653

658654
if (geoms.interiors.apply(len) > 0).any():
659655
from shapely.geometry import Polygon
660656

661657
# Extract the "shell", or outer ring of the polygon.
662658
shells = geoms.exterior.apply(Polygon)
663659
# Compute which original geometries are within each shell, self-inclusive
664-
if Version(geopandas.__version__) >= Version("0.13"):
665-
inside, outside = shells.sindex.query(geoms, predicate="within")
666-
else:
667-
inside, outside = shells.sindex.query_bulk(geoms, predicate="within")
660+
inside, outside = shells.sindex.query(geoms, predicate="within")
668661

669662
# Now, create the sparse matrix relating the inner geom (rows)
670663
# to the outer shell (cols) and take the sum.

libpysal/cg/tests/test_ashapes.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22

33
import geopandas
44
import numpy as np
5-
from packaging.version import Version
65
from shapely import geometry
76

87
from ...examples import get_path
98
from ..alpha_shapes import alpha_shape, alpha_shape_auto
109

11-
GPD_013 = Version(geopandas.__version__) >= Version("0.13")
12-
1310
this_directory = os.path.dirname(__file__)
1411

1512

@@ -105,19 +102,12 @@ def test_holes(self):
105102
holes = geopandas.GeoSeries(geoms.interiors.explode()).reset_index(drop=True)
106103
assert len(holes) == 30
107104
# No holes are within the shape (shape has holes already)
108-
if GPD_013:
109-
result = geoms.sindex.query(holes.centroid, predicate="within")
110-
else:
111-
result = geoms.sindex.query_bulk(holes.centroid, predicate="within")
105+
result = geoms.sindex.query(holes.centroid, predicate="within")
112106

113107
assert result.shape == (2, 0)
114108
# All holes are within the exterior
115109
shell = geopandas.GeoSeries(geoms.exterior.apply(geometry.Polygon))
116-
if GPD_013:
117-
within, outside = shell.sindex.query(holes.centroid, predicate="within")
118-
else:
119-
within, outside = shell.sindex.query_bulk(
120-
holes.centroid, predicate="within"
121-
)
110+
within, outside = shell.sindex.query(holes.centroid, predicate="within")
111+
122112
assert (outside == 0).all()
123113
np.testing.assert_array_equal(within, np.arange(30))

0 commit comments

Comments
 (0)