Skip to content

notes: a Python the scan drops retires the note, not the whole file - #89

Merged
patrickballard merged 2 commits into
wheelgap:mainfrom
sarankumar1325:fix/notes-dropped-python
Nov 16, 2026
Merged

patrickballard merged 2 commits into
wheelgap:mainfrom
sarankumar1325:fix/notes-dropped-python

Conversation

@sarankumar1325

Copy link
Copy Markdown
Contributor

Closes #55

What changed

  • scripts/check_notes.py load() (the site build) no longer treats a Python the scan has stopped covering as a problem with the file. A new _retire_unscanned runs before each note's checks, only on a well-formed python list (non-empty, all strings):
    • If every label is unscanned, the note is retired: it's left out and warn gets retiring <file> note N: python 3.12 is no longer scanned. The file's other notes still reach the site. A file whose notes are all retired is left out with no empty entry.
    • If some labels are still scanned, the unscanned ones are dropped from that note's python, so it retires by the Pythons that remain.
    • A malformed python (e.g. [3.13]) still makes the file a problem, as before.
  • problems() (the PR check, "Check notes" in check.yml) stays strict. My choice for an existing note that names a dropped Python: the check fails, with a clearer message: unknown python '3.12': the scan covers 3.13, 3.14t; if it no longer covers this Python, remove it from python. A new note can't name an unscanned Python. When the scan drops 3.13, the PR check tells whoever touches notes next exactly what to remove, while the site keeps showing the rest in the meantime.
  • notes/README.md: the python paragraph now says this.

Tests

  • tests/test_check_notes.py, 5 new tests:
    • A file with a dropped-Python note and a note without python still shows the second note through load(), with one retiring warning.
    • A note whose only label was dropped is left out.
    • ["3.12", "3.13"] loads as ["3.13"] with no warning.
    • problems() still reports the unknown label, with the new message.
    • A malformed python still keeps the file out.
    • 4 of the 5 fail on main.
  • tests/test_notes_on_site.py::test_a_note_for_a_python_the_scan_lacks_is_left_out_with_a_warning checked the old warning text. Its behaviour (note left out, one warning) is unchanged, so only the expected text was updated.
  • uvx --python 3.14 [email protected] gives 344 passed, 1 skipped. python3 scripts/check_notes.py on the real notes exits 0. The site tests (node --test tests/site/...) pass 34/34.

Written with an AI coding assistant; I reviewed the diff and ran the checks above.

load() now leaves out a note whose python labels are all unscanned
(with a warning) and drops unscanned labels from a note that still has
a scanned one, so the file's other notes stay on the site. problems()
stays strict and says to remove the label.

Closes wheelgap#55

Signed-off-by: sarankumar1325 <[email protected]>
@patrickballard

Copy link
Copy Markdown
Contributor

Thanks @sarankumar1325, this is a thoughtful fix: retiring just the affected note (and trimming unscanned labels from a note that still has a scanned one) keeps the rest of the file on the site, and the tests pin each case clearly.

It looks good overall. Because it changes scripts/, which feeds the nightly scan and the site build, Patrick reviews and merges these himself, so he'll take it from here. One thing he'll likely weigh: problems() staying strict means the "Check notes" PR check starts failing for everyone as soon as the scan drops a Python, until someone edits the note. That's a reasonable call and clearly explained in the description, just flagging it as the main design decision.

(Review assisted by Claude.)

pyodide on python ["3.13", "3.14t"]: once 3.13 is dropped, trimming leaves
3.14t, which pyodide has no target for, and the pairs check left the whole
file out again. Retire that note instead, like one whose Pythons are all gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@patrickballard
patrickballard merged commit fd29574 into wheelgap:main Nov 16, 2026
1 check passed
@patrickballard

Copy link
Copy Markdown
Contributor

Merged, thanks @sarankumar1325! Retiring just the affected note, instead of losing a package's whole notes file whenever the scan drops a Python, is exactly the right shape, and keeping problems() strict means typos still get caught at PR time. One addition from review: a note that, once trimmed, has no target left on its platforms (pyodide on a dropped 3.13 plus 3.14t, say) is now retired too, rather than taking the file down again.

(Reply assisted by Claude.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notes: a Python the scan drops shouldn't take the package's whole notes file down

2 participants