Task summary
Add a reproducible, repository-local quality and documentation baseline for
RenCal. The rollout should make Ruff, pytest, Interrogate, and Sphinx use the
same locked development environment, while keeping current lint, documentation,
and docstring-coverage findings visible rather than hiding them with broad
exclusions.
Why this task is needed
RenCal already has Ruff, pytest, and Sphinx-related configuration, but the
tooling is split across dependency groups and does not yet provide a portable
documentation build, generated API documentation, or an automated view of
docstring coverage. Consolidating the checks gives contributors and CI a
repeatable baseline and makes documentation gaps measurable before any separate
cleanup work is undertaken.
Proposed implementation
- Update
pyproject.toml and regenerate uv.lock:
- Preserve the existing Python 3.12 support and runtime dependencies.
- Add Interrogate, Sphinx, AutoAPI, the Markdown builder, and the RTD theme
to the development environment used by CI. Reconcile the existing dev
and docs dependency groups rather than creating a second undocumented
dependency source.
- Keep the existing Ruff and pytest conventions, adding only the shared
settings needed for the rollout.
- Add or update CI checks so Ruff formatting and linting expose the current
baseline without blocking the initial rollout, while pytest remains blocking.
- Add portable Sphinx/AutoAPI configuration under
docs/source/ and a
docs/Makefile. Adapt AutoAPI paths and the index to RenCal's current
top-level rencal/ package and existing documentation structure; verify the
generated toctree target after the first build.
- Add
scripts/documentation/format_confluence_markdown.py and
scripts/documentation/post-process-confluence.sh to transform generated
AutoAPI Markdown into readable, Confluence-ready pages. The formatter should
clean anchors, generate stable dotted module names, rewrite renamed-page
links, and support clean/verbose operation.
- Add deterministic tests in
tests/documentation/test_format_confluence_markdown.py covering package
inference, module naming, output paths, heading/anchor cleanup, link
rewriting, multiple pages, and the no-input failure case. Tests must not
require credentials, network access, or external services.
- Add
pipelines/documentation.yml using uv sync --locked and the repository
development environment to:
- build Sphinx Markdown;
- generate Confluence-ready Markdown;
- run Interrogate with
--fail-under 0 --verbose;
- publish raw reports, generated documentation, and an informational
coverage summary as build artifacts.
- Keep the documentation build blocking, but treat Interrogate coverage as
informational. Do not conceal existing Ruff findings, undocumented code, or
Sphinx warnings with broad exclusions. Any exclusions must be narrow,
intentional, and reviewed.
- Update
.gitignore for raw Sphinx/AutoAPI output and explicitly choose
whether reviewed Confluence-ready pages are tracked.
Acceptance criteria
Additional context (Optional)
This is a tooling and baseline-establishment change, not a request for a large
Ruff cleanup or immediate docstring-coverage target. Fixing individual lint,
docstring, or Sphinx findings should be handled in follow-up issues. Existing
RenCal documentation is currently built as an Astro site under docs/web; the
Sphinx/AutoAPI setup should coexist with that site and avoid committing caches
or generated build artifacts.
Task summary
Add a reproducible, repository-local quality and documentation baseline for
RenCal. The rollout should make Ruff, pytest, Interrogate, and Sphinx use the
same locked development environment, while keeping current lint, documentation,
and docstring-coverage findings visible rather than hiding them with broad
exclusions.
Why this task is needed
RenCal already has Ruff, pytest, and Sphinx-related configuration, but the
tooling is split across dependency groups and does not yet provide a portable
documentation build, generated API documentation, or an automated view of
docstring coverage. Consolidating the checks gives contributors and CI a
repeatable baseline and makes documentation gaps measurable before any separate
cleanup work is undertaken.
Proposed implementation
pyproject.tomland regenerateuv.lock:to the development environment used by CI. Reconcile the existing
devand
docsdependency groups rather than creating a second undocumenteddependency source.
settings needed for the rollout.
baseline without blocking the initial rollout, while pytest remains blocking.
docs/source/and adocs/Makefile. Adapt AutoAPI paths and the index to RenCal's currenttop-level
rencal/package and existing documentation structure; verify thegenerated toctree target after the first build.
scripts/documentation/format_confluence_markdown.pyandscripts/documentation/post-process-confluence.shto transform generatedAutoAPI Markdown into readable, Confluence-ready pages. The formatter should
clean anchors, generate stable dotted module names, rewrite renamed-page
links, and support clean/verbose operation.
tests/documentation/test_format_confluence_markdown.pycovering packageinference, module naming, output paths, heading/anchor cleanup, link
rewriting, multiple pages, and the no-input failure case. Tests must not
require credentials, network access, or external services.
pipelines/documentation.ymlusinguv sync --lockedand the repositorydevelopment environment to:
--fail-under 0 --verbose;coverage summary as build artifacts.
informational. Do not conceal existing Ruff findings, undocumented code, or
Sphinx warnings with broad exclusions. Any exclusions must be narrow,
intentional, and reviewed.
.gitignorefor raw Sphinx/AutoAPI output and explicitly choosewhether reviewed Confluence-ready pages are tracked.
Acceptance criteria
AV3-1760-ruff-rencal.uv lock --checkanduv sync --locked --group devsucceed using thefinal
pyproject.tomlanduv.lock.uv run ruff check . --statistics,uv run ruff format ., anduv run pytestrun from the locked environment; Ruff findings arereported rather than broadly excluded and pytest remains blocking in CI.
make -C docs markdown SPHINXBUILD="uv run python -m sphinx.cmd.build"produces Markdown API documentation, with a verified valid AutoAPI
toctree and reviewed warnings.
documentation build and rewritten links resolve in the generated tree.
uv run pytest tests/documentation/test_format_confluence_markdown.py.--fail-under 0 --verbose, includes a parseableTOTALrow, and publishes an informational Markdown summary withoutfailing solely because coverage is low.
pipelines/documentation.ymlinstalls dependencies frompyproject.tomland
uv.lock, publishes documentation and reports, and replaces any olddocumentation pipeline name.
the documented artifact policy.
git diff --checkpasses and the final working tree/branch status isrecorded.
Additional context (Optional)
This is a tooling and baseline-establishment change, not a request for a large
Ruff cleanup or immediate docstring-coverage target. Fixing individual lint,
docstring, or Sphinx findings should be handled in follow-up issues. Existing
RenCal documentation is currently built as an Astro site under
docs/web; theSphinx/AutoAPI setup should coexist with that site and avoid committing caches
or generated build artifacts.