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

Bump test version of numcodecs #2114

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements_dev_minimal.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# library requirements
asciitree==0.3.3
fasteners==0.19
numcodecs==0.12.1
numcodecs==0.13.0
msgpack-python==0.5.6
setuptools-scm==8.1.0
# test requirements
Expand Down
34 changes: 13 additions & 21 deletions zarr/tests/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,36 +282,28 @@ def test_encode_decode_array_dtype_shape_v3(cname):
fill_value=None,
chunk_memory_layout="C",
)

meta_json = (
"""{
meta_expected = {
"attributes": {},
"chunk_grid": {
"chunk_shape": [10],
"separator": "/",
"type": "regular"
},
"chunk_grid": {"chunk_shape": [10], "separator": "/", "type": "regular"},
"chunk_memory_layout": "C",
"compressor": {
"""
+ f"""
"codec": "https://purl.org/zarr/spec/codec/{cname}/1.0",
"""
+ """
"configuration": {
"level": 1
}
"codec": f"https://purl.org/zarr/spec/codec/{cname}/1.0",
"configuration": {"level": 1},
},
"data_type": "<f8",
"extensions": [],
"fill_value": null,
"shape": [100, 10, 10 ]
}"""
)
"fill_value": None,
"shape": [100, 10, 10],
}

if cname == "zstd":
meta_expected["compressor"]["configuration"]["checksum"] = False

meta_expected_json = json.dumps(meta_expected)

# test encoding
meta_enc = Metadata3.encode_array_metadata(meta)
assert_json_equal(meta_json, meta_enc)
assert_json_equal(meta_enc, meta_expected_json)

# test decoding
meta_dec = Metadata3.decode_array_metadata(meta_enc)
Expand Down
Loading