Recommend /events as single location for EventsTable; add source attribute#690
Open
rly wants to merge 2 commits into
Open
Recommend /events as single location for EventsTable; add source attribute#690rly wants to merge 2 commits into
rly wants to merge 2 commits into
Conversation
…ibute Per consensus on #689, /events is now the recommended location for all EventsTable instances regardless of provenance. The three-way layout (/acquisition, /processing, /events) is replaced by a single location plus a new optional `source` attribute on EventsTable that records where the events came from as a short human-readable phrase, e.g., "Acquisition system", "Thresholding of analog signal ANALOG1 at 3 V", "Manual video review". Also clarifies in the type docstring, the /events group docstring, and the FAQ that each EventsTable should hold events of a single type. Updates the deprecation docstrings of BehavioralEvents and AnnotationSeries to point at EventsTable, /events, and source, and to spell out the field mappings. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
oruebel
reviewed
May 15, 2026
oruebel
requested changes
May 15, 2026
Contributor
oruebel
left a comment
There was a problem hiding this comment.
Overall this looks good to me. I added a suggestion, please take a look.
Per review feedback on #690 (@oruebel): a text attribute named `source` reads like it should be the source object itself, and a structured object-reference `source` (link to the Container the events were derived from) is planned as a follow-up. Renaming the text attribute to `source_description` disambiguates "a textual description of the source" from "the source object," and frees the `source` name for the future link. Also sharpens the docstring to state it is a free-text label of origin only, distinct from `description` (the narrative of how event times were computed), since the two prose fields would otherwise overlap. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 tasks
oruebel
approved these changes
May 15, 2026
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.
Summary
Closes #689 (pending consensus on this PR).
EventsTable. AllEventsTableinstances for a session belong in the top-level/eventsgroup ofNWBFile, regardless of provenance. Replaces the three-way/acquisitionvs/processing/<module>vs/eventsguidance that landed earlier in the 2.10.0 cycle.sourceattribute onEventsTable(text, free-form short phrase) records where the events came from. Examples used in docs:"Acquisition system","Thresholding of analog signal ANALOG1 at 3 V","Manual video review". The longerdescriptionattribute still carries the algorithm/channel narrative.EventsTabletype docstring, the/eventsgroup docstring, and the FAQ that each table should hold events of a single type (same per-event metadata columns across all rows). This was stated in NWBEP001 but not previously reflected in the schema docs.BehavioralEventsandAnnotationSeriesnow point atEventsTable, name/eventsas the destination, mention thesourceattribute, and spell out the per-field migration mapping (includingdata→ an event-marker-named column forBehavioralEvents, anddata→annotationcolumn forAnnotationSeries).Discussion captured the consensus for Option 1 from #689 (single location, with optional categorical info on the table itself rather than encoded by path). The
sourceattribute is intentionally free text rather than a controlled vocabulary, because the acquisition/processing distinction is exactly what made the path-based layout inconsistent across labs in the first place.Files changed
core/nwb.event.yaml—sourceattribute onEventsTable; single-type clarification in type docstring.core/nwb.file.yaml— rewrote/eventsgroup docstring for the single-location guidance.core/nwb.behavior.yaml,core/nwb.misc.yaml— rewroteBehavioralEventsandAnnotationSeriesdeprecation docstrings.docs/format/source/format_description.rst— FAQ section on routing time-anchored experimental data updated to single-location.docs/format/source/format_release_notes.rst— combined Where to store EventsTable objects in the NWB file? #689 entry under Major changes (covers both deprecations + the single-location andsourcestory); separate Minor changes entry covers schema-side additions.Test plan
NamespaceCatalog(hdmf-common1.9.0 +core2.10.0-alpha) in apynwb/hdmfdev env.make doc) — should be checked before merging; FAQ section changes are RST.EventsTable.sourceround-trips throughadd_events_table/get_events_tableand that no schema validation regresses.Notes for reviewers
EventsTableunder/acquisitionor in aProcessingModule(becauseEventsTableinherits fromDynamicTable). This PR does not forbid that placement; it only changes the recommendation. The FAQ no longer mentions alternate placements at all — please flag if you'd prefer to mention this explicitly.sourceattribute is free text. If you'd prefer a controlled vocabulary (e.g.,{acquisition, processing, annotation}), please weigh in — I argued against it in the discussion thread but it's a reasonable alternative.🤖 Generated with Claude Code