Skip to content

Bath tests require did-schema's NCIm rows - #560

Merged
jesshaley merged 2 commits into
V2from
claude/bath-tests-require-ncim-rows
Nov 30, 2026
Merged

jesshaley merged 2 commits into
V2from
claude/bath-tests-require-ncim-rows

Conversation

@jesshaley

Copy link
Copy Markdown
Collaborator

Builds [bath tests require the NCIm rows] (Jess Haley, 2026-11-30, did-schema docs/plans/did_v2_go_forward_class_audit.md, on main since did-schema #406, aabe9311). Tracked in #486.

#555 let tests/+did2/+unittest/testRawV1RoundTripBath.m accept the did-schema term registry with or without the 3 NCIm-only bath chemicals and the NCIm equivalents on the ChEBI rows, because DID-matlab merged before did-schema. did-schema main now holds all the rows, so the tests require them and a change that drops them fails.

What changed (tests only)

  • ncimRowsState (returned true/false, failed only on a partial registry) is now requireNcimRows: it asserts that all 3 NCIm-only chemicals (NCIm:C0069860, NCIm:C1172904, NCIm:C0078080) are registered and every ChEBI row in the table states its v1 NCIm node as equivalent, 11 of 11. It used to count 10 (it skipped carbogen); Stop citing retired carry rows (image.label, ontologyLabel) in comments #406 gave CHEBI:757169 the equivalent NCIm:CL1445492, so carbogen is counted now. It still prints the counts with their denominators.
  • testEveryTableChemicalIsARegisteredChEBITerm: the equivalent check was "if a row states one, it is v1's node". It is now "every row states exactly {v1 node}", carbogen's included. The NCIm-only block always expects registered, the registered name, and a name that differs from v1's.
  • testWriterBathsRoundTrip: Dab's two drugs always expect converts.
  • testAnUnmappedChemicalCarriesCitingCarry180: the three NCIm-only rows are no longer added as carry-180 cases when the rows are missing.
  • testAnNCImOnlyChemicalKeepsItsNodeAndRoundTrips: the if ~registered ... continue branch is removed.

Removed, not inverted: the "without the rows" expectations (the three NCIm-only chemicals carried under carry-180, written as given and unregistered, Dab's two drugs carried) are deleted. No new assertion takes their place, because the decision makes that registry invalid.

Kept (none depend on the rows being absent)

  • The vasotocin antagonist's empty NCIm: node: in no table, written as given, unregistered, carried under carry-180.
  • Marder's bath carried for its location (UBERON:8910010).
  • An unmapped chemical reported lost (the FE201874 rename control), and another NCIm-only node in v1 reported lost.
  • "mM" kept as written, and every other test in the file unchanged.

Which did-schema ref each workflow reads (grep .github/workflows)

  • test-code.yml (3 checkouts), test-fixtures.yml: main.
  • test-corpus.yml, test-soph-corpus.yml: inputs.did_schema_ref || 'main'.
  • test-builder.yml, test-migrators-quick.yml: a same-named did-schema branch, else main. No did-schema branch claude/bath-tests-require-ncim-rows exists (git ls-remote).
  • matlab-scratch.yml: the same-named branch, but it only runs tools/scratch.m and not these tests.

So every workflow that runs these tests sees did-schema main (with the rows) unless it is dispatched with another ref or a same-named did-schema branch that predates #406.

Checked: Octave __parse_file__ parses the edited file (a deliberately broken file fails as a control). No MATLAB here, so the tests themselves run only in CI. Soph is not needed (tests only).


Generated by Claude Code

[bath tests require the NCIm rows] (Jess Haley, 2026-11-30, did-schema
docs/plans/did_v2_go_forward_class_audit.md; tracked in #486). The rows
are on did-schema main since #406 (aabe9311), so the bath tests now fail
unless the registry holds all three NCIm-only chemicals and the NCIm
equivalent on every ChEBI row, carbogen's NCIm:CL1445492 included (11 of
11). ncimRowsState becomes requireNcimRows; the "without the rows"
branches are removed, not inverted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxKLA8Tbf9cpvDe7fuVeKf
@jesshaley
jesshaley marked this pull request as ready for review November 30, 2026 17:00
@jesshaley
jesshaley merged commit 9f18f59 into V2 Nov 30, 2026
11 checks passed
jesshaley pushed a commit that referenced this pull request Nov 30, 2026
@jesshaley
jesshaley deleted the claude/bath-tests-require-ncim-rows branch December 2, 2026 17:29
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.

2 participants