Skip to content

Commit c4a96e6

Browse files
authored
BUG: fix index in spatial partitions (#329)
1 parent d60b432 commit c4a96e6

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.github/workflows/tests.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
defaults:
2525
run:
2626
shell: bash -l {0}
27-
continue-on-error: true
2827
strategy:
2928
matrix:
3029
os: [ubuntu-latest]

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ Version 0.5.0 (upcoming)
66

77
Deprecations and compatibility notes:
88

9-
- The deprecated `geom_almost_equals` method has been removed. Use `geom_equals_exact` instead.
9+
- The deprecated `geom_almost_equals` method has been removed. Use `geom_equals_exact` instead (#326).
10+
11+
Bug fixes:
12+
13+
- Fixed index in spatial partitions (#329).
1014

1115

1216
Version 0.4.3 (January, 2025)

dask_geopandas/expr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def calculate_spatial_partitions(self):
233233
)
234234
).compute(),
235235
crs=self.crs,
236-
)
236+
).reset_index(drop=True)
237237
self.spatial_partitions = parts
238238

239239
def _propagate_spatial_partitions(self, new_object):

dask_geopandas/tests/io/test_arrow.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ def test_roundtrip(tmp_path, naturalearth_lowres):
9292
assert_geodataframe_equal(result_gpd, df)
9393
# reading back also populates the spatial partitioning property
9494
ddf.calculate_spatial_partitions()
95-
assert_geoseries_equal(result.spatial_partitions, ddf.spatial_partitions.envelope)
95+
assert_geoseries_equal(
96+
result.spatial_partitions,
97+
ddf.spatial_partitions.envelope,
98+
)
9699

97100

98101
def test_roundtrip_s3(s3_resource, s3_storage_options, naturalearth_lowres):

0 commit comments

Comments
 (0)