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

Fix bug when exporting HDF5 datasets with unlimited dimension #155

Merged
merged 5 commits into from
Jan 16, 2024

Conversation

oruebel
Copy link
Contributor

@oruebel oruebel commented Jan 16, 2024

Motivation

Fix #154

When an HDF5 file contains datasets with unlimited dimensions, use of the hdmf.utils.get_data_shape method yields the wrong data shape because the functions looks at maxshape first. This leads to an error on export because Zarr cannot create a dataset with undefined dimensions.

How to test the behavior?

See #154

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Have you checked our Contributing document?
  • Have you ensured the PR clearly describes the problem and the solution?
  • Is your contribution compliant with our coding style? This can be checked running ruff from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.

@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (71bfa6d) 85.07% compared to head (21d5a6d) 85.16%.

Files Patch % Lines
src/hdmf_zarr/backend.py 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #155      +/-   ##
==========================================
+ Coverage   85.07%   85.16%   +0.08%     
==========================================
  Files           5        5              
  Lines        1146     1146              
  Branches      311      311              
==========================================
+ Hits          975      976       +1     
+ Misses        115      114       -1     
  Partials       56       56              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oruebel oruebel marked this pull request as ready for review January 16, 2024 06:45
@oruebel oruebel requested review from rly and mavaylon1 January 16, 2024 06:45
mavaylon1
mavaylon1 previously approved these changes Jan 16, 2024
@mavaylon1 mavaylon1 merged commit abf7a02 into dev Jan 16, 2024
24 checks passed
@mavaylon1 mavaylon1 deleted the fix/data_shape_error branch January 16, 2024 21:33
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

Successfully merging this pull request may close these issues.

[Bug]: Converting HDF5 to Zarr with unlimted dimensions fails
3 participants