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

Error at runtime if zfpy isn't present #666

Closed
wants to merge 1 commit into from

Conversation

dstansby
Copy link
Contributor

@dstansby dstansby commented Dec 3, 2024

This is a draft proof of concept for #655, to show what defining the codec classes, but erroring at runtime (with a helpful error message) would look like. Currently just implemented for ZFPY.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 95.91837% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.67%. Comparing base (9bdbaf0) to head (57cddff).

Files with missing lines Patch % Lines
numcodecs/zfpy.py 95.74% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (9bdbaf0) and HEAD (57cddff). Click for more details.

HEAD has 9 uploads less than BASE
Flag BASE (9bdbaf0) HEAD (57cddff)
12 3
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #666       +/-   ##
===========================================
- Coverage   99.92%   89.67%   -10.25%     
===========================================
  Files          62       62               
  Lines        2732     2732               
===========================================
- Hits         2730     2450      -280     
- Misses          2      282      +280     
Files with missing lines Coverage Δ
numcodecs/__init__.py 100.00% <100.00%> (ø)
numcodecs/zfpy.py 95.91% <95.74%> (-4.09%) ⬇️

... and 2 files with indirect coverage changes

@dstansby dstansby changed the title Only suppress imports of optional external dependencies Error at runtime if zfpy isn't present Dec 3, 2024
@dstansby dstansby closed this Dec 3, 2024
@dstansby
Copy link
Contributor Author

dstansby commented Dec 3, 2024

This diddn't work - see #655 (comment) for context.

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