Release Notes#
Version 0.2.0 (October 18, 2025)#
Major rewrite and expansion of the ndx-hed extension with three core classes and comprehensive tooling.
New Features
Core Classes#
HedLabMetaData: Required metadata container for storing HED schema version and optional custom definitions
Must be added to
NWBFile
before using any HED annotationsSupports both standard and library schemas
Includes
DefinitionDict
for custom HED definitionsMethods:
get_hed_schema()
,get_definition_dict()
,add_definitions()
,extract_definitions()
HedTags: VectorData subclass for row-specific HED annotations in DynamicTables
Must be named “HED” (enforced by constructor)
Stores one HED string per row
Works with any NWB DynamicTable (trials, units, epochs, etc.)
HedValueVector: VectorData subclass for column-wide HED templates with value placeholders
Stores numerical/categorical data with associated HED annotation template
Uses
#
placeholder for values (e.g., “Duration/# s”)HED annotation applies to entire column
Validation System#
HedNWBValidator: Comprehensive validation class for HED annotations in NWB files
validate_file()
: Validates entireNWBFile
validate_dynamic_table()
: Validates specific DynamicTablevalidate_hed_tags()
: Validates individual HedTags columnvalidate_hed_value_vector()
: Validates HedValueVector columnsSupports both in-memory and file-based validation
BIDS Integration#
Bidirectional BIDS ↔ NWB conversion utilities in
utils/bids2nwb.py
:extract_meanings()
: Converts BIDS JSON sidecars to meanings dictionaryget_categorical_meanings()
: Creates MeaningsTable from BIDS categorical columnsget_events_table()
: Converts BIDS events.tsv + sidecar to NWB EventsTableget_bids_events()
: Converts EventsTable back to BIDS format (DataFrame + sidecar)extract_definitions()
: Extracts HED definitions from BIDS sidecars
ndx-events Integration#
Full support for EventsTable, MeaningsTable, CategoricalVectorData
Three integration patterns:
Direct HED column for event-specific annotations
HedValueVector columns for shared annotations with values
Categorical columns with HED in MeaningsTable
Examples
Seven comprehensive runnable examples demonstrating all features:
01_basic_hed_classes.py
: Introduction to HedLabMetaData, HedTags, and HedValueVector02_trials_with_hed.py
: Adding HED annotations to NWB trials table03_events_table_integration.py
: Three patterns for EventsTable integration04_bids_conversion.py
: Bidirectional BIDS ↔ NWB conversion workflows05_hed_validation.py
: Comprehensive validation examples06_complete_workflow.py
: End-to-end workflow with file I/O07_hed_definitions.py
: Custom HED definitions and expansion
Dependencies
Updated to
hedtools>=0.7.1
(released to PyPI)pynwb>=2.8.2
hdmf>=3.14.1
Optional:
ndx-events>=0.4.0
for EventsTable support
Testing
116+ comprehensive test cases
Full coverage of all core classes and utilities
File I/O roundtrip testing
Validation testing with valid and invalid HED
BIDS conversion roundtrip testing
Definition handling and persistence testing
Breaking Changes from 0.1.0
HedTags constructor changes: Removed
hed_version
parameter (now uses HedLabMetaData)New requirement: HedLabMetaData must be added to
NWBFile
before using HED annotationsName enforcement: HedTags must be named “HED”, HedLabMetaData must be named “hed_schema”
Documentation
Updated user guide for 0.2.0 architecture
Comprehensive example suite with runnable code
Updated README with Quick Start guide
Version 0.1.0 (July 25, 2024)#
Initial Release
Implements a
HedTags
class that extends NWBVectorData
Validates tags in the constructor and as they are added
The
HedTags
class can be used alone or added to anyDynamicTable
Initial release only supports string HED version specifications, not tuples or lists
Features
Basic HED tag validation
Integration with NWB DynamicTables
Support for standard HED schemas
Limitations
No centralized schema management
No support for custom definitions
No validation utilities
No BIDS integration