Skip to content

Set up Sphinx docs with sphinxcontrib-towncrier - #103

Open
rodrigobnogueira wants to merge 4 commits into
aio-libs:masterfrom
rodrigobnogueira:sphinx-towncrier-docs
Open

rodrigobnogueira wants to merge 4 commits into
aio-libs:masterfrom
rodrigobnogueira:sphinx-towncrier-docs

Conversation

@rodrigobnogueira

@rodrigobnogueira rodrigobnogueira commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

What do these changes do?

Adds Sphinx docs written with MyST: the README and a changelog page where sphinxcontrib-towncrier renders the unreleased change notes. conf.py, changelog.md, the build-docs tox env and .readthedocs.yaml come from pip-tools, trimmed to what this repo uses. Three differences: docs/changelog.d/ is excluded from the Sphinx sources because it sits under docs/ here; conf.py reads aiofastnet/_version.py instead of installing the package, so building the docs doesn't compile the extensions; and html_extra_path copies aiofastnet.svg next to the pages, because the README embeds it with a relative path.

docs/requirements.txt is compiled from docs/requirements.in with tox 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.toml is a 404 today). Its stable version will fail until the next tag, since v1.2.0 has none of these files; latest, which pyproject.toml links 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.md skipping the README's first line, an empty # heading.

Related issue number

Part of #82

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the docs/changelog.d/ folder

@agentscanapp

agentscanapp Bot commented Nov 9, 2026

Copy link
Copy Markdown

Mixed activity

Activity patterns show a mix of organic and automated signals.

View full analysis →

Evidence
  • Distributed PR pattern: 50 PRs spread across 22 different repositories (16.4 PRs/week)

Last 5 PRs:

This is an automated analysis by AgentScan

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.21%. Comparing base (e34a14b) to head (89a0d66).

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              
Flag Coverage Δ
Linux ?
Windows 81.96% <ø> (ø)
macOS 85.43% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps

greptile-apps Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[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

Comment thread tox.ini Resolved
@rodrigobnogueira

Copy link
Copy Markdown
Member Author

The red jobs come from ubuntu-latest moving to Ubuntu 26.04 (master's last run, on 10-31, was on 24.04). setup-python has no 3.9 build for it, which breaks ruff, mypy (3.9) and build (3.9, ubuntu-latest), and the CodSpeed runner (v4.19.1) stops with "Unsupported system" in benchmarks. Every PR and master will hit this. Pinning those jobs to ubuntu-24.04 fixes both; dropping 3.9 would only fix the first. I can open a PR for it.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant