Repository navigation
Description
The checker's URL already works as a permanent link for any public repo. https://wheelgap.github.io/tracker/check/?repo=owner/name loads the repo, takes the platforms and Pythons from its CI and Dockerfiles, and runs the check (fromQuery() in site/check/check-logic.mjs). But nothing gets a project to put that link where its users and contributors will see it. A README badge next to CI and coverage puts "will our dependencies install everywhere?" one click from anyone who'd ask it: a contributor on Windows on ARM, someone building an Alpine image, a maintainer adding Python 3.15. Every click checks the repo's lockfile as it is that day, not a stale snapshot, and goes straight to the fixes.
The package badges (badge/<name>.json, #2) are for packages on PyPI. This one is for repos.
What to do
- Add
site/check/badge.svg: a static badge in the flat shields.io style, e.g. "wheelgap | check wheels". Hand-write the SVG: no script, no external fonts or images, around 1 KB. It's on the tracker's own origin, so the checker can show it under its currentimg-src 'self'CSP. - In
check-logic.mjs, addbadgeMarkdown(repo, lockfile, defaultLock). It returns[](https://wheelgap.github.io/tracker/check/?repo=owner/name). Put only the repo in the link, neverpy,torref, so a click always uses the repo's current CI targets on its default branch. Add&lock=pathonly when the lockfile being shown isn't the onepickLockfile()would pick by default (a monorepo, say). Build the query the waytoQuery()does. - In the "Fix it" section of
site/check/index.html, under the two Copy buttons, add "Add a badge to your README": the badge image, the Markdown in a<pre>, and a "Copy badge Markdown" button that usescopy()like the other two. - In the tracker README's Badges section, add a short paragraph with the snippet.
Done when:
- After checking fastapi/full-stack-fastapi-template, "Copy badge Markdown" copies the snippet. Pasted into a GitHub README preview, the badge shows, and clicking it opens the checker and runs it for that repo.
- When you've picked a lockfile other than the default, the link has
lock=. Otherwise it has onlyrepo=. -
tests/site/check-logic.test.mjscoversbadgeMarkdown(): repo only, a non-default lockfile, and a lockfile path with characters that need encoding. - The PR has screenshots of the badge in a README on GitHub's light and dark themes.
Activity