spatialdata
spatialdata copied to clipboard
restore option to compress raster
closes #37
This PR adds the capability back of using either lz4 or zstd compression at various compression levels. It is exposed through a compressor argument in write and write_element that takes as value a dict with key being the compression name and the value being the compression level. By default if compression is specified bytes will be reordered for more efficient compression SHUFFLE in blosc.
perhaps still some refactoring to clean up the code a bit, but first want opinions on the exposed parameter.
Codecov Report
:x: Patch coverage is 93.50649% with 5 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 92.36%. Comparing base (3f01688) to head (93c6270).
:warning: Report is 4 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/spatialdata/_io/io_raster.py | 93.54% | 4 Missing :warning: |
| src/spatialdata/_io/_utils.py | 90.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #944 +/- ##
==========================================
- Coverage 92.36% 92.36% -0.01%
==========================================
Files 48 48
Lines 7416 7450 +34
==========================================
+ Hits 6850 6881 +31
- Misses 566 569 +3
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/spatialdata/_core/spatialdata.py | 91.65% <100.00%> (+0.01%) |
:arrow_up: |
| src/spatialdata/_io/_utils.py | 88.46% <90.00%> (+0.07%) |
:arrow_up: |
| src/spatialdata/_io/io_raster.py | 95.97% <93.54%> (-0.88%) |
:arrow_down: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.