Skip to content

Add per-asset dataStandard, HED standard, and extensions to StandardsType#371

Open
yarikoptic wants to merge 2 commits intomasterfrom
enh-hed
Open

Add per-asset dataStandard, HED standard, and extensions to StandardsType#371
yarikoptic wants to merge 2 commits intomasterfrom
enh-hed

Conversation

@yarikoptic
Copy link
Member

@yarikoptic yarikoptic commented Feb 24, 2026

Summary

  • Add dataStandard: Optional[List[StandardsType]] field to BareAsset so dandi-cli can declare per-asset data standards (NWB, BIDS, HED, OME/NGFF) that flow through to AssetsSummary during aggregation
  • Add version: Optional[str] field to StandardsType to track standard versions (e.g. NWB 2.7.0, BIDS 1.9.0, HED 8.2.0)
  • Add extensions: Optional[List[StandardsType]] self-referencing field to StandardsType for standard extensions (NWB ndx-* extensions, HED library schemas)
  • Add hed_standard constant alongside existing nwb_standard, bids_standard, ome_ngff_standard
  • Collect per-asset dataStandard entries in aggregate_assets_summary(), with deprecated heuristic fallbacks for older clients (remove after 2026-12-01)
  • Register dataStandard in migrate() _FIELDS_INTRODUCED for downgrade pruning
  • Comprehensive CLAUDE.md with architecture docs and schema change checklist

Companion dandi-cli PR: dandi/dandi-cli#XXXX

Test plan

  • test_hed_standard_structure — verifies hed_standard has correct name, identifier, schemaKey
  • test_aggregate_per_asset_datastandard — HED declared per-asset flows to summary
  • test_aggregate_per_asset_datastandard_no_duplication — BIDS not duplicated when declared both per-asset and via heuristic
  • All 243 existing tests pass

PR in dandi-cli:

🤖 Generated with Claude Code

yarikoptic and others added 2 commits February 19, 2026 22:30
…s on StandardsType

- Bump DANDI_SCHEMA_VERSION to 0.8.0, add 0.7.0 to ALLOWED_INPUT_SCHEMAS
- Add `dataStandard: Optional[List[StandardsType]]` to BareAsset for
  per-asset standard declarations (NWB, BIDS, HED, OME/NGFF)
- Add `version: Optional[str]` to StandardsType
- Add `extensions: Optional[List["StandardsType"]]` (self-referencing)
  to StandardsType for NWB ndx-* extensions, HED library schemas, etc.
- Add `hed_standard` constant (RRID:SCR_014074)
- Collect per-asset dataStandard in aggregate_assets_summary(), with
  deprecated path/encoding heuristic fallbacks (remove after 2026-12-01)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…cklist

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.82%. Comparing base (07aa22c) to head (4bb5f6f).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
dandischema/metadata.py 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #371      +/-   ##
==========================================
- Coverage   97.91%   97.82%   -0.10%     
==========================================
  Files          18       18              
  Lines        2401     2432      +31     
==========================================
+ Hits         2351     2379      +28     
- Misses         50       53       +3     
Flag Coverage Δ
unittests 97.82% <90.90%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

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.

1 participant