zarr-developers / numcodecs

A Python package providing buffer compression and transformation codecs for use in data storage and communication applications.
http://numcodecs.readthedocs.io
MIT License
128 stars 88 forks source link

Cleanup `PCodec` soft dependency handling #647

Open jakirkham opened 1 week ago

jakirkham commented 1 week ago

As with other soft dependencies in Numcodecs, the pattern is to attempt to import them and if their dependencies cannot be resolved skip them. Have applied this pattern to PCodec to be consistent with the other optional codec dependencies.

TODO:

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.85%. Comparing base (86f5ce4) to head (4cc252e).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #647 +/- ## ========================================== - Coverage 99.92% 99.85% -0.08% ========================================== Files 62 62 Lines 2721 2720 -1 ========================================== - Hits 2719 2716 -3 - Misses 2 4 +2 ``` | [Files with missing lines](https://app.codecov.io/gh/zarr-developers/numcodecs/pull/647?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zarr-developers) | Coverage Δ | | |---|---|---| | [numcodecs/\_\_init\_\_.py](https://app.codecov.io/gh/zarr-developers/numcodecs/pull/647?src=pr&el=tree&filepath=numcodecs%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zarr-developers#diff-bnVtY29kZWNzL19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [numcodecs/pcodec.py](https://app.codecov.io/gh/zarr-developers/numcodecs/pull/647?src=pr&el=tree&filepath=numcodecs%2Fpcodec.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zarr-developers#diff-bnVtY29kZWNzL3Bjb2RlYy5weQ==) | `100.00% <100.00%> (ø)` | | | [numcodecs/tests/test\_pcodec.py](https://app.codecov.io/gh/zarr-developers/numcodecs/pull/647?src=pr&el=tree&filepath=numcodecs%2Ftests%2Ftest_pcodec.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zarr-developers#diff-bnVtY29kZWNzL3Rlc3RzL3Rlc3RfcGNvZGVjLnB5) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/zarr-developers/numcodecs/pull/647/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zarr-developers)

🚨 Try these New Features:

jakirkham commented 1 week ago

@dstansby could you please review this one?