Skip to content

Change MeaningsTable.target from a link to an object-reference attribute - #1525

Merged
rly merged 5 commits into
devfrom
meaningstable-target-object-reference
Jul 8, 2026
Merged

Change MeaningsTable.target from a link to an object-reference attribute#1525
rly merged 5 commits into
devfrom
meaningstable-target-object-reference

Conversation

@rly

@rly rly commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Motivation

Depends on hdmf-dev/hdmf-common-schema#97, which changes MeaningsTable.target from a link to an object-reference attribute (dtype with reftype: object, target_type: VectorData) in hdmf-common 1.10.0. This matches VectorIndex.target and DynamicTableRegion.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

  • Update the hdmf-common-schema submodule to the merged main commit for Change MeaningsTable.target from a link to an object-reference attribute hdmf-common-schema#97 (schema 1.10.0).
  • Add MeaningsTableMap (common/io/table.py) 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 (which fails the equal-length check), and the VectorData it points to is supplied to the target constructor argument. New-format files are handled by the default object-reference mapping.
  • Reconcile MeaningsTable docstrings ("linked" -> "referenced") to match the schema.
  • Add TestMeaningsTableLegacyTargetLinkRead to cover reading a file in the 1.9.0 "target" link layout.

There is no change to the read/write API: mt.target still returns the target VectorData. The change is limited to the on-disk representation.

🤖 Generated with Claude Code

rly and others added 2 commits July 3, 2026 16:03
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

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.22%. Comparing base (614d4d2) to head (afc2b1f).

Files with missing lines Patch % Lines
src/hdmf/common/io/table.py 90.00% 1 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rly
rly marked this pull request as ready for review July 6, 2026 23:00
@rly
rly requested a review from oruebel July 6, 2026 23:00
rly and others added 3 commits July 7, 2026 23:45
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>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rly
rly merged commit c647ace into dev Jul 8, 2026
28 checks passed
@rly
rly deleted the meaningstable-target-object-reference branch July 8, 2026 04:03
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