Add CI validation for the cross-reference mapping files - #63
Merged
Conversation
Every check here comes from a problem that already reached main: the mesh:null and DOID:null ids caught by hand in review on #49 and #52, the ICD-9 codes #57 retired from the source list but not from the data, the MONDO:MONDO:0014523 double prefix, and the flagged-but-still-stored ids #60 had to clear out. Catching them by eye does not scale across three curators submitting through the editor. validate_mappings.py checks ari.sssom.tsv and ari.equivalencies.tsv for structural damage, malformed identifiers and internal contradictions, that the two exports agree row for row, and that both agree with the cross-references ari_t1d.owl actually serves. Standard library only, so CI needs no install step and it runs locally unchanged. Two workflows run it. The pull request gate reports only rows a branch added or rewrote, so a curator submitting one disease is not blocked by debt they did not introduce, and findings land as annotations on the changed line. A weekly audit runs the same checks over every row so the standing backlog stays visible without turning every merge red. That backlog is currently 193 errors and 17 warnings, all pre-existing and none corrected here, since each fix is a curation decision. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 16, 2026
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.
Adds
.github/scripts/validate_mappings.pyand two workflows. No data changes.Why these checks
Every rule here comes from something that already reached
main:mesh:null,DOID:null— the editor wrote a missing id as a literal placeholder, caught by hand in review one row at a timeicd10cmprefix, retired from the source list but not from the dataMONDO:MONDO:0014523— the prefix concatenated onto a value that already carried it362.50→362.5,0111157→111157Catching these by eye does not scale across three curators submitting through the editor.
What it checks
curie_map.icd10cm.Two workflows
Validate mappingsmappings/orontologies/Audit mappingsThe gate is diff-scoped deliberately. A curator submitting one disease should not be blocked by debt they did not introduce, and
mainshould not go red on every merge. The weekly audit is where the standing backlog lives.Standard library only, so CI needs no install step, and it runs locally unchanged:
Current state of the backlog
Against
mainas it stands: 193 errors, 17 warnings, all pre-existing. #61 and #62 clear the two bulk groups mechanically, taking it to 25 errors, 17 warnings.What remains after those needs a curator rather than a script — 18 literal
nullids, theMONDO:MONDO:0014523double prefix, two MONDO values stored with a prefix where the other 55 are bare, the ICD-10 rangeI00-I02, and one drift where the SSSOM export hasDOID:0111157against the equivalencies export'sDOID:111157.Test plan
mesh:null, an ICD-9 code, a rejected-but-still-stored SNOMED id, a nonexistent ARI id, a stale label, a future date, a malformed author handle, a stray tab, and a row present in only one file — all caught, exit 1Advances #23 ("Validate all diseases with database xrefs"); referenced rather than closed.
🤖 Generated with Claude Code