Skip to content

Commit b34a810

Browse files
Change compressor (zarr v2) to compressors (zarr v3) (#1657)
* change compressor (zarr v2) to compressors (zarr v3) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 147f1ad commit b34a810

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

echopype/tests/echodata/test_echodata_combine.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@ def test_combined_encodings(ek60_test_data):
402402

403403
combined = echopype.combine_echodata(eds)
404404

405-
encodings_to_drop = {'chunks', 'preferred_chunks', 'compressor', 'filters'}
405+
# TODO: lazy_encodings is empty in this current test, so test not actually functioning?
406+
encodings_to_drop = {'chunks', 'preferred_chunks', 'compressors', 'filters'}
406407

407408
group_checks = []
408409
for _, value in combined.group_map.items():

echopype/utils/coding.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@
1717
COMPRESSION_SETTINGS = {
1818
"netcdf4": {"zlib": True, "complevel": 4},
1919
"zarr": {
20-
"float": {"compressor": BloscCodec(cname="zstd", clevel=3, shuffle="bitshuffle")},
21-
"int": {"compressor": BloscCodec(cname="lz4", clevel=5, shuffle="shuffle", blocksize=0)},
22-
"string": {"compressor": BloscCodec(cname="lz4", clevel=5, shuffle="shuffle", blocksize=0)},
23-
"time": {"compressor": BloscCodec(cname="lz4", clevel=5, shuffle="shuffle", blocksize=0)},
20+
"float": {"compressors": [BloscCodec(cname="zstd", clevel=3, shuffle="bitshuffle")]},
21+
"int": {"compressors": [BloscCodec(cname="lz4", clevel=5, shuffle="shuffle", blocksize=0)]},
22+
"string": {
23+
"compressors": [BloscCodec(cname="lz4", clevel=5, shuffle="shuffle", blocksize=0)]
24+
},
25+
"time": {
26+
"compressors": [BloscCodec(cname="lz4", clevel=5, shuffle="shuffle", blocksize=0)]
27+
},
2428
},
2529
}
2630

0 commit comments

Comments
 (0)