Skip to content

Add event vectordata types#301

Open
oruebel wants to merge 11 commits into
schema_2_10from
add_event_vectordata
Open

Add event vectordata types#301
oruebel wants to merge 11 commits into
schema_2_10from
add_event_vectordata

Conversation

@oruebel

@oruebel oruebel commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Fix #299

  • Update schematype_to_aqnwb.py to facilitate generation the new types
    • Fixed indent of REGISTER_SUBCLASS call and use the proper core and hdmf-common namespace when used as included schema
    • Updated minimum Python version for resources/utils to ensure use of the latest versions of PyNWB with uv
    • Updated cpp code generation to use new std::weak_ptr via getIO instead of the previous m_io shared pointer
  • Implement the new TimestampVectorData and DurationVectorData types:
    • Implemented nwb/event/TimestampVectorData.hpp/cpp
    • Implemented nwb/event/DurationVectorData.hpp/cpp
    • Added unit tests for TimestampVectorData
    • Added unit tests for DurationVectorData
  • Update and test that DynamicTable properly supports the new column types:
    • Updated DynamicTable.readColumn using type traits to to support reading of both: i) VectorData columns with a specific data type and ii) columns that are a subtype of VectorData (e.g., TimestampVectorData and DurationVectorData)
    • Added override for DyanmicTable.addColumn to allow adding of fully configured VectorData columns and derived column types
    • Added unit test to ensure TimestampVectorData and DurationVectorData can be added viaDynamicTable.addColumn and read back via DynamicTable.readColumn
  • Other changes:
    • Updated the CHANGELOG

@oruebel oruebel added the category: enhancement proposed enhancements or new features label Jul 2, 2026
@oruebel oruebel marked this pull request as ready for review July 2, 2026 10:09
Copilot AI review requested due to automatic review settings July 2, 2026 10:09
@oruebel oruebel linked an issue Jul 2, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds schema/codegen and C++ support for the new NWB event timing VectorData column types (TimestampVectorData, DurationVectorData), and updates DynamicTable to support reading/adding derived VectorData column types—enabling future EventsTable work.

Changes:

  • Added CORE::TimestampVectorData and CORE::DurationVectorData implementations plus unit tests.
  • Extended DynamicTable with a new addColumn(VectorData) overload and updated readColumn typing to support VectorData subclasses.
  • Updated resources/utils (codegen + packaging) and documentation (CHANGELOG.md) to reflect the new types and generation behavior.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/nwb/event/TimestampVectorData.hpp New event timestamp column type interface + read/record accessors
src/nwb/event/TimestampVectorData.cpp Timestamp column initialization (unit/resolution attrs + VectorData init)
src/nwb/event/DurationVectorData.hpp New event duration column type interface + read/record accessors
src/nwb/event/DurationVectorData.cpp Duration column initialization logic
src/nwb/hdmf/table/DynamicTable.hpp readColumn trait-based return type support for VectorData subclasses
src/nwb/hdmf/table/DynamicTable.cpp New addColumn(VectorData) overload to register pre-written columns
tests/testTimestampVectorData.cpp New unit tests for TimestampVectorData read/write/registry behavior
tests/testDurationVectorData.cpp New unit tests for DurationVectorData read/write/registry behavior
tests/testDynamicTable.cpp New test ensuring derived VectorData columns can be added and read back
tests/CMakeLists.txt Registers new unit test sources in the test target
resources/utils/schematype_to_aqnwb.py Codegen updates (IO weak_ptr/getIO usage, namespace fixes, formatting)
resources/utils/aqnwb_utils.py Raises script requires-python to 3.10
resources/utils/generate_spec_files.py Raises script requires-python to 3.10
resources/utils/pyproject.toml Bumps utils version and requires-python to 3.10
CMakeLists.txt Adds new event source files to the library build
CHANGELOG.md Documents new types + DynamicTable updates and codegen changes

Comment thread src/nwb/hdmf/table/DynamicTable.cpp
Comment thread src/nwb/event/DurationVectorData.cpp
Comment thread src/nwb/event/TimestampVectorData.hpp
Comment thread resources/utils/schematype_to_aqnwb.py Outdated
Comment thread CHANGELOG.md Outdated
Comment thread src/nwb/event/TimestampVectorData.hpp Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@oruebel oruebel added this to the 0.4.0 milestone Jul 2, 2026
@oruebel oruebel self-assigned this Jul 2, 2026
@oruebel oruebel requested a review from rly July 2, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: enhancement proposed enhancements or new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for new TimestampVectorData and DurationVectorData

2 participants