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(fileformats): fix compression check #289

Merged
merged 3 commits into from
Jan 30, 2025
Merged

Conversation

ssiegelx
Copy link
Contributor

Do not check against H5Filter if H5Filter is None.

Do not check against H5Filter if H5Filter is None.
@ssiegelx ssiegelx assigned ssiegelx and unassigned ssiegelx Jan 30, 2025
@ssiegelx ssiegelx requested review from ljgray and ketiltrout January 30, 2025 04:59
@ssiegelx
Copy link
Contributor Author

If the bitshuffle filters are not installed, H5FILTER is set to None.
However, when HDF5.compression_kwargs() is called with compression=None, it incorrectly matches against H5FILTER, leading to an attempt to use bitshuffle compression even though it is not installed.

This issue was encountered when installing caput without compression support and attempting to load existing HDF5 files. The fix ensures that compression is only applied when explicitly available.

Copy link
Member

@ketiltrout ketiltrout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your fix looks fine as-is, but here's a proposal for perhaps a tidier way to do it.

@ssiegelx ssiegelx merged commit 23c93da into master Jan 30, 2025
7 checks passed
@ssiegelx ssiegelx deleted the ss/compression_default branch January 30, 2025 19:27
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