Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding read/write support, hdf5 support pulled from scikit-hep/boost-histogram#997. Zip and JSON support added as well. Libraries supporting the UHI schema can simply produce or consume a Python object following the schema and then use the utilities in
uhi.io
to read or write to all the formats we implement.This also makes a clarification to the schema:
np.asarray
.Each format remains as flexible as possible by expecting the user to do a little setup; you can store anywhere in an HDF5 file via groups. You can write to an existing zip file, control the compression, etc. by using a Zipfile object.
I'm using the JSON format to store tests, then converting them to the binary formats (HDF5 and Zip) and then testing that the files are correct and can be read back.