API#

extensions = ["scverse_doc"] sets up every subextension below; each also works on its own.

The scverse Sphinx theme and shared documentation configuration.

A package’s conf.py needs few lines:

extensions = ["scverse_doc"]

source_repository = "https://github.com/scverse/pertpy"

This extension sets up the subextensions, each of which also works on its own:

scverse_doc.autodoc

The layout of the API pages.

scverse_doc.config

The extension stack and the shared defaults.

scverse_doc.napoleon

Prose return sections in NumPy-style docstrings.

scverse_doc.registry

The package registry, usable as an intersphinx() mapping.

scverse_doc.release_notes

A release-notes directive, rendering a directory of per-version files.

scverse_doc.source

The repository links: the header icon, “edit this page”, and [source].

scverse_doc.theme

The theme, its chrome, and the per-package accent.

scverse_doc.typed_fields

Parameters and attributes as definition lists.

scverse_doc.xref_overrides

Cross-references to objects documented under another name or role.

Anything set in conf.py wins.

scverse_doc.config#

config.EXTENSIONS

Extensions set up alongside this one, so packages list only scverse_doc.

config.MYST_ENABLE_EXTENSIONS

The MyST syntax extensions, i.e. the myst_enable_extensions entry of DEFAULTS.

config.DEFAULTS

Sphinx config values applied unless conf.py sets them.

scverse_doc.theme#

Registers the theme and its theme options. Selecting it with html_theme = "scverse" is enough on its own – it is a registered Sphinx theme, so it needs no extensions entry.

scverse_doc.source#

Repository links – the header icon, “edit this page”, and [source] – from the source_* config values, for whichever theme is selected.

scverse_doc.registry#

registry.packages

Every registered package, keyed and ordered by case-folded name.

registry.core_packages()

Return only the core packages.

registry.intersphinx(*extra[, external, core])

Build an intersphinx_mapping for this package.

registry.Package(name, kind, docs[, ...])

One entry in the scverse package registry.

scverse_doc.autodoc#

Autosummary templates for module and class pages, and private bases left out of :show-inheritance:.

scverse_doc.napoleon#

Prose Returns sections in NumPy-style docstrings.

scverse_doc.release_notes#

A release-notes directive, rendering a directory of per-version files grouped by minor version.

scverse_doc.typed_fields#

Parameters and attributes rendered as definition lists, like numpydoc.

scverse_doc.xref_overrides#

An xref_overrides config value, redirecting cross-references to objects documented under another name or role.