From f1ca6f74e8a4b033d8eab3148ff5830577f18a56 Mon Sep 17 00:00:00 2001 From: Phil Schaf Date: Tue, 14 Jan 2025 13:28:55 +0100 Subject: [PATCH] Almost fix docs --- docs/conf.py | 4 +++- docs/fileformat-prose.md | 2 +- src/anndata/abc.py | 2 +- src/anndata/compat/__init__.py | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 03d9c8b20..9810b1842 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -132,7 +132,7 @@ def setup(app: Sphinx): python=("https://docs.python.org/3", None), scipy=("https://docs.scipy.org/doc/scipy", None), sklearn=("https://scikit-learn.org/stable", None), - zarr=("https://zarr.readthedocs.io/en/v2.18.4/", None), + zarr=("https://zarr.readthedocs.io/en/stable/", None), xarray=("https://docs.xarray.dev/en/stable", None), dask=("https://docs.dask.org/en/stable", None), ) @@ -145,6 +145,8 @@ def setup(app: Sphinx): "anndata._types.WriteCallback": "anndata.experimental.WriteCallback", "anndata._types.Read": "anndata.experimental.Read", "anndata._types.Write": "anndata.experimental.Write", + "zarr.core.array.Array": "zarr.Array", + "zarr.core.group.Group": "zarr.Group", } autodoc_type_aliases = dict( NDArray=":data:`~numpy.typing.NDArray`", diff --git a/docs/fileformat-prose.md b/docs/fileformat-prose.md index 831b441e9..4245103ac 100644 --- a/docs/fileformat-prose.md +++ b/docs/fileformat-prose.md @@ -91,7 +91,7 @@ Using this information, we're able to dispatch onto readers for the different el ## Dense arrays Dense numeric arrays have the most simple representation on disk, -as they have native equivalents in H5py {doc}`h5py:high/dataset` and Zarr {ref}`Arrays `. +as they have native equivalents in H5py {doc}`h5py:high/dataset` and Zarr {doc}`Arrays `. We can see an example of this with dimensionality reductions stored in the `obsm` group: `````{tab-set} diff --git a/src/anndata/abc.py b/src/anndata/abc.py index df8c8a6e8..b0706210b 100644 --- a/src/anndata/abc.py +++ b/src/anndata/abc.py @@ -57,7 +57,7 @@ def to_memory(self) -> csr_matrix | csc_matrix | SpArray: _sparse_dataset_doc = """\ On disk {format} sparse matrix. -Analogous to :class:`h5py.Dataset` or :class:`zarr.core.Array`, but for sparse matrices. +Analogous to :class:`h5py.Dataset` or :class:`zarr.Array`, but for sparse matrices. """ diff --git a/src/anndata/compat/__init__.py b/src/anndata/compat/__init__.py index 23acad98c..1701e410f 100644 --- a/src/anndata/compat/__init__.py +++ b/src/anndata/compat/__init__.py @@ -98,12 +98,12 @@ def __exit__(self, *_exc_info) -> None: class ZarrArray: @staticmethod def __repr__(): - return "mock zarr.core.Array" + return "mock zarr.Array" class ZarrGroup: @staticmethod def __repr__(): - return "mock zarr.core.Group" + return "mock zarr.Group" @cache