Repository navigation
Conversation
…e memory before Releasing was `make publish` with an API token, there were no GitHub releases, the release history lived in the README, and nothing checked that a tag named the version pyproject.toml declares. Pushing a vX.Y.Z tag now refuses to continue unless the tag matches the declared version, the version has a changelog section, the commit is on master and CI passed on it; then builds in isolation, installs the wheel into a clean environment with the checkout kept off sys.path, publishes to PyPI through trusted publishing with signed provenance, and creates the GitHub release from the version's changelog section with the generated contributor list appended. Pre-release tags are marked as such. A manual run rehearses against TestPyPI and stops before the release. The history moves into CHANGELOG.md unchanged, with a Keep a Changelog section above it. A PR that changes picblocks/ or pyproject.toml has to touch CHANGELOG.md or carry the no-changelog label. requirements.txt and pytest.ini fold into pyproject.toml, which already carried the dependencies. The Python floor moves to 3.12, shared across the MCRIT ecosystem.
|
Carry the concurrency-group fix into this port before it merges. This PR adds: concurrency:
group: release-${{ github.ref }}
cancel-in-progress: falseA rehearsal ( The fix is one line: group: release-${{ github.ref }}-${{ github.event_name }}Two real publishes of one tag are both Fixed upstream in smda danielplohmann/smda#353 and purepdb danielplohmann/purepdb#67. Flagging here so this port does not inherit the shape and need the same fix afterwards. |
|
Before this lands, please bring
The rest already matches. You have Write on this repo now, so feel free to move the branch into familiary instead of your fork. master is still PR plus code-owner review. |
|
Moved into familiary as suggested: #6 supersedes this PR. It carries this commit unchanged plus one commit that brings
|
Releasing picblocks is
make publishwith an API token. There are no GitHub releases, the release history lives in the README, and nothing checks that a tag names the versionpyproject.tomldeclares before a version number is consumed on PyPI.This is the seventh pull request giving the MCRIT ecosystem one release process — the same guard, the same tag-triggered workflow, the same changelog check, and a
RELEASING.mdin each repository stating only the values that differ. A maintainer learns it once. picblocks sits between smda and mcrit in that chain (smda>=4.2.13in,picblocks>=1.1.2out).Architecture
The hand-written
CHANGELOG.mdis the single stream of change information. The README "Version History" (nine releases) moves verbatim into it under## Older releases, below a Keep a Changelog## [Unreleased]section; the README links to it. Every PR that touchespicblocks/orpyproject.tomladds its own bullet, or carries theno-changeloglabel; a newChangelogcheck enforces that (read-only token, no PR content executed, Dependabot exempt). At release time the version's section is the release notes, and GitHub's generated list of merged PRs and contributors is appended under it..github/release.ymlgroups the dependency bumps.Versioning is Semantic Versioning over the block report format, the database format and the scores the matcher reports — the two things v2.0.0 and v2.1.0 already treated as breaking.
pyproject.tomlis the only place the version is declared (#4 already made it so); the guard reads it and the workflow refuses a tag that does not match.What pushing
vX.Y.Zdoes now.github/workflows/publish-release.yml:pyproject.toml,CHANGELOG.mdhas a## [X.Y.Z] - <date>section (written out as the notes), the commit is an ancestor ofmaster, and theTestsworkflow concludedsuccesson that commitpython -m buildin isolation,twine check --strict, then installs the wheel into a clean venv carrying only the declared runtime dependency and imports the hasher and matcher withpython -P, so the checkout cannot stand in for the wheelpypa/gh-action-pypi-publishthrough trusted publishing,id-token: writeas the only credential, attestations on. Environmentpypi; a manual run goes totestpypiand skips an existing versiongh release createwith the changelog section as body,--generate-notesappended, sdist and wheel attached. Pre-release tags (v2.2.0rc1) are marked--prereleaseand not--latestA manual run from a tag rehearses the whole path against TestPyPI and stops before the GitHub release. The guard script has tests (
tests/test_release_guard.py).Packaging
requires-python, classifiers,rufftarget; 3.14 added to the classifiers). The ecosystem shares one floor; nothing in picblocks needed 3.12. Recorded underRemoved.requirements.txtandpytest.inifold intopyproject.toml, which already carried the dependencies and theweb/devextras;make initand the unit job install.[web,dev], and the CI cache keys onpyproject.tomlalone (they still namedsetup.py, deleted in post-merge cleanup for #3, and v2.1.0 #4).test_make_stats.pynow asserts there is norequirements.txtto drift.Repository,IssuesandChangelogURLs added. Dependabot gains a pip ecosystem beside the existing actions one.Security
persist-credentials: false; the new workflows follow the same pattern,contents: readat the top and raised per job only where a job writes.make publish's API token, and each file carries PEP 740 provenance.zizmor --persona=regularreports no findings;actionlintclean.Tests
-m "not live_mcrit";ruff check,ruff format --checkandty checkclean.python -m build+twine check --strictpass; the wheel installs into a clean venv, imports fromsite-packages, and reports2.1.0throughimportlib.metadata. Metadata readsRequires-Python: >=3.12,License-Expression: BSD-2-Clause.## [X.Y.Z] - <date>section; until then a tag push fails at the guard with a message saying so.What a maintainer has to configure once
picblocks: ownerdanielplohmann, repositorypicblocks, workflowpublish-release.yml, environmentpypi; the same on test.pypi.org with environmenttestpypifor rehearsals.pypiandtestpypi. A required reviewer onpypiturns the publish into an approval step.no-changeloglabel.make publishremains the manual fallback until 1 is done.Related pull requests across the ecosystem
The same process, one PR per repository. None depends on another to merge; release order once merged is smda → purepdb → picblocks → MCRIT → MCRITweb → docker-mcrit.