Skip to content

Commit 62e24f4

Browse files
committed
fixed import
1 parent 7ea1bf7 commit 62e24f4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎tests/conftest.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,11 +528,11 @@ def _get_sdata_with_multiple_images(share_coordinate_system: str = "all"):
528528
return _get_sdata_with_multiple_images
529529

530530

531-
# Visium hex test fixtures
532531
@pytest.fixture
533532
def sdata_hexagonal_grid_spots():
534533
"""Create a hexagonal grid of points for testing visium_hex functionality."""
535534
from shapely.geometry import Point
535+
from spatialdata.models import ShapesModel
536536

537537
spacing = 10.0
538538
n_rows, n_cols = 4, 4
@@ -548,5 +548,7 @@ def sdata_hexagonal_grid_spots():
548548
gdf = GeoDataFrame(geometry=points)
549549
gdf["radius"] = 2.0 # Small radius for original circles
550550

551-
# Create SpatialData object
552-
return SpatialData(shapes={"spots": gdf})
551+
# Use ShapesModel.parse() to create a properly validated GeoDataFrame
552+
shapes_gdf = ShapesModel.parse(gdf)
553+
554+
return SpatialData(shapes={"spots": shapes_gdf})

0 commit comments

Comments
 (0)