Repository navigation
Tests for check_broken_links and freeze(), explainer structure check (3 issues) - #1120
Merged
Merged
Conversation
Tests for scripts/check_broken_links.py (96% coverage, yakew7#1109) and the whole freeze() flow in scripts/freeze_paper_results.py against a temporary tree with git stubbed (99%, yakew7#1111). New scripts/check_explainer_structure.py enforces the CONTRIBUTING.md section list, a python block, two Further Reading entries and the footer, with the existing gaps in a shrink-only KNOWN_EXCEPTIONS list; wired into make lint and pre-commit (yakew7#1118).
propcgamer20-png
requested review from
Shreyash0712,
ahmdkaml and
yakew7
as code owners
October 22, 2026 14:24
Contributor
|
@propcgamer20-png is attempting to deploy a commit to the yashkewlani2020-gmailcom's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@yakew7 @Shreyash0712 @ahmdkaml - new PR touching a path you own, please review. |
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.
Three
scripts/issues, all tests or checks, no behaviour changes to existing scripts.tests/test_check_broken_links.py(23 tests, 96% coverage of the script, issue asked for 85%). It builds a temporary tree and covers a resolving link, a missing file, in-page and cross-file anchors, directories, external URLs, images, fenced and inline code, link titles, percent-encoding, blob permalinks, untracked files, escaping the repo, duplicate headings and the slugifier. Every bad-link test asserts exit code 1 and the file:line message, so it fails if the script stops reporting.freeze()and its helpers are now tested against a temporary tree with the directory constants monkeypatched and git stubbed (coverage of the script 99%). Covers the copied CSVs, figures and lock file, everyMANIFEST.mdfield (commit, dirty flag, versions, audit list, tag section), replacing an existing snapshot, both MCP mirrors, missing optional inputs, the missing-results/error, that--tagprints a command and never runs a git tag, and that nothing is written outside the intended directories.scripts/check_explainer_structure.py, run bymake lint(and so the lint workflow) and pre-commit. Each explainer needs the seven sections from CONTRIBUTING.md section 8, in that order, apythonblock, two Further Reading entries and the footer line. Accepted heading variants are in a table in the script, taken from the real headings (82 pages). Ten pages have existing gaps, so they are inKNOWN_EXCEPTIONS: the four missing a Limitations section named in the issue, plusneural-networks(also detection code),sampling-bias(also related concepts),differential-privacy(concrete example),disparate-impact,fairness-metric-conflictsandshap-values(detection code), and two with the example and detection sections in the other order. An exception that is no longer needed fails the check, so the list can only shrink. 27 tests, 97% coverage. CONTRIBUTING's "Checks you may meet" table and the CHANGELOG are updated.Fixing those ten pages is a follow-up; I did not want to rewrite explainers in this PR. Fast suite: 1157 passed; the same 6 failures as on a clean checkout on this Windows machine (path separators). The ROADMAP issue-reference warning from
check_issue_refs.pyis separate and informational.Closes #1109, closes #1111, closes #1118
Not included: #1098 (running the explainers' Python blocks), which needs a marking convention, and #1110/#1104, which I will take separately if wanted.