Skip to content

subjectmeasurement: a name found as a registered term round-trips by its name key - #301

Merged
jesshaley merged 1 commit into
V2from
claude/measurement-name-spelling
Oct 30, 2026
Merged

jesshaley merged 1 commit into
V2from
claude/measurement-name-spelling

Conversation

@jesshaley

Copy link
Copy Markdown
Collaborator

My did-schema change turned V2 red. Waltham-Data-Science/DID-schema#240 (merged as 4fb28841) registers NCIT:C25150 "Age" ([age is NCIT Age]). The migrator now finds a v1 subjectmeasurement named age as that registered term, matching by did2.schema.termNameKey (#294), and writes the registry's label Age. Three tests on V2 now fail; this PR's CI on #299 shows them:

  • testMigratorsJMeasurementFilter/testSubjectMeasurementFoldsToObservationPlusAbsoluteReference: Age vs age
  • testRawV1RoundTripMeasurement/testWriterShapesRoundTrip: lost subjectmeasurement.measurement, v1 "age", rebuilt "Age"
  • testRawV1RoundTripMeasurement/testADifferentSourceIsReportedLost: same cause

Under [spelling is notation] (Jess Haley, 2026-10-26), equivalent spellings of one term are the same thing in the round trip. So:

  • +roundtrip/subjectmeasurement.m: when the rebuilt variable has a node, it adds a spec.same row for subjectmeasurement.measurement. The row compares the two names by did2.schema.termNameKey. It does not accept any text: a v1 name agex would still be reported lost.
  • The migrator test: it now expects the registered node and label. A name the registry doesn't hold still stays a bare label.

Not run locally: there is no MATLAB here. CI is the first run.


Generated by Claude Code

…its name key

did-schema #240 (4fb28841) registers NCIT:C25150 "Age" ([age is NCIT
Age]); the migrator now finds a v1 subjectmeasurement 'age' as that term
(did2.convert.registeredTerm, by did2.schema.termNameKey) and writes the
registry's label 'Age'. That turned V2 red in three tests:
testSubjectMeasurementFoldsToObservationPlusAbsoluteReference ('Age' vs
'age'), testRawV1RoundTripMeasurement/testWriterShapesRoundTrip and
testADifferentSourceIsReportedLost (lost: subjectmeasurement.measurement,
v1 "age", rebuilt "Age").

[spelling is notation] (Jess Haley, 2026-10-26): equivalent spellings of
one term are the same thing in the round trip. The inverse now adds a
spec.same row for subjectmeasurement.measurement when the variable has a
node, comparing by did2.schema.termNameKey (not any text: 'agex' is still
lost). The migrator test expects the registered node and label.

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 October 30, 2026 05:22
@jesshaley
jesshaley merged commit 3c6c4d7 into V2 Oct 30, 2026
11 checks passed
@jesshaley
jesshaley deleted the claude/measurement-name-spelling branch October 30, 2026 13:58
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