[V_delta] Restore daqmetadatareader.tab_separated_file_parameter as optional#51
Merged
Merged
Conversation
…tional Closes #50. The v1 daqmetadatareader schema carried two fields: - ndi_daqmetadatareader_class - tab_separated_file_parameter V_delta renamed the first to reader_class (already in place) but dropped tab_separated_file_parameter entirely. The TSV hook is a "lazy" design (the clean pattern is a daqmetadatareader_tsv subclass) but it is in use in real v1 corpora, and synthesizing a subclass document per migrated v1 doc is meaningfully bigger work than preserving the hook. Restore the field as an optional V_delta field (mustBeNonEmpty: false, default empty). Migrator preserves a populated value; absent v1 source yields an absent V_delta field. New V_delta-shaped documents that need TSV reading can populate the field directly; a future cleanup that introduces a proper daqmetadatareader_tsv subclass can deprecate the hook then. Changes: - schemas/V_delta/stable/daqmetadatareader.json: add the field declaration with documentation pointing at the lazy-hook intent and the future-subclass cleanup direction. - schemas/V_delta/conversions/from_did_v1/daqmetadatareader.md: new conversion markdown documenting the field mapping (reader_class rename + TSV hook identity passthrough + metadata_names new field) and the rationale for keeping the hook in V_delta. - schemas/V_delta/conversions/from_did_v1/_index.md: add the daqmetadatareader row with status applied-in-tooling. The companion did-matlab change (preserve the field through the migrator) lives on a separate PR -- the migrator currently builds the property block from scratch and silently drops any field it does not know about, so the schema change alone does not roundtrip the value.
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.
Closes #50.
Summary
Restores
tab_separated_file_parameterinV_delta/stable/daqmetadatareader.jsonas an optional pass-through field. v1 corpora populate this field as a "lazy hook" for TSV-per-epoch metadata sources; dropping it at the V_delta boundary forces synthesis of adaqmetadatareader_tsvsubclass at migration time that does not currently exist. Preserving the v1 hook is the smaller, safer change.What changed
schemas/V_delta/stable/daqmetadatareader.json— add the field declaration withmustBeNonEmpty: false,mustBeScalar: true,queryable: true. Documentation points at the lazy-hook intent and the future-subclass cleanup direction.schemas/V_delta/conversions/from_did_v1/daqmetadatareader.md— new conversion markdown documenting the full field mapping (reader_classrename + TSV-hook identity pass-through +metadata_namesnew field) and the rationale for keeping the hook.schemas/V_delta/conversions/from_did_v1/_index.md— add thedaqmetadatareaderrow with statusapplied-in-tooling.Companion did-matlab work
The migrator at
did-matlab/src/did/+did2/+convert/+migrators/daqmetadatareader.mbuildsnewBlockfrom scratch and silently dropstab_separated_file_parameter. A follow-up PR onvh-lab/did-matlabextends the migrator to preserve a populated value and extends tests with the round-trip case. That PR will reference this one.Test plan
JSON syntax validated locally. The actual schema-validation pass runs in CI here. Roundtrip tests against real corpora live in
did-matlab'stests/+did2/+unittest/testCorpus*.m; the companion did-matlab PR will assert the field survives migration.Future cleanup (out of scope)
Once V_delta is canonical and
[did2 #14]/[did2 #15]migration docs land, we can revisit whether to deprecatetab_separated_file_parameterin favour of a properdaqmetadatareader_tsvsubclass. That's a future-release concern; this PR keeps v1 → V_delta a clean roundtrip in the meantime.Generated by Claude Code