Repository navigation
Use towncrier for changelog entries - #620
Conversation
Each change now adds its own file in changelog.d instead of editing docs/changes.rst, so pull requests no longer conflict on the changelog. towncrier build collects the entries into docs/changes.rst at release time, in the same format as before. The existing unreleased entries are moved into changelog.d unchanged.
|
Thanks, this looks great! The draft build reproduces the current entries exactly, and a real build plus the docs build with A few suggestions:
Small note on the description: entries aren't strictly sorted by file name. towncrier puts names containing a digit last ( |
Move the changelog entries added on main (remote FLAC requests, and multi-segment records in archives) into changelog.d.
Without an ignore list, towncrier silently skips files that are not valid fragments, so an entry with the wrong extension would never reach the changelog. List the files to ignore, so that any other file is an error, and run a draft build in the style check to catch this in the pull request that adds the entry. The release steps now take the version from pyproject.toml, where it is bumped in the first step, rather than giving it again on the command line.
As discussed in #606: each change now adds its own file in
changelog.d/instead of editingdocs/changes.rst, so pull requests no longer conflict on the changelog..rstfiles named after the change (for examplerr2ann-fixes.rst), in the same bold-heading format as now.changelog.d/README.rstexplains this.uv run towncrier build --version X.Y.Z --date "Mon YYYY"adds aVersion X.Y.Z (Mon YYYY)section todocs/changes.rstand deletes the fragments. Entries are sorted by file name.changelog.d/unchanged. I checked thattowncrier build --draftreproduces them exactly, and ran a real build on a copy: the docs build passes with-Wboth before and after.towncrieris pinned in thedevgroup, like Ruff. AGENTS.md and DEVELOPING.md are updated.One trade-off: the unreleased changes no longer show on the docs site until a release. If you'd like them there,
sphinxcontrib-towncriercan render a draft section, but that touchesdocs/conf.py, so I'd do it after #616.#619 and #583 add entries to
docs/changes.rst, so they'd need to move them into a fragment after this is merged (or the other way round, whichever goes in first).