Implements Read the Docs infrastructure to generate API documentation directly from code docstrings. Replaces static modules.md (1200+ lines). New structure: - docs/_source/conf.py — Sphinx configuration (furo theme) - docs/_source/index.rst — Main TOC - docs/_source/api/*.rst — Module groups (substrate, storage, retrieval, qa, distill, mesh, cli) - docs/_source/Makefile — Local build targets - docs/_source/README.md — Documentation on building and extending Makefile integration: - make docs-api — generate HTML (output: docs/_source/_build/html/) - make docs-api-clean — remove build artifacts Build output (40 HTML files): - API module reference with docstrings - Source code links (:viewcode: extension) - Full-text search index - Module index (genindex, py-modindex) Sphinx installed in venv as dev dependency. HTML is browseable at docs/_source/_build/html/index.html (open in browser after build). This justifies the deletion of modules.md: code docstrings + Sphinx autodoc = automatically-generated, always-current API reference.
52 lines
1.1 KiB
Python
52 lines
1.1 KiB
Python
"""Sphinx configuration for Aborist API reference."""
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# Add aborist package to path
|
|
project_root = Path(__file__).parent.parent.parent
|
|
sys.path.insert(0, str(project_root))
|
|
|
|
# Project info
|
|
project = "Aborist"
|
|
copyright = "2026, agent blackops"
|
|
author = "fox/timehexon"
|
|
version = "9.8"
|
|
release = "9.8.0"
|
|
|
|
# Extensions
|
|
extensions = [
|
|
"sphinx.ext.autodoc",
|
|
"sphinx.ext.napoleon",
|
|
"sphinx.ext.intersphinx",
|
|
"sphinx.ext.viewcode",
|
|
]
|
|
|
|
# Autodoc settings
|
|
autodoc_member_order = "bysource"
|
|
autodoc_typehints = "description"
|
|
autodoc_typehints_format = "short"
|
|
|
|
# Napoleon (Google/NumPy docstring) settings
|
|
napoleon_google_docstring = False
|
|
napoleon_numpy_docstring = True
|
|
napoleon_attr_annotations = True
|
|
|
|
# HTML output
|
|
html_theme = "furo"
|
|
html_static_path = ["_static"]
|
|
html_logo = None
|
|
html_title = "Aborist API Reference"
|
|
|
|
# Sidebar
|
|
html_sidebars = {
|
|
"**": ["sidebar/navigation.html", "sidebar/ethical-ads.html"]
|
|
}
|
|
|
|
# Suppress warnings for missing references
|
|
suppress_warnings = ["ref.doc"]
|
|
|
|
# Intersphinx mapping (for external doc links)
|
|
intersphinx_mapping = {
|
|
"python": ("https://docs.python.org/3", None),
|
|
}
|