Skip to content
Closed
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
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse",
"commit": "8c6abe9294f083e19c990f9c8e79d82b0eecbc8d",
"commit": "27f1e4abced9f9b7c557955c3c8ac3344fb542a6",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down Expand Up @@ -37,7 +37,7 @@
"trim_blocks": true
},
"_template": "/home/runner/work/cookiecutter-scverse/cookiecutter-scverse",
"_commit": "8c6abe9294f083e19c990f9c8e79d82b0eecbc8d"
"_commit": "27f1e4abced9f9b7c557955c3c8ac3344fb542a6"
}
},
"directory": null
Expand Down
1 change: 0 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ build:
os: ubuntu-24.04
tools:
python: "3.14"
nodejs: latest
jobs:
create_environment:
- asdf plugin add uv
Expand Down
1 change: 1 addition & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$schema": "https://biomejs.dev/schemas/2.6.3/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"formatter": { "useEditorconfig": true },
"markdown": { "parser": { "frontmatter": true } },
"overrides": [
{
"includes": ["./.vscode/*.json", "**/*.jsonc"],
Expand Down
Empty file removed docs/_templates/.gitkeep
Empty file.
123 changes: 12 additions & 111 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,137 +1,38 @@
# Configuration file for the Sphinx documentation builder.
# `scverse_doc` sets the theme and shared defaults, see https://scverse-doc.readthedocs.io
# For the full list of options, see https://www.sphinx-doc.org/page/usage/configuration.html

# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/page/usage/configuration.html

# -- Path setup --------------------------------------------------------------
import shutil
import sys
from datetime import datetime
from importlib.metadata import metadata
from pathlib import Path

from sphinxcontrib import katex

HERE = Path(__file__).parent
sys.path.insert(0, str(HERE / "extensions"))


# -- Project information -----------------------------------------------------

# NOTE: If you installed your project in editable mode, this might be stale.
# If this is the case, reinstall it to refresh the metadata
info = metadata("cookiecutter-scverse-instance")
project = info["Name"]
author = info["Author"]
copyright = f"{datetime.now():%Y}, {author}."
version = info["Version"]
version = release = info["Version"]
urls = dict(pu.split(", ") for pu in info.get_all("Project-URL"))
repository_url = urls["Source"]

# The full version, including alpha/beta/rc tags
release = info["Version"]
source_repository = urls["Source"]

bibtex_bibfiles = ["references.bib"]
templates_path = ["_templates"]
nitpicky = True # Warn about broken links
needs_sphinx = "4.0"

html_context = {
"display_github": True, # Integrate GitHub
"github_user": "scverse",
"github_repo": project,
"github_version": "main",
"conf_py_path": "/docs/",
}

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings.
# They can be extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
"myst_nb",
"sphinx_copybutton",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"scverse_doc",
"scverse_misc.sphinx_ext",
"sphinxcontrib.bibtex",
"sphinxcontrib.katex",
"sphinx_autodoc_typehints",
"sphinx_design",
"IPython.sphinxext.ipython_console_highlighting",
"sphinxext.opengraph",
"scverse_misc.sphinx_ext",
*[p.stem for p in (HERE / "extensions").glob("*.py")],
]

autosummary_generate = True
autodoc_member_order = "groupwise"
default_role = "literal"
napoleon_google_docstring = False
napoleon_numpy_docstring = True
napoleon_include_init_with_doc = False
napoleon_use_rtype = True # having a separate entry generally helps readability
napoleon_use_param = True
myst_heading_anchors = 6 # create anchors for h1-h6
myst_enable_extensions = [
"amsmath",
"colon_fence",
"deflist",
"dollarmath",
"html_image",
"html_admonition",
]
myst_url_schemes = ("http", "https", "mailto")
nb_output_stderr = "remove"
nb_execution_mode = "off"
nb_merge_streams = True
bibtex_bibfiles = ["references.bib"]
typehints_defaults = "braces"
always_use_bars_union = True # use `|` instead of `Union` in types even when building with Python ≤3.14

source_suffix = {
".rst": "restructuredtext",
".ipynb": "myst-nb",
".myst": "myst-nb",
}

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"anndata": ("https://anndata.scverse.org/en/stable/", None),
"scanpy": ("https://scanpy.scverse.org/en/stable/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
}

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"]


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]

html_title = project

html_theme_options = {
"repository_url": repository_url,
"use_repository_button": True,
"path_to_docs": "docs/",
"navigation_with_keys": False,
xref_overrides = {
# If building the documentation fails because a type annotation links to a private path
# (e.g. `igraph._igraph.GraphBase`), map it to the documented name here.
# For a missing link that can’t be fixed this way, add it to `nitpick_ignore` instead.
# "igraph._igraph.GraphBase": "igraph.GraphBase",
}

pygments_style = "default"
katex_prerender = shutil.which(katex.NODEJS_BINARY) is not None

nitpick_ignore = [
# If building the documentation fails because of a missing link that is outside your control,
# you can add an exception to this list.
# ("py:class", "igraph.Graph"),
]
10 changes: 2 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,11 @@ test = [
doc = [
"ipykernel",
"ipython",
"myst-nb>=1.1",
"pandas",
"scverse-misc[sphinx]>=0.1.2",
"sphinx>=8.1",
"scverse-doc[full]>=0.5",
"scverse-misc[sphinx]>=0.1.8",
"sphinx-autodoc-typehints",
"sphinx-book-theme>=1",
"sphinx-copybutton",
"sphinx-design",
"sphinxcontrib-bibtex>=1",
"sphinxcontrib-katex",
"sphinxext-opengraph",
]
typecheck = [
"mypy",
Expand Down
Loading