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

Allow Codec for compression for use with LINDI #1193

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

magland
Copy link
Contributor

@magland magland commented Sep 18, 2024

Motivation

(I accidentally deleted my fork, and so this is a repeat of #1162 )

While hdf5 does not allow numcodecs.Codec for compression, lindi does. Right now hdmf does type checking for the compression parameter and raises an exception if the type is not in (str, bool, int). This PR simply allows the Codec type to be passed through so that it can be used with lindi.

How to test the behavior?

Here's an example that applies a custom compressor to filtered ephys data

https://github.com/NeurodataWithoutBorders/lindi/blob/lindi-tar/examples/DANDI/preprocess_ephys.py

You need to pip install lindi and pip install qfc. See https://github.com/magland/qfc

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Does the PR clearly describe the problem and the solution?
  • Have you reviewed our Contributing Guide?
  • Does the PR use "Fix #XXX" notation to tell GitHub to close the relevant issue numbered XXX when the PR is merged?

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 18.18182% with 9 lines in your changes missing coverage. Please review.

Project coverage is 37.71%. Comparing base (aed1de3) to head (e9fbb55).

Files with missing lines Patch % Lines
src/hdmf/backends/hdf5/h5_utils.py 18.18% 9 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (aed1de3) and HEAD (e9fbb55). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (aed1de3) HEAD (e9fbb55)
5 1
Additional details and impacted files
@@             Coverage Diff             @@
##              dev    #1193       +/-   ##
===========================================
- Coverage   89.02%   37.71%   -51.32%     
===========================================
  Files          45       45               
  Lines        9879     9866       -13     
  Branches     2812     2706      -106     
===========================================
- Hits         8795     3721     -5074     
- Misses        767     5818     +5051     
- Partials      317      327       +10     

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

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.

1 participant