This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Documenteer is a Python package that provides Sphinx documentation tools, extensions, and configurations for Rubin Observatory/LSST projects. It supports two main documentation types:
- User guides: Complete documentation sites using pydata-sphinx-theme
- Technotes: Single-document technical notes using the technote theme
make init # Initialize development environment
uv sync --extra technote --extra guide --group dev --group nox --group lint # Install with all extrasTasks are run with nox (via nox-uv). Invoke nox through uv so the runner is provisioned automatically: uv run --only-group=nox nox -s <session>. The test, typing, and demo sessions are parametrized over both Python (3.12, 3.13) and Sphinx (8, 9, dev), so their session IDs carry both factors, e.g. nox -s "test-3.13(sphinx='8')". uv furnishes the requested interpreter on demand. Bare nox runs a lean default set (3.13 × Sphinx 8/9); run nox -l to see the exact IDs.
nox -s "test-3.13(sphinx='8')" # Run tests on Python 3.13 with Sphinx 8.x (sphinx also '9'/'dev'; python also '3.12')
nox -s test # Run the full Python × Sphinx grid
nox -s coverage-report # Generate coverage report
nox -s "typing-3.13(sphinx='8')" # Run mypy type checking
nox -s lint # Run linting (prek hooks, incl. prettier)
nox -s "demo-3.13(sphinx='9')" # Demo technote build (e2e smoke test; full grid via 'nox -s demo')
nox -s packaging # Check PyPI packagingCoverage is opt-in via DOCUMENTEER_COVERAGE=1, which runs the test suite under coverage and auto-combines a report. CI sets DOCUMENTEER_COVERAGE_NO_COMBINE=1 in each matrix cell so it uploads raw .coverage.* data for a central coverage-combine job to merge once across the whole matrix.
nox -s docs # Build documentation
nox -s docs-linkcheck # Check documentation linksmake clean # Remove build artifactsConfiguration System (src/documenteer/conf/):
guide.py: Sphinx configuration preset for user guidestechnote.py: Sphinx configuration preset for technotes_toml.py: TOML-based configuration models using Pydantic- Uses pydata-sphinx-theme for guides, technote package for technotes
Sphinx Extensions (src/documenteer/ext/):
jira.py: JIRA ticket referenceslsstdocushare.py: LSST DocuShare document linksopenapi.py: OpenAPI documentation integrationgithubbibcache.py: GitHub-based bibliography cachingbibtex.py: Enhanced BibTeX supportremotecodeblock.py: Remote code inclusionmockcoderefs.py: Mock code references for testingredoc.py: Redoc integration for HTTP API documentationrobots.py: robots.txt generation
CLI Tools (src/documenteer/cli.py):
technote add-author: Add authors to technote.toml from authordbtechnote sync-authors: Sync author info from central databasetechnote migrate: Migrate legacy technotes to modern formattechnote lint: Lint a technote's metadata, structure, and content. Rule codes are stable and carry their rule set's prefix:TNrules (TN0xx/TN1xx/TN2xx) check what any technote needs, andRrules (R0xx/R1xx) check Rubin's conventions and services. Each code has a landing page under docs/technotes/lint/
Services (src/documenteer/services/):
technoteauthor.py: Author management for technotestechnoteupdate.py: Technote update and legacy-migration logic
- Configuration as Code: Sphinx configurations are Python modules that can be imported
- Pydantic Models: TOML configuration validation using type-safe models
- Extension Architecture: Modular Sphinx extensions for specific Rubin/LSST needs
- Theme Integration: Tight integration with pydata-sphinx-theme and technote themes
- Uses nox (nox-uv) for multi-environment testing across Sphinx versions
- Sphinx test roots in
tests/roots/for extension testing - Coverage reporting with branch coverage
- Type checking with mypy
- Pre-commit hooks for code quality
- Follows ruff formatting (run lint command to automatically format)
- Numpydoc docstrings with types omitted (Sphinx documentation uses type annotations)
Static assets are managed in src/documenteer/assets/ including:
- Custom CSS and SCSS for Rubin branding
- JavaScript enhancements
- Favicon and logo assets
- Font files (Source Sans Pro)
Built assets are compiled using webpack with PostCSS processing.