Repository navigation
Add a v0 notes format, checker, and examples - #33
Conversation
Introduce notes/<normalized-name>.toml for package knowledge that the nightly scan cannot infer, with a stdlib checker, tests, and a Check workflow step. Closes wheelgap#27. Signed-off-by: sarankumar1325 <[email protected]>
The psycopg2, mysqlclient and pycrypto notes now list only the targets where the package lacks a wheel and the advice helps, checked against data/coverage.json, the PyPI file lists and the upstream docs. check_notes.py rejects unknown keys, versions that aren't a PEP 440 specifier, datetimes in updated, non-UTF-8 files and text of 500 characters or more, and requires a normalized file name. Tests and notes/README.md cover the new rules. Co-Authored-By: Claude Opus 5.5 <[email protected]>
versions is now a small PEP 440 subset: comma-separated ==, !=, <=, >=, <, > clauses over plain N(.N)* releases, with .* only after == or !=. The checker also reports non-file and non-.toml entries in notes/, links without an https host or with whitespace, duplicate platforms and links, "all" mixed with other platforms, missing required keys, multi-line text and future updated dates, and suggests the normalized file name. notes/README.md says what text may contain and how notes retire. The pycrypto note says pycryptodome has no free-threaded 3.14 wheels. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # README.md
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merged, thanks @sarankumar1325! The notes knowledge base now has its format and its checker. Because notes will be shown to users, this got three review passes, two from a second model. I pushed these changes:
If you'd like another one, #28 is next: showing these notes in the per-package data and on package pages. (Review assisted by Claude.) |
Summary
The nightly scan can say that a wheel is missing. It cannot say what to do about it: install a binary extra, add a system library first, or follow an upstream issue. This is the v0 knowledge-base format proposed in #27, so notes can start landing before they are shown on the site (#28).
notes/<normalized-name>.toml, parsed with the standard library (tomllib).scripts/check_notes.py(stdlib only) rejects a file that does not parse, whose name is not a normalized package name, or whose notes have a badkind, unknownplatforms(must be aplatformfromdata/coverage.json, or["all"]), empty or over-500-charactertext, non-httpslinks, or a missing date forupdated.notes/README.mddocuments the fields. Three real starter notes, each with a link that backs the claim:psycopg2: officialpsycopg2-binary/psycopg[binary]alternativemysqlclient: libmysqlclient headers before building the sdistpycrypto: unmaintained; use PyCryptodometests/test_check_notes.pycover the error cases, and they also run the checker against the realnotes/anddata/coverage.json.Showing notes in the per-package JSON and on package pages is left to #28. Notes are not published by this change; only the format, the checker, and the first examples are.
Closes #27.
Tests
python3 scripts/check_notes.py(the real notes, againstdata/coverage.json)python3 -m unittest discover -s tests— 46 passed (18 new intest_check_notes.py)