Open
Description
What would you like to see added to PyNWB?
This issue came up in this discussion: #2031 (comment).
Currently multiple tags can be added to an interval as a single string separated by commas. These tags will be parsed into 3 different strings.
from pynwb.epoch import TimeIntervals
from pynwb.testing.mock.file import mock_NWBFile
nwbfile = mock_NWBFile()
test_epochs = TimeIntervals(name='test_epochs')
test_epochs.add_interval(start_time=1.0, stop_time=10.0, tags='tag1')
test_epochs.add_interval(start_time=10.0, stop_time=20.0, tags='tag1, tag2, tag3')
nwbfile.add_time_intervals(test_epochs)
print(nwbfile.intervals['test_epochs']['tags'][:]) # [['tag1'], ['tag1', 'tag2', 'tag3']]
It seems like this approach could be prone to misunderstandings on how the tags are written to the file. Is there a case where providing a single string is preferred over providing a list of strings?
Is your feature request related to a problem?
No response
What solution would you like?
Remove the automatic splitting of tags
Do you have any interest in helping implement the feature?
Yes.
Code of Conduct
- I agree to follow this project's Code of Conduct
- Have you checked the Contributing document?
- Have you ensured this change was not already requested?