ci(release): publish simple_module_site_lock to PyPI - #260
Merged
Conversation
site_lock shipped in #240 and is offered by the CLI catalog, but was never added to the publish-pypi matrix — so every release built its wheel and then dropped it on the floor. `pip install simple_module_site_lock` still 404s. Add it to the matrix, and add a cross-check to scripts/check_metadata.py (already run by `make lint`) so a workspace package can never again exist without a release job — and a stale matrix entry can't linger without a package. This bit us once with simple_module_branding (35bb8df) and again here. Claude-Session: https://claude.ai/code/session_01Hg8xa2po2YhoLjyxXeWwFm
Deploying simple-module-python with
|
| Latest commit: |
6e98c77
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://37b63dd8.simple-module-python.pages.dev |
| Branch Preview URL: | https://worktree-release-add-site-lo.simple-module-python.pages.dev |
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.
Problem
simple_module_site_lockshipped in #240 and is listed in the CLI catalog (smpy newoffers it,requires=("auth", "settings")), but it was never added to thepublish-pypimatrix in.github/workflows/release.yml.The result: every release since v0.0.27 built a
simple_module_site_lockwheel viauv build --all-packagesand then dropped it on the floor.https://pypi.org/pypi/simple_module_site_lock/jsonreturns 404 today — so anyone scaffolding an app with the site_lock module gets an unresolvable dependency.Changes
1. Add
simple_module_site_lockto the publish matrix. One line, alphabetically placed betweensettingsandusers.2. Guard the invariant in
scripts/check_metadata.py(already wired intomake lint). A newcheck_release_matrix()cross-checks discovered workspace packages against the matrix in both directions:This exact class of miss has now happened twice:
simple_module_brandingneeded 35bb8df, and now site_lock.The matrix is parsed with a targeted regex rather than adding a YAML dependency — the block is a flat list in a file we own, and a parse miss raises rather than returning an empty list, so a workflow reshuffle fails loudly instead of quietly reporting every package as unpublished.
Verification
scripts/check_metadata.pyexits 1 with a clear message when the matrix entry is stashed away, 0 with it in place — the guard reproduces the bug.uv build --package simple_module_site_lockproducessimple_module_site_lock-0.0.29{-py3-none-any.whl,.tar.gz}, matching the workflow'sdist-py/${{ matrix.package }}-*glob.templates/unlock.html(packaged) and has nopages/orlocales/dirs.scripts/tests/134 passed ·modules/site_lock/tests+ CLI catalog/packaging 70 passedruff format --check+ruff check+ty check+ 300-line file-size cap all clean.simple_module_site_lockdoes not exist on PyPI yet, and this repo publishes via Trusted Publishing (OIDC). Publishing a brand-new project name requires a pending publisher to be registered on PyPI first, or the new matrix leg 403s — and becausefinalizedepends onpublish-pypi, a failed leg would block the version commit and tag for the whole release.Add it at PyPI → Your projects → Publishing → Add a pending publisher:
simple_module_site_lockantosubashsimple_module_pythonrelease.ymlpypihttps://claude.ai/code/session_01Hg8xa2po2YhoLjyxXeWwFm