From 20a58a48e77e58f4f45ad611ca10ab1c4a1bb193 Mon Sep 17 00:00:00 2001 From: Jan Gleixner Date: Thu, 15 Oct 2026 10:13:31 +0200 Subject: [PATCH 1/3] docs: document the tables and attrs parameters of SpatialData --- src/spatialdata/_core/spatialdata.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/spatialdata/_core/spatialdata.py b/src/spatialdata/_core/spatialdata.py index 9f5c91c7a..5e9a5783f 100644 --- a/src/spatialdata/_core/spatialdata.py +++ b/src/spatialdata/_core/spatialdata.py @@ -95,9 +95,11 @@ class SpatialData: Dict of 2D shapes elements (circles, polygons, multipolygons). Shapes are regions, they can't contain annotation, but they can be annotated by a table. The following parsers are available: :class:`~spatialdata.ShapesModel`. - table - AnnData table containing annotations for regions (labels and shapes). The following parsers is + tables + Dict of AnnData tables containing annotations for regions (labels and shapes). The following parser is available: :class:`~spatialdata.TableModel`. + attrs + Dictionary of global attributes on this SpatialData object. Notes ----- From c51d67941418bcc2a9465162019e3f2831c5a864 Mon Sep 17 00:00:00 2001 From: Jan Gleixner Date: Thu, 15 Oct 2026 10:13:37 +0200 Subject: [PATCH 2/3] docs: state that tables can annotate points in the SpatialData docstring --- src/spatialdata/_core/spatialdata.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/spatialdata/_core/spatialdata.py b/src/spatialdata/_core/spatialdata.py index 5e9a5783f..e39668c06 100644 --- a/src/spatialdata/_core/spatialdata.py +++ b/src/spatialdata/_core/spatialdata.py @@ -96,8 +96,8 @@ class SpatialData: Shapes are regions, they can't contain annotation, but they can be annotated by a table. The following parsers are available: :class:`~spatialdata.ShapesModel`. tables - Dict of AnnData tables containing annotations for regions (labels and shapes). The following parser is - available: :class:`~spatialdata.TableModel`. + Dict of AnnData tables containing annotations for SpatialElements (labels, shapes and points). The + following parser is available: :class:`~spatialdata.TableModel`. attrs Dictionary of global attributes on this SpatialData object. @@ -111,9 +111,8 @@ class SpatialData: - the table are stored as :class:`anndata.AnnData` objects, with the spatial coordinates stored in the obsm slot. - The table can annotate regions (shapes or labels) and can be used to store additional information. - Points are not regions but 0-dimensional locations. They can't be annotated by a table, but they can store - annotation directly. + Tables can annotate SpatialElements (labels, shapes or points) and can be used to store additional + information. Points can also store annotations directly, as additional dataframe columns. """ def __init__( From 913faf0d8787674f6179d4c6b759e2ea034d7245 Mon Sep 17 00:00:00 2001 From: Jan Gleixner Date: Thu, 15 Oct 2026 10:13:38 +0200 Subject: [PATCH 3/3] docs: refer to xarray.DataTree instead of datatree.DataTree --- src/spatialdata/_core/spatialdata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spatialdata/_core/spatialdata.py b/src/spatialdata/_core/spatialdata.py index e39668c06..1b6a17127 100644 --- a/src/spatialdata/_core/spatialdata.py +++ b/src/spatialdata/_core/spatialdata.py @@ -105,7 +105,7 @@ class SpatialData: ----- The SpatialElements are stored with standard types: - - images and labels are stored as :class:`xarray.DataArray` or :class:`datatree.DataTree` objects. + - images and labels are stored as :class:`xarray.DataArray` or :class:`xarray.DataTree` objects. - points are stored as :class:`dask.dataframe.DataFrame` objects. - shapes are stored as :class:`geopandas.GeoDataFrame`. - the table are stored as :class:`anndata.AnnData` objects, with the spatial coordinates stored in the obsm