-
Notifications
You must be signed in to change notification settings - Fork 14
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
HDF5 interface: add write_dict_to_hdf() and read_dict_from_hdf() #1247
Conversation
# Conflicts: # pyiron_base/storage/hdfio.py
@pmrv As discussed in the pyiron meeting, I plan to go ahead and merge this so we can focus on defining the interface in a separate pull request. |
@pmrv I fixed the remarks and would like to merge this. So if you have time to take another look that would be great. |
While I made a couple more changes to add the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a number of small remarks, but can be merged after those are considered without re-review.
The only bigger thing I've seen is the slash
parameter. While it was present before this PR introduces a lot of code now that offers it, but afaik we never use this, so it can be just removed completely imo
Co-authored-by: Marvin Poul <poul@mpie.de>
Co-authored-by: Marvin Poul <poul@mpie.de>
Co-authored-by: Marvin Poul <poul@mpie.de>
Co-authored-by: Marvin Poul <poul@mpie.de>
Co-authored-by: Marvin Poul <poul@mpie.de>
Co-authored-by: Marvin Poul <poul@mpie.de>
Co-authored-by: Marvin Poul <poul@mpie.de>
# Conflicts: # pyiron_base/storage/helper_functions.py
I would like to make the |
This pull request refactors the helper functions in the
pyiron_base.storage
module and adds thewrite_dict_to_hdf()
andread_dict_from_hdf()
functions. Thewrite_dict_to_hdf()
function takes a dictionary where the keys represent the path in the HDF5 file and the values represent the objects which should be stored in these nodes. The corresponding HDF5 groups are created automatically. Theread_dict_from_hdf()
function reads the nodes from a given HDF5 group and subgroups can be included using the optionalgroup_paths
parameter. The function returns a hierarchical dictionary which can be directly converted to aDataContainer
.