Repository navigation
Show notes in the per-package JSON and on package pages - #46
Merged
Merged
Conversation
build_lookup.py adds a notes list to data/packages/<name>.json and build_pages.py adds a Notes section to p/<name>/, both leaving out stale notes (versions that don't match the scanned release, or every target of the listed platforms has a wheel). Pages with a gap get an "Add a note" link to GitHub's new-file page for notes/<name>.toml with a template. Notes are read through check_notes.py (new load, version_matches, current and as_json), so the site only shows files the checker accepts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- version_matches() returns False for a spec the checker rejects (<2.*). - load() warns about a subdirectory in notes/, as problems() reports it. - The checker rejects links with control or format characters or a user@ part, and link text drops the scheme whatever its case, so the shown link can't disguise its target. - The edit URL quotes its path like the new-file URL. - notes/README.md states plainly that a note has no Python field and retires only when every Python target of its platforms has a wheel. - Tests for each of these, for an "all" note retiring, unknown results not being a gap, the versions line, short-version padding, the guard for platforms the scan lacks, no "Add a note" without a gap, and the edit link for a rejected notes file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 12, 2026
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.
Closes #28
Made with Claude Code.
What changed
Per-package JSON.
scripts/build_lookup.pyadds anoteslist to everydata/packages/<name>.json(always present,[]when there are none). Each note has the format's fields:platforms,kind,text,links,versions(nullwhen the note has none) andupdated(YYYY-MM-DD). This adds a key, so the schema stays 1 and the README's API section describes it.Stale notes are left out, in both places:
versionsdoesn't match the scanned version;["all"]means every platform in the scan, pyodide included.Package pages.
scripts/build_pages.pyadds a "Notes" section top/<name>/. Each note gets a card with:<code>;versionsif set, andupdateddate;"Add a note" link. It appears on every page with a gap, meaning any target that is
sourceormissing. Lookup failures don't count. It opensgithub.com/wheelgap/tracker/new/main?filename=notes/<name>.toml&value=…, with a template pre-filled:kind/text/links, so the checker fails until they are filled in;updated.If
notes/<name>.tomlalready exists, the link opens GitHub's editor for that file instead. GitHub can't create a file that already exists, and it can't pre-fill the editor.One parser.
scripts/check_notes.pygains:load(): the checker's own parsing and validation (_file_problems→_read_file, which now also returns the notes). A file with any problem is left out whole, with a::warning::.version_matches(): the v0versionssubset, matched as PEP 440 does, stdlib only.current(): the stale filter.as_json().The build scripts import it with
from . import check_notesunder the tests andimport check_noteswhen run as scripts, soscan.ymlneeds no change. Their new optionalnotes_dirargument defaults to the repo'snotes/.CSP. Unchanged. No scripts and no new inline styles. The card spacing is three rules in
site/style.css, scoped to.notes.Docs.
README.md(API and package pages) andnotes/README.mdnow describe what is shown and when a note is hidden.Known limits
notes/README.mdsays this plainly.version_matchesonly matches plainN(.N)*releases. If the scanned version is a pre-, post- or dev release (110 of the current 5,000, e.g.0.66b2,1.4.1.post1), a note withversionsis hidden rather than guessed at. Notes withoutversionsare unaffected. This is documented innotes/README.md.For the maintainer
scan.yml's push trigger doesn't includenotes/**, so a merged note appears with the next nightly publish (or a manual run).notes/README.mdsays "from the next publish". Addingnotes/**to the push paths would make notes appear on merge. I left that out as a workflow change outside this issue.Verification
uvx --python 3.14 [email protected]: 148 passed.python3 scripts/check_notes.py: clean.version_matchesreturns False for a spec the checker rejects (e.g.<2.*) instead of reinterpreting it.load()warns about a subdirectory innotes/.user@part. Link text drops the scheme case-insensitively, so a link's text can't disguise its target. This tightens the checker.quote()d.["all"]note retiring when every target is a wheel;unknownnot counting as a gap; the escaped "for versions …" line;2matching>=2.0; a note on platforms the scan lacks being kept; no "Add a note" on a page with notes but no gap; and the edit link for a rejected notes file. Each one fails when I mutate the code it covers (10 mutations, each caught).tests/test_notes_on_site.py, andtest_scripts.pynow expects thenoteskey. They cover:["all"]stays while pyodide has a gap;<script>,&in a link and quotes in<code>;note_text, the two escaping tests fail.version_matchestest cases, plus a 20,000-case random fuzz, agree withpackaging.specifiers.SpecifierSet.contains.build_lookup.pyandbuild_pages.pyfromdata/coverage.jsonthe way the "Assemble the site" step does, then deleted the output:psycopg2.jsonandpycrypto.jsoneach list 1 note,mysqlclient.jsonlists its Linux note, andnumpy.jsonhasnotes: [].<script>, and every page parses with balanced tags.check_notes.pyrejects it untilkind,textandlinksare filled in.p/psycopg2/renders cleanly in dark mode with no console or CSP errors.🤖 Generated with Claude Code