Change MeaningsTable.target from a link to an object-reference attribute - #1525
Merged
Conversation
Update the bundled hdmf-common schema to 1.10.0, which stores MeaningsTable.target as an object-reference attribute (reftype: object, target_type: VectorData) rather than a link. This matches VectorIndex.target and DynamicTableRegion.table, which use object references to point at a co-located dataset within table machinery. Add MeaningsTableMap to read files written with the hdmf-common 1.9.0 MeaningsTable, which stored target as a link named "target". On read, the legacy link is removed from the builder before the generic mapping would otherwise match it as a VectorData column of the table, and the VectorData it points to is supplied to the target constructor argument. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1525 +/- ##
==========================================
- Coverage 93.23% 93.22% -0.01%
==========================================
Files 41 41
Lines 10186 10204 +18
Branches 2104 2106 +2
==========================================
+ Hits 9497 9513 +16
- Misses 413 414 +1
- Partials 276 277 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rly
marked this pull request as ready for review
July 6, 2026 23:00
oruebel
approved these changes
Jul 6, 2026
Point the submodule at 4508b8f on main, the squash-merge of hdmf-dev/hdmf-common-schema#97, now that the schema PR is merged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…bject-reference # Conflicts: # CHANGELOG.md
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Motivation
Depends on hdmf-dev/hdmf-common-schema#97, which changes
MeaningsTable.targetfrom a link to an object-reference attribute (dtypewithreftype: object,target_type: VectorData) in hdmf-common 1.10.0. This matchesVectorIndex.targetandDynamicTableRegion.table, which use object references to point at a co-located dataset within table machinery.This PR updates the bundled schema submodule to the released schema commit and adds API support, including backwards-compatible reading of files written with the 1.9.0 link layout.
Changes
hdmf-common-schemasubmodule to the mergedmaincommit for Change MeaningsTable.target from a link to an object-reference attribute hdmf-common-schema#97 (schema 1.10.0).MeaningsTableMap(common/io/table.py) to read files written with the hdmf-common 1.9.0MeaningsTable, which storedtargetas a link named "target". On read, the legacy link is removed from the builder before the generic mapping would otherwise match it as aVectorDatacolumn of the table (which fails the equal-length check), and theVectorDatait points to is supplied to thetargetconstructor argument. New-format files are handled by the default object-reference mapping.MeaningsTabledocstrings ("linked" -> "referenced") to match the schema.TestMeaningsTableLegacyTargetLinkReadto cover reading a file in the 1.9.0 "target" link layout.There is no change to the read/write API:
mt.targetstill returns the targetVectorData. The change is limited to the on-disk representation.🤖 Generated with Claude Code