Repository navigation
Set up Sphinx docs with sphinxcontrib-towncrier - #103
rodrigobnogueira wants to merge 4 commits into
Conversation
Mixed activityActivity patterns show a mix of organic and automated signals. Evidence
Last 5 PRs:
This is an automated analysis by AgentScan |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #103 +/- ##
==========================================
- Coverage 91.28% 88.21% -3.08%
==========================================
Files 19 19
Lines 3257 3257
Branches 38 38
==========================================
- Hits 2973 2873 -100
- Misses 273 373 +100
Partials 11 11
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
[Medium impact] This PR appears safe to merge; no new actionable issues were found. Reviews (3) · Last reviewed commit: "Add a change note" · Reviewed by Greptile |
|
The red jobs come from |
56697b9 to
e734f59
Compare
The pages render the README with MyST-Parser, so the Markdown change notes can be added to them later. `tox run -e build-docs` builds them with warnings treated as errors. The configuration starts from the one in pip-tools. It reads the version from aiofastnet/_version.py, so building the docs doesn't need the extension modules compiled. The build dependencies are pinned: docs/requirements.txt is compiled from docs/requirements.in with `tox run -e pip-compile-docs`. With warnings treated as errors, an unpinned build would break on any new warning from a dependency release.
The changelog page comes from pip-tools: it renders CHANGELOG.md
and, through sphinxcontrib-towncrier, a draft of the change notes in
docs/changelog.d/ that are not released yet. sphinx-issues provides
the {issue}, {commit} and {user} roles that the template and the notes
use. The draft is left out of builds for tags on Read the Docs.
The change note guide points to `tox run -e build-docs` again for
previews, as pip-tools' does.
The configuration is the one from pip-tools. Read the Docs runs the same build-docs tox environment through uv and uses the dirhtml builder.
e734f59 to
89a0d66
Compare
What do these changes do?
Adds Sphinx docs written with MyST: the README and a changelog page where
sphinxcontrib-towncrierrenders the unreleased change notes.conf.py,changelog.md, thebuild-docstox env and.readthedocs.yamlcome from pip-tools, trimmed to what this repo uses. Three differences:docs/changelog.d/is excluded from the Sphinx sources because it sits underdocs/here;conf.pyreadsaiofastnet/_version.pyinstead of installing the package, so building the docs doesn't compile the extensions; andhtml_extra_pathcopiesaiofastnet.svgnext to the pages, because the README embeds it with a relative path.docs/requirements.txtis compiled fromdocs/requirements.inwithtox run -e pip-compile-docs. The build runs with-W, so unpinned dependencies would turn any new upstream warning into a red build; there is no Dependabot config yet, so bumps are manual.Nothing builds the docs in CI yet; that belongs with the reusable-tox self-checks from #82. The project also has to be imported on Read the Docs (the Documentation URL in
pyproject.tomlis a 404 today). Itsstableversion will fail until the next tag, since v1.2.0 has none of these files;latest, whichpyproject.tomllinks to, will work.Are there changes in behavior for the user?
No.
Is it a substantial burden for the maintainers to support this?
No. The pages are built from the README and the changelog; the only coupling is
docs/index.mdskipping the README's first line, an empty#heading.Related issue number
Part of #82
Checklist
docs/changelog.d/folder