Repository navigation
Update to python-copier-template 5.2.0 and restructure docs - #248
Conversation
Update the project from copier template 5.0.2 to 5.2.0 and switch
docs_type from README to sphinx, reflecting the project's existing
Sphinx documentation.
The new template uses a flat MyST-Markdown docs layout in place of the
old nested reStructuredText tree:
- Remove docs/user/* and docs/developer/* (.rst), docs/index.rst and
docs/genindex.rst.
- Add flat docs/{tutorials,how-to,explanations,reference}.md section
pages plus tutorials/, how-to/ and explanations/ subdirs, converted
to Markdown.
- Regenerate API reference via autosummary (docs/_api.rst).
- Drop the boilerplate developer how-to guides (lint, make-release,
pin-requirements, run-tests, static-analysis, test-container,
update-tools, dev-install); these are maintained upstream in the
template's own hosted docs.
- README: add Docker/Documentation table rows and the "README only
content" marker so docs/index.md can include the shared intro; use
absolute raw image URLs so screenshots render on GitHub and in the
docs site.
Template-driven config changes: add Sphinx dev dependencies and the
docs/docs-autobuild tox envs, add the _docs.yml and periodic.yml
workflows, bump the devcontainer/runtime images noble -> resolute,
add the Python 3.14 classifier, and enable doctest collection.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
📝 WalkthroughWalkthroughThe PR updates Copier answers to 5.2.0, adds Sphinx autosummary docs support, restructures the docs into new Markdown landing pages and guides, introduces ADR documents, and changes CI, periodic link checking, Docker, and release-related workflow wiring. ChangesDocumentation migration and workflow updates
Sequence Diagram(s)sequenceDiagram
participant DocsJob as "ci.yml docs job"
participant DocsWorkflow as "_docs.yml"
participant DocsBuild as "uv run --locked tox -e docs"
participant GhPagesAction as "peaceiris/actions-gh-pages"
participant GhPagesBranch as "gh-pages"
DocsJob->>DocsWorkflow: workflow_call
DocsWorkflow->>DocsBuild: build docs
DocsBuild-->>DocsWorkflow: build/html
DocsWorkflow->>DocsWorkflow: move build/html into .github/pages/$DOCS_VERSION
DocsWorkflow->>DocsWorkflow: regenerate .github/pages/switcher.json
DocsWorkflow->>GhPagesAction: publish .github/pages
GhPagesAction->>GhPagesBranch: push with keep_files: true
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/explanations/decisions.md (1)
1-13: 🩺 Stability & Availability | 🟠 MajorFix the
toctreeglob flag indocs/explanations/decisions.md.:glob:is a flag option, so:glob: trueshould be changed to:glob:to avoid invalid MyST/Sphinx syntax.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/explanations/decisions.md` around lines 1 - 13, The toctree in decisions.md uses invalid MyST/Sphinx syntax because the glob option is written as a value instead of a flag. Update the toctree directive in the Architectural Decision Records section to use the correct :glob: flag form, keeping the existing globbed decisions/* target and the rest of the directive unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/how-to/run-container.md`:
- Around line 8-12: Update the container example in the documentation to use a
fixed release tag instead of the mutable latest tag, and change the command
block to a shell-fenced code block. Locate the docker run example in the
run-container guide and replace the image reference with a release-tag
placeholder so the documented image stays stable over time.
In `@docs/tutorials/installation.md`:
- Around line 8-10: The fenced command examples in this tutorial are unlabeled,
which triggers markdownlint and hurts highlighting. Update the shell command
blocks in the installation doc to use the shell fence instead of plain fences,
and apply the same change to each remaining command example. Use the fenced code
blocks around the Python and package manager commands as the anchors for the
edit.
---
Outside diff comments:
In `@docs/explanations/decisions.md`:
- Around line 1-13: The toctree in decisions.md uses invalid MyST/Sphinx syntax
because the glob option is written as a value instead of a flag. Update the
toctree directive in the Architectural Decision Records section to use the
correct :glob: flag form, keeping the existing globbed decisions/* target and
the rest of the directive unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 80eeb812-f16a-41e8-934c-51394a998b50
⛔ Files ignored due to path filters (2)
docs/images/dls-logo.svgis excluded by!**/*.svguv.lockis excluded by!**/*.lock
📒 Files selected for processing (47)
.copier-answers.yml.github/CONTRIBUTING.md.github/workflows/_docs.yml.github/workflows/ci.yml.github/workflows/periodic.ymlDockerfileREADME.mddocs/_api.rstdocs/_templates/custom-module-template.rstdocs/conf.pydocs/developer/explanations/decisions.rstdocs/developer/explanations/decisions/0001-record-architecture-decisions.rstdocs/developer/explanations/decisions/0002-switched-to-pip-skeleton.rstdocs/developer/how-to/build-docs.rstdocs/developer/how-to/contribute.rstdocs/developer/how-to/lint.rstdocs/developer/how-to/make-release.rstdocs/developer/how-to/pin-requirements.rstdocs/developer/how-to/run-tests.rstdocs/developer/how-to/static-analysis.rstdocs/developer/how-to/test-container.rstdocs/developer/how-to/update-tools.rstdocs/developer/index.rstdocs/developer/reference/standards.rstdocs/developer/tutorials/dev-install.rstdocs/explanations.mddocs/explanations/decisions.mddocs/explanations/decisions/0001-record-architecture-decisions.mddocs/explanations/decisions/0002-switched-to-python-copier-template.mddocs/explanations/decisions/COPYMEdocs/genindex.mddocs/genindex.rstdocs/how-to.mddocs/how-to/contribute.mddocs/how-to/run-container.mddocs/index.mddocs/index.rstdocs/reference.mddocs/tutorials.mddocs/tutorials/installation.mddocs/user/explanations/docs-structure.rstdocs/user/how-to/run-container.rstdocs/user/index.rstdocs/user/reference/api.rstdocs/user/tutorials/installation.rstpyproject.tomlrenovate.json
💤 Files with no reviewable changes (22)
- docs/developer/explanations/decisions.rst
- docs/developer/tutorials/dev-install.rst
- docs/user/explanations/docs-structure.rst
- docs/developer/index.rst
- docs/developer/how-to/make-release.rst
- docs/developer/how-to/test-container.rst
- docs/developer/reference/standards.rst
- docs/user/how-to/run-container.rst
- docs/developer/how-to/run-tests.rst
- docs/developer/how-to/contribute.rst
- docs/developer/how-to/pin-requirements.rst
- docs/user/tutorials/installation.rst
- docs/user/index.rst
- docs/developer/how-to/lint.rst
- docs/index.rst
- docs/developer/how-to/build-docs.rst
- docs/developer/explanations/decisions/0002-switched-to-pip-skeleton.rst
- docs/developer/explanations/decisions/0001-record-architecture-decisions.rst
- docs/user/reference/api.rst
- docs/developer/how-to/static-analysis.rst
- docs/developer/how-to/update-tools.rst
- docs/genindex.rst
Summary
Updates the project from DiamondLightSource
python-copier-template5.0.2 → 5.2.0 and switchesdocs_typefromREADMEto sphinx (reflecting the project's existing Sphinx docs). The headline change is a docs restructure from the old nested reStructuredText tree to the template's flat MyST-Markdown layout.Docs restructure
docs/user/*,docs/developer/*,docs/index.rst,docs/genindex.rst(all.rst).docs/{tutorials,how-to,explanations,reference}.mdsection pages plustutorials/,how-to/,explanations/subdirs, converted to Markdown.docs/_api.rst).Docker/Documentationtable rows and the<!-- README only contentmarker sodocs/index.mdcan include the shared intro; switched the two screenshots to absolute raw GitHub URLs so they render both on GitHub and in the docs site (a relativedocs/images/...path breaks once included intodocs/index.md).Template-driven config changes
myst-parser,pydata-sphinx-theme,sphinx-design,sphinx-copybutton,sphinx-autobuild) and thedocs/docs-autobuildtox envs..github/workflows/_docs.yml(build + publish to gh-pages) andperiodic.yml(weekly linkcheck); wire thedocsjob intoci.yml.noble → resolute;uv sync --managed-pythonin the Dockerfile.Verification
tox -e docs/sphinx-build --fail-on-warningbuilds cleanly (zero warnings).ruff check,ruff format --check,pyright, 35 tests, andpre-commit run --all-filesall pass;uv.lockupdated.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Chores