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

[Feature]: Call set_modified at the end of field setter methods to make appending easier #1244

Open
rly opened this issue Feb 7, 2025 · 0 comments

Comments

@rly
Copy link
Contributor

rly commented Feb 7, 2025

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 call io.write(file). Calling set_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-L91
to call self.set_modified() at the end.

Do you have any interest in helping implement the feature?

Yes.

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

No branches or pull requests

1 participant