Skip to content

[Feature]: Add add_meanings method on DynamicTable class #846

Description

@ehennestad

What would you like to see added to MatNWB?

The new meanings_tables property of the DynamicTable class which is introduced in nwb-schema v2.10.0 is functionally equivalent to e.g the acquisition group on the NWB file (it is added to a group and needs to be given a specific name).

However, some extra validation should occur when adding a MeaningsTable.

  1. The name of the entry should have the postfix "_meanings" and the suffix should match one of the named elements in the colnames property.
  2. The linked VectorData object in the target property must match the VectorData object in the DynamicTable with the name matching the suffix of the MeaningsTable object's name.
  3. All unique values of the linked VectorData must be present in the VectorData object stored in the values property. This validation might belong in the MeaningsTable constructor or the validate_values method of the MeaningsTable class.

Is your feature request related to a problem?

No response

What solution would you like?

To add MeaningsTables to a DynamicTable we should add a convenience method called addMeanings to ensure these extra constraints are checked.

This will provide the user a clear path to add a MeaningsTable to a DynamicTable and ensure that the MeaningsTable is properly validated against the schema

However, if someone calls the add or set method directly on the meanings_tables Set on the DynamicTable these extra checks are not present. The validations above should also be added as a custom hook in the validate_meanings_tables method of the DynamicTable.

Do you have any interest in helping implement the feature?

Yes.

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions