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

Add sdupport for r- read mode to read without consolidated metadata #183

Merged
merged 7 commits into from
Apr 25, 2024

Conversation

oruebel
Copy link
Contributor

@oruebel oruebel commented Apr 18, 2024

Motivation

For benchmarking and when consolidated metadata may be bad, it will be useful to force reading without consolidated metadata. This is needed for the nwb-benchmarks.

This PR:

  • adds a new mode r- to force that a file is opened in r mode without using consolidated metadata.
  • fixes a bug where ZarrIO.__open_file_consolidated used properties of ZarrIO instead of the provided input parameters. This did not cause any errors so far, since the values matched but is still something that could have caused issues later on.
  • adds unit tests for -r read mode
  • fixes a minor bug inZarrStoreTestCase which assumed in the tearDown that the output file was always being created, so clean-up would fail if a test-case did not create a file.

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.

@oruebel oruebel requested a review from mavaylon1 April 18, 2024 22:30
@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.08%. Comparing base (4c9af4a) to head (e28904e).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #183      +/-   ##
==========================================
+ Coverage   86.04%   86.08%   +0.03%     
==========================================
  Files           5        5              
  Lines        1161     1164       +3     
  Branches      288      289       +1     
==========================================
+ Hits          999     1002       +3     
  Misses        107      107              
  Partials       55       55              

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

@oruebel
Copy link
Contributor Author

oruebel commented Apr 25, 2024

@mavaylon1 this is ready for review.

src/hdmf_zarr/backend.py Outdated Show resolved Hide resolved
@oruebel oruebel merged commit afaab5f into dev Apr 25, 2024
24 checks passed
@oruebel oruebel deleted the add/-r-read branch April 25, 2024 23:51
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.

3 participants