feat: PyPI-ready metadata and a tag-triggered release workflow - #436
Merged
Conversation
The no-hand-written-package-list guard was right to fire: build and twine were pinned in a workflow line, a second source of truth. They are a `release` extra now. Installing the wheel the same workflow just built is not a dependency list, so the guard names that exception explicitly.
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.
Toward #379. The acceptance criterion turned out to already pass — I ran it before
writing anything:
No checkout, no OpenClaw, no KCNyu workspace,
HOMEpointed away from/root.So what is missing is not the lifecycle — it is everything around shipping it.
Metadata
pyproject.tomlhad noauthors, noclassifiers, nokeywordsand no[project.urls]. Trove classifiers are how PyPI's own search and categoryfilters see a package; without them it is unlisted in every category a
prospective user would browse. This is invisible locally forever, because
pip install -e .never renders a project page.test_the_wheel_carries_the_metadata_pypi_indexes_onreads the built wheel'sMETADATA and asserts version parity with
pyproject.toml, a license, troveclassifiers, the three URLs PyPI puts in the sidebar, and a
Description-Content-Type(without it the README renders as plain text). Itreuses the build the existing wheel test already does. Mutation-verified by
deleting the classifiers block.
Release workflow
Tag-triggered (
v*) plus a manual TestPyPI rehearsal. Nothing publishes onmerge — a version number, once on PyPI, is burned even if the release is
yanked, so the tag is the human decision and the
pypienvironment lets thatdecision carry a required reviewer. Trusted publishing via OIDC, so there is no
long-lived token in repository secrets.
Before it publishes it runs
twine check, refuses a tag that disagrees with thepackaged version, and executes the isolated-install run above against the exact
artifact about to ship. One-time PyPI-side setup is in
docs/operations/release.md; it needs kcn's account and cannot be done from here.One rough edge fixed on the way
clawock run publish --request req.jsonanswered:A raw
Path.relative_toValueError. The boundary is deliberate — a request fromelsewhere has no provenance — but that message tells a first-time user nothing
about what to do, and
run prepareprints to stdout, so putting the file in thecurrent directory is the natural first move. It now names the path
prepareactually wrote, and
--helpsays so too. Same treatment for the artifactboundary check.
Not done here
The actual publish. That is kcn's call and needs the PyPI-side publisher
configured first; #379 stays open until a release exists and
pip install clawockfrom the real index is verified.