Skip to content

Python release: check every version and the CHANGELOG on the tag - #21

Open
facontidavide wants to merge 1 commit into
V2from
claude/new-session-et2jzs-python-release
Open

facontidavide wants to merge 1 commit into
V2from
claude/new-session-et2jzs-python-release

Conversation

@facontidavide

Copy link
Copy Markdown

Summary

On a release tag the python workflow only compared the tag with data_tamer_parser.__version__. A tag could publish data-tamer-parser to PyPI while CMake, package.xml or conan carried another version, or before the release commit renamed the CHANGELOG head from "Unreleased". The PyPI page linked the wire format on the V2 branch, so a release would document whatever V2 holds later. And the first upload needs a pending trusted publisher on pypi.org (the project does not exist yet), which nothing described.

Changes

  • tools/check_versions.py --tag X.Y.Z: the version must equal the tag and the CHANGELOG head section must be that release. Without --tag (ctest version_consistency, abi workflow) behaviour is unchanged.
  • .github/workflows/python.yml: the tag step runs that check and verifies the built sdist and wheel carry the tag's version.
  • python/README.md, python/pyproject.toml: the wire-format link points at the tag (blob/2.0.0/docs/wire_format.md); check_versions.py checks that the link follows the version.
  • CLAUDE.md: new "Releasing" section — release commit, tag, and the one-time setup (PyPI pending publisher for data-tamer-parser: owner PlotJuggler, repo data_tamer, workflow python.yml, environment pypi; GitHub environment pypi, optionally with required reviewers). CHANGELOG entry updated.

Testing

  • check_versions.py passes on V2; fails with --tag 2.0.0 while the CHANGELOG says Unreleased, with a wrong tag (2.0.1) and with a stale blob/V2 link; passes with --tag 2.0.0 after a simulated release commit.
  • python -m build python and twine check --strict pass; the wheel contains only the module and the license.
  • Python tests pass; the workflow YAML parses.
  • The tag-only step can only be exercised by a real tag push.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Wnt4wFr4Cz9BZjp1C6VRGk


Generated by Claude Code

Problem: on a release tag the python workflow only compared the tag with
data_tamer_parser.__version__. A tag could publish to PyPI while CMake,
package.xml or conan carried another version, or before the release commit
renamed the CHANGELOG head from "Unreleased". The PyPI page linked the
wire format on the V2 branch, so a release would document whatever V2 holds
later. The first upload needs a pending trusted publisher on pypi.org,
which nothing described.

Change:
- tools/check_versions.py --tag X.Y.Z: the version must equal the tag and
  the CHANGELOG head must be that release. Without --tag (ctest
  version_consistency, abi workflow) nothing changes.
- The release step of python.yml runs it and checks that the built sdist
  and wheel carry the tag's version.
- python/README.md and pyproject.toml link the wire format of the tag
  (blob/2.0.0/...); check_versions.py checks that the link follows the
  version.
- CLAUDE.md: a Releasing section (release commit, tag, one-time PyPI
  pending publisher and GitHub environment pypi). CHANGELOG updated.

Tested: check_versions.py passes on V2, fails with --tag 2.0.0 while the
CHANGELOG says Unreleased, with a wrong tag and with a stale link, passes
with --tag 2.0.0 after a simulated release commit; python -m build and
twine check --strict pass; Python tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wnt4wFr4Cz9BZjp1C6VRGk
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.

2 participants