Add meanings table#302
Open
oruebel wants to merge 20 commits into
Open
Conversation
8 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds first-class support for the new HDMF Common MeaningsTable type and wires it into DynamicTable, while also improving ElectrodesTable dataset chunking by making row chunk size configurable (defaulting to 100) to avoid inefficient chunking of 1.
Changes:
- Added
src/nwb/hdmf/table/MeaningsTable.*implementing the newMeaningsTableregistered type and initialization logic. - Extended
DynamicTablewith support for creating/readingMeaningsTableinstances (including a conveniencecreateMeaningsTableAPI) and added unit tests. - Updated
ElectrodesTable.initialize/NWBFile::createElectrodesTableand related tests to use and verify a configurable row chunk size.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testRecordingWorkflow.cpp | Updates electrodes table creation to pass a row chunk size and asserts expected HDF5 chunking. |
| tests/testRecordingObjects.cpp | Updates electrodes table creation to pass a row chunk size and asserts expected HDF5 chunking. |
| tests/testNWBFile.cpp | Updates electrodes table creation to pass a row chunk size and asserts expected HDF5 chunking. |
| tests/testMeaningsTable.cpp | Adds new unit tests covering MeaningsTable initialization, chunking, linking, and data read/write. |
| tests/testDynamicTable.cpp | Adds tests for DynamicTable::createMeaningsTable and DynamicTable::readMeaningsTable. |
| tests/CMakeLists.txt | Adds the new testMeaningsTable.cpp to the test target. |
| src/nwb/NWBFile.hpp | Extends createElectrodesTable API with optional rowChunkSize parameter. |
| src/nwb/NWBFile.cpp | Passes rowChunkSize through to ElectrodesTable::initialize. |
| src/nwb/hdmf/table/MeaningsTable.hpp | Introduces the MeaningsTable type and its registered fields (value/meaning/target). |
| src/nwb/hdmf/table/MeaningsTable.cpp | Implements MeaningsTable::initialize (datasets + target link). |
| src/nwb/hdmf/table/DynamicTable.hpp | Adds API/macro support for MeaningsTable plus a convenience creation method. |
| src/nwb/hdmf/table/DynamicTable.cpp | Implements DynamicTable::createMeaningsTable (group creation + initialization). |
| src/nwb/file/ElectrodesTable.hpp | Extends ElectrodesTable::initialize with optional rowChunkSize. |
| src/nwb/file/ElectrodesTable.cpp | Applies rowChunkSize to dataset chunking during initialization. |
| CMakeLists.txt | Adds MeaningsTable.cpp to the library build. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
59
to
62
| * @param description The description of the table (default: "metadata about | ||
| * extracellular electrodes") | ||
| * @return Status::Success if successful, otherwise Status::Failure. | ||
| */ |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…outBorders/aqnwb into add_meanings_table
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.
Fix #284
Implement new
MeaningsTabletype:src/nwb/hdmf/table/MeaningsTable.*source forMeaningsTableMeaningsTableUpdate
DynamicTableto support addingMeaningsTables:readMeaningsTablefor readingMeaningsTablesassociated with aDynamicTable. This also createscreateMeaningsTableInstancemethods for creatin a newMeaningsTablesthat is not yet initialized.DynamicTable.createMeaningsTablemethods for creating a fully initializedMeaningsTablethat is associated with a particular column of theDynamicTableDynamicTable.createMeaningsTableandDynamicTable.readMeaningsTablemethods.- [ ] Update the docs/tutorials as necessary to describe the use of MeaningsTable alongside DynamicTableThis will be part of follow-up once the full stack for EventsTable has been addedOther Changes
ElectrodesTable.initializeto add a new optional parameterrowChunkSize. Similar to theMeaningsTablethe existingElectrodesTablealso creates pre-defined columns ininitialize. Currently the chunking was set inElectrodesTableto1, which is too small. AddingrowChunkSizeincreases the default to 100 and allows the caller to set the chunk size.