scverse_doc.registry#
The scverse package registry.
One mapping drives the “scverse packages” navbar dropdown,
the per-package accent colour, and intersphinx_mapping.
Its data is scverse/ecosystem-packages’ published packages.json,
the same listing the website renders, fetched once per build and cached.
Only the accent colours are added here, because they live in the website’s SCSS instead.
- scverse_doc.registry.packages: Mapping[str, Package] = <scverse_doc.registry.Packages object>#
Every registered package, keyed and ordered by case-folded name.
- scverse_doc.registry.intersphinx(*extra: str, external: bool = True, core: bool = True) ChainMap[str, tuple[str, None]]#
Build an
intersphinx_mappingfor this package.Every entry is an inventory fetched on every build, so the ecosystem is opt-in by name.
- Parameters:
extra – Additional registry package names to include, e.g.
intersphinx("scanpy", "muon"). Unknown names raiseKeyError, ones without an inventoryValueError– on first access, not here, since aconf.pycalls this before the extension is loaded.external – Whether to include the non-scverse inventories (Python, NumPy, SciPy, pandas, Matplotlib).
core – Whether to include the core packages that publish an inventory.
Examples
>>> mapping = intersphinx("scanpy") >>> mapping["scanpy"] ('https://scanpy.scverse.org/...', None)
- class scverse_doc.registry.Package(name: str, kind: Literal['core', 'ecosystem'], docs: str, inventory: str | None = None, repo: str | None = None, description: str = '', accent: str = '#4557c4')#
One entry in the scverse package registry.
- docs: str#
Where to send a reader, verbatim from upstream – a link for humans, possibly not a docs root.
- inventory: str | None#
Root URL under which
objects.invresolves, orNoneif the package publishes none.
- scverse_doc.registry.cache_dir: Path | None = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/scverse-doc/checkouts/latest/docs/_build/doctrees/__scverse__')#
Where the fetched listing is cached;
Nonefetches every time. Seebuild_cache().
- scverse_doc.registry.build_cache(app: Sphinx) Path#
Point
cache_dirat a directory inside the build and return it.Call from
setup, i.e. afterconf.pyran: nothing may touch the registry before that – seeintersphinx().