Repository navigation
ci: sync e2g-pypkg 1.0.2 and add coverage badge - #14
Open
alanwilter wants to merge 4 commits into
Open
alanwilter wants to merge 4 commits into
alanwilter wants to merge 4 commits into
Conversation
This branch has not been deployed
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.
Summary
Updates the cruft template to e2g-pypkg 1.0.2 and refreshes the lock file. The main addition is a coverage badge in the README. CI generates it and commits it to the repo, so it needs no third-party service.
Changes
Coverage badge
.github/workflows/coverage-badge.yml. It runs after every successful CI run onmain, reuses that run'scoverage-3.12artifact, rendersassets/coverage.svgwith genbadge, and commits it if it changed.assets/coverage.svgstarts as the template's 0% placeholder. The merge of this PR should replace it with the real figure..gitignoregains an exception so the badge isn't caught by the existing*.svgrule.README
assets/.Template sync
justfile: thepdbrecipe forces-n0, since pdb doesn't work under xdist..cruft.json: now points at e2g-pypkg 1.0.2.Dependencies (separate commit)
opencv-pythonappears in the lock only under anemscriptenmarker, so on Linux and macOS onlyopencv-python-headlessis installed.pyproject.tomlonly re-sorts keywords and URLs and lists dependency groups explicitly. Neither change affects behaviour.Where this deviates from the template
The template releases via python-semantic-release on every push to
main. PyeScan releases when a version tag is pushed. Taking the template as-is would have broken things here, so:main. The template skips them because its release job runs CI onmain. Our release job only runs on tags, so skipping would leavemainwith no CI at all.workflow_run. The template puts it inrelease.yml, which here only runs on tags. It also can't go insideci.yml:release.ymlcallsci.ymlwith read-only permissions, and GitHub rejects a called workflow whose job asks forcontents: write.[tool.semantic_release]config. It would be dead config.release.ymlis unchanged, and now excluded from template updates. The template's changes to it are all semantic-release specific, so.cruft.jsonlists it underskipand futurecruft updateruns leave it alone. The README's "Template updates" section records why.allow_zero_versionto[tool.semantic_release]. 1.0.2 adds a semantic-releasebuild_commandthat writes the new version intouv.lockin the release commit. None of it applies here. The problem 1.0.2 fixes is already covered: the documenteduv version Xstep updatespyproject.tomlanduv.locktogether, and a hand-edited version with a stale lock failsuv sync --lockedin the release workflow's CI job, before anything is published. Future template changes to[tool.semantic_release]will still appear as rejectedpyproject.tomlhunks and can be discarded.Testing
ruff format --checkandruff checkpass.pytest: 119 passed, coverage 42.91% against the 40% floor.uv lock --checkpasses.actionlintpasses on all three workflows.The badge workflow can't be exercised from this branch. GitHub only runs
workflow_runworkflows from the default branch, so the merge will be its first real run.For reviewers
mainrequires pull requests, the badge commit fromgithub-actions[bot]will be rejected. It would need a bypass for that actor.required-versionis still>=0.12.3,<0.13, but the lock was written by uv 0.12.23 at revision 5. I haven't confirmed the oldest uv that reads revision 5. If it's newer than 0.12.3, the floor should go up. CI is unaffected becausesetup-uvinstalls the latest uv.name: CI. Renaming that workflow would silently stop the badge from updating.🤖 Generated with Claude Code