Closed oruebel closed 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
9692a98
) 84.51% compared to head (4bdb47a
) 85.07%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@sinha-r @rly this PR is related to the cloud project to allow conversion from HDF5 to Zarr while preserving chunking and compression settings if possible
@rly @mavaylon1 can you please review
The code looks good to me. There are a bunch of branches in the code that translates the compression. I know it's tedious, but could you write tests for those branches? That would help make sure those lines work as intended and prevent our code coverage from dropping 1% to 83.4%. We might want to include hdmf-zarr in our core packages for the U24 at some point.
There are a bunch of branches in the code that translates the compression. I know it's tedious, but could you write tests for those branches?
The main reason I didn't add tests for all the branches is because in order to cover those cases I believe we need to install custom HDF5 compressors, i.e., add hdf5_plugins
as a dependency just to run tests and szip
may not be possible to test because it requires a license. In principle, we just need a HDF5 dataset that looks like it uses those filters, but I'm not sure if we can "fake" that easily.
add hdf5_plugins as a dependency just to run tests
I think that is OK. It would be added to https://github.com/hdmf-dev/hdmf-zarr/blob/dev/requirements-dev.txt
szip may not be possible to test because it requires a license
We can just exclude that one from coverage
@rly Can you please take another look. I added a new unit test module for ZarrDataIO
. As mentioned above, I had to add hdf5plugin
as a requirement for these tests. I added @unittest.skipIf
to the test cases that use hdf5plugin
just in case the library is not installed. The tests now cover 100% of the patch.
Thanks! Looks good to me.
Motivation
Fix #152 Preserve h5py.Dataset filter settings on export
How to test the behavior?
ZarrDataIO
to wraph5py.Dataset
and infer filter settingsZarrIO
to wraph5py.Dataset
on write to preserve filter settingsChecklist
ruff
from the source directory.