Skip to content

Check that each audit's dataset link agrees between the README and its scripts - #1215

Merged
yakew7 merged 1 commit into
yakew7:mainfrom
minutechreview:feat/dataset-source-check-1208
Oct 28, 2026
Merged

yakew7 merged 1 commit into
yakew7:mainfrom
minutechreview:feat/dataset-source-check-1208

Conversation

@minutechreview

Copy link
Copy Markdown
Contributor

Summary

Adds scripts/check_dataset_sources.py, which fails when a dataset link in an audit's unfair.py or fair.py comments is not the link on that audit's **Dataset:** line in the README.

Type

  • Audit
  • Explainer
  • Bug fix
  • Other

What it does

  • Reads each ### NN · <Audit folder> - ... block in the README and takes the URLs on its **Dataset:** line.
  • Reads every URL in a full-line # comment of that folder's unfair.py and fair.py.
  • Reports each script URL the README line does not have, naming the file and both links. A script with no link is fine (German Credit fair.py, both Tenant Screening scripts, COMPAS and AI Fair Recruitment have none today). Trailing / and . are ignored.
  • Also fails if the README has no project blocks at all, so a heading change cannot make it pass silently.

Wired in:

  • make lint runs it after check_traction.py.
  • tests/test_check_dataset_sources.py has 8 cases on temp repos plus test_repository_links_agree on the real files, so the normal test run enforces it.
  • One row in the CONTRIBUTING "Checks you may meet" table, and the make lint line in CONTRIBUTING mentions it.

I did not add it to .github/workflows/lint.yml: my token cannot push workflow changes. The pytest case covers it in CI meanwhile.

How I checked it

  • python3 scripts/check_dataset_sources.py on main: passes.
  • Changed the German Credit link in unfair.py only: fails, names German Credit Lending/unfair.py and both URLs.
  • Changed the Benefits Denial link in the README only: fails for both unfair.py and fair.py.
  • pytest tests/test_check_dataset_sources.py: 9 passed. ruff check and check_em_dash.py clean, check_broken_links.py OK.
  • Full pytest --ignore=tests/browser: 1039 passed. The same 11 tests fail on main and on this branch on my machine (box DNS answers .invalid, and some test_cli.py / JS parity cases), so they are not from this change.

Linked issue

Closes #1208

…s scripts

Signed-off-by: minutechreview <141821420+minutechreview@users.noreply.github.com>
@vercel

vercel Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

@minutechreview 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.

@github-actions

Copy link
Copy Markdown

@yakew7 @propcgamer20-png @ahmdkaml - new PR touching a path you own, please review.

@yakew7
yakew7 merged commit ba0edb0 into yakew7:main Oct 28, 2026
18 of 19 checks passed
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.

Nothing checks that each audit's dataset source link agrees between the README and the scripts

2 participants