chore: assemble the changelog with towncrier, as SpyDE and anyplotlib do - #6
Merged
Merged
Conversation
Two open pull requests both added a block under `## [Unreleased]`, so both
conflicted with main over the same four lines — and neither conflict was about
the change. A shared changelog file makes every concurrent PR contend for one
spot; a fragment per PR does not.
Same layout as SpyDE and anyplotlib: fragments under `upcoming_changes/` named
`{PR}.{type}.rst`, assembled into `CHANGELOG.rst` by `towncrier build` at
release time. The type list is SpyDE's (behaviour changes lead the notes, where
an app upgrading cannot miss them); `package = "de_shell"` is set, which SpyDE
cannot do — this repo's version of record IS `de_shell.__version__`, the thing
publish.yml refuses to disagree with.
CHANGELOG.md becomes CHANGELOG.rst, with 0.2.0 through 0.2.2 carried over
rather than truncated: 80 lines is not worth losing to a format change. There
is no Prepare Release workflow here, so the build stays a documented manual
step; `uv tool run` rather than `uvx`, which is not installed everywhere.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both open pull requests — #2 and #4 — added a block under
## [Unreleased], soboth conflicted with
mainover the same four lines. Neither conflict was aboutthe change. A shared changelog file makes every concurrent PR contend for one
spot; a fragment per PR does not.
What this does
Same layout SpyDE and anyplotlib already use: a news fragment per pull request
under
upcoming_changes/, named{PR}.{type}.rst, assembled intoCHANGELOG.rstbytowncrier buildat release time. The type list is SpyDE's(the fuller one — it has
performance), with behaviour changes leading thenotes, where an app upgrading cannot miss them.
Two places this differs from SpyDE, both deliberate:
package = "de_shell"is set. SpyDE has to pass--versionexplicitlybecause its version of record is
electron/package.json. Here it isde_shell.__version__— the thingpublish.ymlrefuses to disagree with —so towncrier reads the version itself.
a documented manual step in the README's Releasing section. That includes the
trap SpyDE's workflow comments on: towncrier deletes the fragments it
consumes, so the release commit needs
git add -A upcoming_changes, or thedeletions go unstaged and the next release re-publishes them.
uv tool run towncrierrather than SpyDE'suvx: unlike SpyDE's, this commandis run locally rather than by CI, and
uvxis not installed everywhereuvis.CHANGELOG.md → CHANGELOG.rst
0.2.0 through 0.2.2 are carried over rather than truncated the way SpyDE's were
at 0.4.0 — it is 80 lines, not worth losing to a format change. The
ChangelogURL in
pyproject.toml, the README's release steps and a Rules bullet follow it.Checked
uv tool run towncrier build --draftrenders the existing entries and the newfragment; both RST files parse clean under docutils.
uv run pytest -q97passed,
npm run typecheckclean,npm run test:unit0 fail.Merge order
This wants to land first: #2 and #4 are rebased on top of it, each carrying its
own fragment instead of a CHANGELOG hunk.