Implementation:Sdv dev SDV Sphinx Documentation Config
| Knowledge Sources | |
|---|---|
| Domains | Documentation, Build_Configuration |
| Last Updated | 2026-02-14 19:00 GMT |
Overview
Concrete tool for configuring Sphinx documentation builds provided by the SDV project.
Description
The docs/conf.py file is the Sphinx documentation build configuration for the SDV library. It defines the project metadata, Sphinx extensions (autodoc, napoleon, viewcode, sphinx-reredirects), URL redirects from the old documentation site to the new docs.sdv.dev domain, HTML theme settings, and output format options (HTML, LaTeX, man pages, Texinfo). The file is auto-generated by sphinx-quickstart and customized for SDV.
Usage
This configuration is consumed by Sphinx when building the SDV documentation site. It is not imported directly by user code. Modify this file when adding new Sphinx extensions, changing theme options, or updating URL redirects.
Code Reference
Source Location
- Repository: Sdv_dev_SDV
- File: docs/conf.py
- Lines: 1-694
Signature
# Module-level configuration variables (not a class/function)
extensions = [
'sphinx.ext.autosectionlabel',
'sphinx.ext.githubpages',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'IPython.sphinxext.ipython_console_highlighting',
'sphinx_toolbox.collapse',
'sphinx_reredirects',
]
redirects = {
# ~470 URL redirects from old docs to docs.sdv.dev
...
}
project = 'SDV'
html_theme = 'sdv_theme'
Import
# Not importable — executed by Sphinx at build time
# Usage: sphinx-build -b html docs/ docs/_build/
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| sdv (module) | Python module | Yes | Imported to read __version__ for docs versioning |
Outputs
| Name | Type | Description |
|---|---|---|
| extensions | list[str] | Sphinx extensions to activate during build |
| redirects | dict[str, str] | URL redirect map (old path to new URL) |
| html_theme | str | Theme name for rendered HTML documentation |
| version | str | Project version string extracted from sdv.__version__ |
Usage Examples
Building the Documentation
# From the repository root
cd docs/
sphinx-build -b html . _build/html
# Or using make
make html
Adding a New Sphinx Extension
# In docs/conf.py, add to extensions list:
extensions = [
'sphinx.ext.autosectionlabel',
'sphinx.ext.githubpages',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'IPython.sphinxext.ipython_console_highlighting',
'sphinx_toolbox.collapse',
'sphinx_reredirects',
'sphinx_copybutton', # new extension
]