Skip to content

Support nwb-schema v2.11.0 - #859

Draft
ehennestad wants to merge 2 commits into
mainfrom
wip-support-schema-2.11.0
Draft

Support nwb-schema v2.11.0#859
ehennestad wants to merge 2 commits into
mainfrom
wip-support-schema-2.11.0

Conversation

@ehennestad

@ehennestad ehennestad commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Add the v2.11.0 schema specifications and regenerate the neurodata type classes, so files targeting the latest schemas can be created, exported, and read with MatNWB.

Reference: NeurodataWithoutBorders/nwb-schema#710

What changed

  • MatNWB now targets nwb-schema 2.11.0 / hdmf-common-schema 1.10.0 by default; new NwbFile objects report nwb_version 2.11.0.
  • Units gains optional attributes waveform_mean_time_before_peak_in_ms, waveform_sd_time_before_peak_in_ms, and waveforms_time_before_peak_in_ms for recording where the spike peak falls within stored waveforms. The waveform_mean_unit, waveform_sd_unit, and waveforms_unit attributes are now writable with default 'volts' instead of fixed read-only values.
  • MeaningsTable.target is now stored as an object reference to the described VectorData instead of a soft link (hdmf-common 1.10.0 change).
  • Docstring text updates across ~50 regenerated classes following wording changes in the schema sources.
Implementation notes
  • MeaningsTable.target now validates via types.util.validateReferenceType (accepting a types.untyped.ObjectView) and is exported with writeAttribute instead of the soft-link export path.
  • The new Units peak-time attributes use the existing attribute-dependency mechanism: setting one without its parent dataset (e.g. waveforms_time_before_peak_in_ms without waveforms) warns that the value will not be exported.
  • matnwb_generateRstFilesFromCode was rerun and produced no changes: v2.11.0 adds or removes no neurodata types, and property documentation is pulled from the class docstrings by Sphinx autodoc at build time.

How to test

nwb = NwbFile();
disp(nwb.nwb_version)

units = types.core.Units( ...
    'description', 'spike-sorted units', ...
    'colnames', {'spike_times'}, ...
    'waveforms_time_before_peak_in_ms', 0.5);
disp(units.waveforms_time_before_peak_in_ms)

Output:

2.11.0
Warning: The property "waveforms_time_before_peak_in_ms" of type "types.core.Units" depends on
the property "waveforms", which is unset. If you do not set a value for "waveforms, the value of
"waveforms_time_before_peak_in_ms" will not be exported to file.
    0.5000

Todo

  • Confirm final release status of nwb-schema 2.11.0 / hdmf-common-schema 1.10.0

Checklist

  • Have you ensured the PR description clearly describes the problem and solutions?
  • Have you checked to ensure that there aren't other open or previously closed Pull Requests for the same change?
  • If this PR fixes an issue, is the first line of the PR description fix #XX where XX is the issue number?

🤖 Generated with Claude Code

@ehennestad
ehennestad force-pushed the wip-support-schema-2.11.0 branch 2 times, most recently from da7b6e9 to 89f4b58 Compare August 26, 2026 17:45
ehennestad and others added 2 commits August 31, 2026 12:42
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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