diff --git a/docs/conf.py b/docs/conf.py index 42c1584..5f67d0a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -67,6 +67,8 @@ "sphinx.ext.mathjax", "IPython.sphinxext.ipython_console_highlighting", "sphinxext.opengraph", + "scanpydoc.elegant_typehints", + "scanpydoc.definition_list_typed_field", *[p.stem for p in (HERE / "extensions").glob("*.py")], ] @@ -140,10 +142,14 @@ nitpick_ignore = [ # https://github.com/duckdb/duckdb-web/issues/3806 ("py:class", "duckdb.duckdb.DuckDBPyConnection"), - # zarr doesn’t document its base Store class - ("py:class", "zarr._storage.store.Store"), ] +# Redirect broken parameter annotation classes +qualname_overrides = { + "zarr._storage.store.Store": "zarr.storage.MemoryStore", + "lnschema_core.models.Artifact": "lamindb.Artifact", +} + def setup(app: Sphinx) -> None: """Setup lamindb for CI.""" diff --git a/pyproject.toml b/pyproject.toml index 8404c86..a8a2adc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,7 @@ optional-dependencies.doc = [ "ipython", "myst-nb>=1.1", "pandas", + "scanpydoc", # Until pybtex >0.23.0 releases: https://bitbucket.org/pybtex-devs/pybtex/issues/169/ "setuptools", "sphinx>=4",