Skip to content

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.

@codecov
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).
Report is 24 commits behind head on main.

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