Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""Sphinx docs configuration."""

project = "scverse-doc"
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ lint.select = [
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"CPY", # flake8-copyright
"D", # pydocstyle
"E", # Error detected by Pycodestyle
"F", # Errors detected by Pyflakes
Expand All @@ -149,8 +150,10 @@ lint.ignore = [
"E741", # allow I, O, l as variable names -> I is the identity matrix
"TID252", # Allow relative imports
]
lint.per-file-ignores."**/*.ipynb" = [ "CPY001" ] # Missing copyright notice in notebook is fine
lint.per-file-ignores."docs/*" = [ "I" ]
lint.per-file-ignores."tests/*" = [ "D" ]
lint.flake8-copyright.notice-rgx = "SPDX-License-Identifier: MPL-2\\.0"
lint.pydocstyle.convention = "numpy"

[tool.mypy]
Expand Down
1 change: 1 addition & 0 deletions scripts/sync_brand_tokens.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env -S uv run --script
# SPDX-License-Identifier: MPL-2.0
# /// script
# requires-python = ">=3.12"
# dependencies = []
Expand Down
1 change: 1 addition & 0 deletions src/scverse_doc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""The scverse Sphinx theme and shared documentation configuration.

A package’s `conf.py` needs few lines:
Expand Down
1 change: 1 addition & 0 deletions src/scverse_doc/_color.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""Colour maths for deriving accessible accent shades.

Package accents are chosen for brand recognition, not for contrast.
Expand Down
1 change: 1 addition & 0 deletions src/scverse_doc/autodoc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""The layout of the API pages.

Ships :mod:`~sphinx.ext.autosummary` templates for modules and classes.
Expand Down
1 change: 1 addition & 0 deletions src/scverse_doc/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""The extension stack and the shared defaults.

Sets up the extensions in :data:`EXTENSIONS`, so `conf.py` lists only ``scverse_doc``,
Expand Down
1 change: 1 addition & 0 deletions src/scverse_doc/napoleon.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""Prose return sections in NumPy-style docstrings.

:mod:`sphinx.ext.napoleon` reads a NumPy-style ``Returns`` section as a list of ``name : type`` entries.
Expand Down
1 change: 1 addition & 0 deletions src/scverse_doc/registry.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""The scverse package registry.

:data:`packages` and :func:`core_packages` give the `listed packages`_ as :class:`Package` objects;
Expand Down
1 change: 1 addition & 0 deletions src/scverse_doc/source.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""Links into the source repository: the repository icon, “edit this page”, and ``[source]``.

Declare the repository with :confval:`source_repository`.
Expand Down
1 change: 1 addition & 0 deletions src/scverse_doc/theme/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""The scverse theme: brand chrome, the per-package accent, and the ecosystem dropdown.

:mod:`scverse_doc` selects this theme; on its own, set ``html_theme = "scverse"``.
Expand Down
1 change: 1 addition & 0 deletions tests/roots/autodoc/apimod.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""A module to document."""

from typing import Generic, TypeVar
Expand Down
1 change: 1 addition & 0 deletions tests/roots/autodoc/apipkg/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# SPDX-License-Identifier: MPL-2.0
"""A package to document recursively."""
1 change: 1 addition & 0 deletions tests/roots/autodoc/apipkg/sub/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# SPDX-License-Identifier: MPL-2.0
"""A subpackage."""
1 change: 1 addition & 0 deletions tests/roots/autodoc/apipkg/sub/deep.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# SPDX-License-Identifier: MPL-2.0
"""A module two levels down."""
1 change: 1 addition & 0 deletions tests/roots/autodoc/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
import sys
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions tests/roots/entry-point/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
project = "pertpy"
# ``scverse_doc`` is not listed: Sphinx must load the theme from its entry point,
# and the theme must bring ``scverse_doc.source`` with it – late enough that
Expand Down
1 change: 1 addition & 0 deletions tests/roots/minimal/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
project = "pertpy"
extensions = ["scverse_doc", "sphinx.ext.linkcode"]
source_repository = "https://github.com/scverse/pertpy"
Expand Down
1 change: 1 addition & 0 deletions tests/roots/override/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
project = "not-an-scverse-package"
extensions = ["scverse_doc"]
html_theme_options = {"show_toc_level": 4, "announcement": ""}
Expand Down
1 change: 1 addition & 0 deletions tests/test_build.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""End-to-end builds of the fixture documentation trees."""

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions tests/test_color.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""Contrast guarantees for the derived accents."""

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions tests/test_registry.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""The fetched registry and the intersphinx mapping built from it."""

from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions tests/test_source.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: MPL-2.0
"""The repository description derived from the ``source_*`` config values."""

from __future__ import annotations
Expand Down
Loading