Skip to content

Commit 618ab74

Browse files
authored
Merge pull request #324 from melonora/zarrv3
update for zarrv3 branch
2 parents 531769a + b543af7 commit 618ab74

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/spatialdata_io/converters/legacy_anndata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,4 +350,4 @@ def from_legacy_anndata(adata: AnnData) -> SpatialData:
350350
new_table = TableModel.parse(new_table, region=REGION, region_key=REGION_KEY, instance_key=INSTANCE_KEY)
351351
else:
352352
new_table = adata.copy()
353-
return SpatialData(table=new_table, images=images, shapes=shapes)
353+
return SpatialData(tables={"table": new_table}, images=images, shapes=shapes)

tests/converters/test_legacy_anndata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def blobs_annotating_element(name: BlobsTypes) -> SpatialData:
2626
n = len(instance_id)
2727
new_table = AnnData(shape=(n, 0), obs={"region": [name for _ in range(n)], "instance_id": instance_id})
2828
new_table = TableModel.parse(new_table, region=name, region_key="region", instance_key="instance_id")
29-
del sdata.table
30-
sdata.table = new_table
29+
del sdata["table"]
30+
sdata["table"] = new_table
3131
return sdata
3232

3333

@@ -67,7 +67,7 @@ def idempotency_check_from_anndata(adata0: SpatialData, include_images: bool) ->
6767

6868
@pytest.mark.parametrize("name", ["blobs_labels", "blobs_circles", "blobs_polygons", "blobs_multipolygons"])
6969
@pytest.mark.parametrize("include_images", [False, True])
70-
def test_bidectional_convesion(name: BlobsTypes, include_images: bool) -> None:
70+
def test_bidirectional_conversion(name: BlobsTypes, include_images: bool) -> None:
7171
if include_images:
7272
pytest.skip(
7373
"include_images=True can't be tested because the bug "

0 commit comments

Comments
 (0)