[Feature]: Call set_modified at the end of field setter methods to make appending easier #1244
Labels
category: enhancement
improvements of code or code behavior
priority: low
alternative solution already working and/or relevant to only specific user(s)
What would you like to see added to HDMF?
Currently, when appending a group or dataset (and probably also links and maybe attributes?) to existing files, the user needs to open the file in append mode, set the field that doesn't exist yet on the parent container, and call
AbstractContainer.set_modified
on the parent container, and then callio.write(file)
. Callingset_modified
seems like an unnecessary extra step for the user. It should just be called every time a field is set to a new value.See NeurodataWithoutBorders/pynwb#2032 (comment)
What solution would you like?
Change the field setter in
AbstractContainer
: https://github.com/hdmf-dev/hdmf/blob/dev/src/hdmf/container.py#L83-L91to call
self.set_modified()
at the end.Do you have any interest in helping implement the feature?
Yes.
The text was updated successfully, but these errors were encountered: