Changelog#
Please refer directly to the Releases section on GitHub, where you can find curated release notes for each release. For developers, please consult the contributing guide, which explains how to keep release notes are up-to-date at each release.
Unreleased#
Changed#
SpatialData.read()now only accepts a path or URL (str,PathorUPath) forfile_path; passing an already-openzarr.Groupraises aTypeError. Usespatialdata.read_zarr()to read from azarr.Group.SpatialData.attrsis now typed asdict[str, JSONValue]instead ofdict[Any, Any], making explicit the pre-existing invariant that the attrs must be JSON-serializable (they are stored as Zarr attributes). Accordingly,SpatialData.get_attrs()is now typed as returningJSONValue | pd.DataFrame: the previous annotation did not cover attrs values such as lists, numbers, booleans andNone, which have always been valid and are returned as-is whenreturn_as=None. This is a typing-only change, the runtime behaviour is unchanged.SpatialData.locate_element()now accepts a table (AnnData) in addition to aSpatialElement; tables were already located correctly, but the annotation did not allow passing them. This is a typing-only change, the runtime behaviour is unchanged.
Fixed#
Querying a
SpatialDataobject with multiple (batched) bounding boxes now raises an explicitNotImplementedErrorinstead of failing with an opaqueAssertionError. Batched queries are supported when querying aSpatialElementdirectly, but not when querying aSpatialDataobject, since that would require returning oneSpatialDataobject per bounding box.