Repository navigation
Add coverage badges for package READMEs - #21
Conversation
Signed-off-by: sarankumar1325 <[email protected]>
|
Thanks @sarankumar1325, this looks good overall: the badge counts are easy to follow, the file names are checked before anything is written, and the lookup card escapes the snippet properly. Because it adds a script under (Review assisted by Claude.) |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… results row Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks @sarankumar1325, this is a really nice addition! I reviewed it and a second reviewer did too. The counts and colours match I pushed two commits (e6d81e3 and 2ddee46) before merging:
Merging now. If you'd like a next one, tracker #3 (a page per package, with titles, descriptions and a sitemap) is a help-wanted issue nobody has picked up. It pairs well with the badges, since each badge could link to its package's own page. Comment there and we'll assign it to you. (Review assisted by Claude.) |
Closes #2
What this changes
scripts/build_badges.pyreadsdata/coverage.jsonand writes a shields.io endpoint JSON file per package,badge/<canonical-name>.json. The publish job in.github/workflows/scan.ymlruns it into_site/badge/at deploy time; the files are not committed.What counts: platforms that have a
wheelresult for the newest non-free-threaded Python in the scan (currently 3.15, eight platforms). Colour scale: all platformsbrightgreen, at least three-quartersgreen, at least halfyellow, any wheelorange, nonered. Names are the PEP 503 canonical form (lowercase,-).The package lookup card now has a "Badge for your README" snippet, for example:
with a Copy button.
Checked locally:
python3 scripts/build_badges.py data/coverage.json /tmp/badge-outwrote 5000 files (boto38/8 brightgreen,psycopg21/8 orange), andnode --check site/app.jspassed.AI tools used (if any): An AI assistant helped draft the script and the lookup-card snippet. I chose the 3.15 / colour-scale rule, ran the script on the current scan, and checked the site script.