Repository navigation
release.yml and ci.yml: build once, check and install the wheel before publishing - #105
Merged
Merged
Conversation
…lishing (#102) fz is pure Python, yet release.yml built 16 identical py3-none-any wheels on an OS x Python matrix (excluding 3.14 on Windows/macOS, which ci.yml tests) and published without installing any of them. - build (ubuntu, Python 3.11): stamp fz/_version.py, python -m build (wheel + sdist), twine check --strict, exactly one py3-none-any wheel, release tag (leading "v" stripped) equal to the built version. - verify (needs build): same OS x Python matrix as ci.yml; installs that wheel and runs a smoke test: fz --version, fzi/fzc, and fzr with sh:// except on Windows (bash is MSYS2 there, set up only in ci.yml). - publish-to-pypi / publish-to-github need [build, verify] and download the single "dist" artifact. - NEWS (2.0 release tooling) and CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RjXvVRjM6aMvKvvSFoxpZ6
…k_dist.py (#102) ci.yml built the same py3-none-any wheel on 3 OSes and the sdist in a separate job, and never installed either. - ci.yml: build-wheels (3 jobs) + build-sdist -> one "build" job (ubuntu, needs test): python -m build, scripts/check_dist.py, then the wheel is installed in a fresh venv outside the checkout (fz --version, import fz, fz.runners), catching modules or package data missing from the wheel, which the editable install of the test job cannot see. Single "dist" artifact. - scripts/check_dist.py: one wheel, pure Python (py3-none-any), one sdist, twine check --strict, optional --tag equal to the built version. Used by ci.yml and release.yml (replaces the inline shell check there). (Python rather than .sh: .gitignore ignores *.sh.) - tests/test_check_dist.py: rejection cases always run; the real-build cases skip when build/twine are not installed. - NEWS, scripts/README.md, CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RjXvVRjM6aMvKvvSFoxpZ6
yannrichet
changed the base branch from
claude/version-1-3-opportunity-68uuh8
to
main
November 6, 2026 14:05
Member
Author
|
Generated by Claude Code |
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.
Pull Request
Description
fz is pure Python: one build produces the single
funz_fz-<v>-py3-none-any.whl. Yet:release.ymlbuilt 16 identical wheels on an OS × Python matrix that excluded 3.14 on Windows and macOS, even thoughci.ymltests those, and it published without ever installing a built wheel;ci.ymlbuilt the same wheel on 3 OSes and the sdist in a separate job, and never installed either.This PR builds once, checks the distributions with a shared script, and installs the wheel outside the checkout: on the
ci.ymlOS × Python matrix before publishing (release.yml), and in a fresh venv on every push and pull request (ci.yml).Originally stacked on #103; retargeted to
mainafter #103 and #104 were merged, andmainmerged into the branch (24b16eb).Related Issues
Fixes #102
Type of Change
Changes Made
scripts/check_dist.py(new, shared by both workflows):py3-none-any), and exactly one sdist;twine check --stricton both;--tag, the release tag (a leadingvis allowed) must equal the built version,fz.__version__;.gitignoreignores*.sh.release.yml:build(ubuntu, 3.11) replacesbuild-wheels(16 jobs) andbuild-sdist:stamp_version.py,python -m build,check_dist.py --tag <release tag>, onedistartifact.verify(needsbuild): same matrix asci.yml(Linux/macOS/Windows × 3.9–3.14, Windows 3.9 excluded). It runspip install dist/*.whlwith no source checkout, then a smoke test:fz --versionmust printfz <version>;import fz, fz.runners,fzi,fzc;fzrwithsh://bash run.shon 2 cases, except on Windows: bash comes from MSYS2 there, which onlyci.ymlinstalls, andfzron Windows stays covered byci.yml.publish-to-pypiandpublish-to-githubnow need[build, verify]; theirif: release publishedcondition is unchanged.ci.yml:build-wheels(3 jobs) andbuild-sdistare replaced by onebuildjob, named "Build and check distributions" (ubuntu, needstest):python -m build,check_dist.py, then the wheel is installed in a fresh venv outside the checkout (fz --version,import fz, fz.runners).testjob cannot see.tests/test_check_dist.py(7 tests): the rejection cases always run (platform wheel, missing sdist, two wheels); the real-build cases are skipped whenbuildortwineare not installed.Testing Performed
release.yml,workflow_dispatchon the branch (publish jobs skipped: they run only on areleaseevent, so nothing was published):b2837cd, inline check): build plus 17Verify wheeljobs green, in about 2 minutes;4fe061c,check_dist.py): success.release.ymlis unchanged since then.24b16eb(state including release: prepare 2.0 (version, NEWS, plugin, version source, skill completeness) #103 and Warn when a model without delim reads ${...} text as variables #104): see the checks.CLI Integration Tests on windows-latestfailed once in its MSYS2 setup: every package mirror errored and no test ran (see the PR comment). Re-run once, it passed.check_dist.py: a valid build gives2.0; tagv2.0is accepted; tag1.9is rejected (does not match fz.__version__); a platform wheel and a missing sdist are rejected.verifysmoke test in a fresh venv:smoke test passed: 2.0.ci.ymlbuildjob steps:fz 2.0,import OK 2.0.1078 passed, 86 skipped, plus 5 pre-existing environmental failures, identical onmain: 3 permission tests that fail when run as root, and 2yqtests that need a differentyq.Additional Notes
mainbranch protection requires the old check names ("Build wheels on …", "Build source distribution"), they no longer exist. Replace them with "Build and check distributions" in the repository settings.softprops/action-gh-release@v1and theactions/*@v4/v5actions are unchanged (Node 20 deprecation warning); they can be updated in a separate PR.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01RjXvVRjM6aMvKvvSFoxpZ6