Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support overwrite of string array attributes #151

Merged
merged 7 commits into from
Feb 3, 2025

Conversation

oruebel
Copy link
Contributor

@oruebel oruebel commented Feb 3, 2025

To allow us to dynamically add columns to a DynamicTable (even one that was read from a file), we need to be able to update the colNames attribute.

  • Updated BaseIO.createAttribute for string arrays to explicitly allow us to force overwrite of existing attributes and updated HDF5IO.createAttribute accordingly. HDF5 does not support expanding attributes in the same way it does for datasets so we need to delete the existing attribute and overwrite it with a new one with the same name.
    • Updated unit tests for HDF5IO accordingly and enhanced tests for HDF5IO.createAttribute
  • Updated DynamicTable.finalize to overwrite column names to correctly support appending of columns to existing tables
  • Updated DynamicTable constructor to read the existing column names if they exist from the file so that we can append new columns to existing tables
  • Fixed writing of variable-length strings columns via DynamicTable.add_column to avoid unnecessary iteration and use writeDataBlock directly
  • Fixed data types for string columns in ElectrodeTable to use variable length strings instead of fixed length strings
  • Updated Container.initialize to correctly return its Status
  • Added new unit tests for DynamicTable

@oruebel oruebel merged commit a1057b4 into move_colnames Feb 3, 2025
9 checks passed
@oruebel oruebel deleted the overwrite_colnames branch February 3, 2025 05:39
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