Move the reference design notebook into docs/ - #10
Merged
Merged
Conversation
examples/precision_recall.ipynb was not an example. It is the specification the library was ported from: it defines its own copies of every function, needs kagglehub and CatBoost to re-execute, and is deliberately excluded from the CI notebook job. Sitting next to quickstart.ipynb, which the README tells users to run, it read as something to open and execute. It moves to docs/reference-design.ipynb, beside the reference-design.md that explains which of its details are load-bearing and where the library differs. Same stem, so the pair is obvious. The move also sharpens the ruff config. The per-file ignores for E402, I001, and F811 were keyed on examples/*.ipynb, so quickstart inherited all three, but the rationale recorded in pyproject.toml is specific to the reference notebook -- the F811 entry is about its deliberate np/plt re-import. Checked with the rules re-enabled: quickstart triggers none of them and the reference notebook triggers all 8 violations. The ignores now name the file that earns them, and quickstart is linted without exemptions. The formatter still skips both notebooks. Reformatting a notebook committed with its outputs is a diff nobody asked for, whichever notebook it is. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
examples/precision_recall.ipynb→docs/reference-design.ipynb. Pure rename plus the references that named the old path; the notebook's bytes are unchanged (gitreports the rename at 100% similarity).Why
It was never an example. It is the specification the library was ported from — it defines its own inline copies of every function, needs kagglehub and CatBoost to re-execute, and
test.ymldeliberately excludes it from the notebook job. Next toquickstart.ipynb, which the README tells users to open and run, it read as something to execute.It now sits beside the
docs/reference-design.mdthat explains which of its odd-looking details are load-bearing and where the library intentionally differs. Same stem, so the pairing is obvious, anddocs/is the read-don't-run path.The ruff config gets sharper
The per-file ignores for
E402,I001, andF811were keyed onexamples/*.ipynb, soquickstart.ipynbinherited all three — but the rationale recorded inpyproject.tomlis specific to the reference notebook, and theF811entry is about its deliberatenp/pltre-import in the setup cell.Measured with those rules re-enabled per notebook:
quickstart.ipynbSo the ignores now name the one file that earns them, and quickstart is linted with no exemptions. Both notebooks are still scanned (
ruff check --show-fileslists both) and both pass.The formatter still skips both. Reformatting a notebook committed with its outputs is a diff nobody asked for, whichever notebook it is — so the exclude list gained the new path rather than trading one for the other.
Changed references
pyproject.toml— lint per-file-ignores, formatter excludedocs/reference-design.md— self-reference, now "beside this file"README.md— the path in the Reference design section.github/workflows/test.yml— the comment explaining the CI carve-out, which now also records why it lives underdocs/git diff --exit-code -- examples/in the notebook job is left as is: it guards the notebook that job actually executes, which is quickstart.Nothing references the old path any more (
grepforprecision_recallacross md/py/toml/yml is empty), and no test hardcodes either notebook path —test_notebook_golden_valuespins values, not files.Verification
ruff checkandruff format --checkclean, 135 tests pass. No source or notebook content changed.🤖 Generated with Claude Code