Skip to content

Tie release notes, rules and CI to the changelog - #366

Merged
neuromechanist merged 7 commits into
devfrom
feature/changelog-mechanism
Sep 24, 2026
Merged

neuromechanist merged 7 commits into
devfrom
feature/changelog-mechanism

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

docs/changelog.md has covered every release since 0.1.0, but nothing around it used it.

  • The GitHub releases carried generated pull-request lists.
  • PyPI had no changelog link.
  • No rule or check asked for entries.

This PR connects the changelog to all three.

Changes

  • Root CHANGELOG.md: points to docs/changelog.md and its published page. [project.urls] gains Documentation and Changelog, so PyPI links both.
  • Dated release headings: ## X.Y.Z - YYYY-MM-DD, taken from the tag dates.
  • scripts/changelog_section.py: prints one release's section with its relative docs links made absolute; --check gates a release.
    • Tests in pamica/tests/test_changelog.py (11 tests) run it on the real file and check the heading format and order.
  • auto-tag.yml: publishes the release's section as the release notes, with GitHub's generated pull-request list appended. If the section is missing, it falls back to generated notes with a warning.
  • changelog.yml:
    • A PR into dev that changes package code (pamica/ outside its tests, validate_implementations.py, pyproject.toml) must change the changelog, or carry the new skip-changelog label.
    • A PR into main must carry its release's dated section and no ## Unreleased.
  • .rules/changelog.md: records what an entry says, when to skip, and the release-prep steps (including a minor bump through sync_version.py). It is referenced from AGENTS.md, the review checklist, the CI rules and the git rules.

Checks

  • pytest pamica/tests/test_changelog.py, ruff, ty and typos pass.
  • mkdocs build --strict passes, and the dated anchors render (for example #033-2026-09-01).
  • actionlint reports nothing on the changed workflows.

The earlier releases' notes are refreshed from the changelog after this merges. Editing a release fires only edited, which neither publish.yml nor release-binaries.yml listens to.

Add each release's tag date to its heading, describe the Unreleased
convention in the intro, and record the changelog mechanism.
scripts/changelog_section.py prints one release's section with its
relative docs links made absolute, and --check gates a release.
Tested on the real changelog (11 tests).
auto-tag.yml uses the release's changelog section as the notes,
with generated PR notes appended. changelog.yml requires an entry
for package-code PRs into dev (skip-changelog label to opt out)
and the release section for PRs into main. Checked with actionlint.
v0.1.3, v0.2.0 and v0.3.2 carried their tagged commit's date; use
the GitHub release date (or the tag date where no release exists),
and state the convention in the rule.
The extractor skips code spans and fenced blocks, ignores headings
inside fences, and rewrites reference-style link definitions.
Seven edge-case tests (18 total) cover them.
@neuromechanist
neuromechanist merged commit df83ee6 into dev Sep 24, 2026
9 checks passed
@neuromechanist
neuromechanist deleted the feature/changelog-mechanism branch September 24, 2026 08:38
@neuromechanist neuromechanist mentioned this pull request Sep 24, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant