Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 6, 2024
1 parent 2a5dc68 commit c10535e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion virtualizarr/tests/test_manifests/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_create_manifestarray_from_kerchunk_refs(self):
assert marr.chunks == (2, 3)
assert marr.dtype == np.dtype("int64")
assert marr.zarray.compressor is None
assert marr.zarray.fill_value is 0
assert marr.zarray.fill_value == 0
assert marr.zarray.filters is None
assert marr.zarray.order == "C"

Expand Down
2 changes: 1 addition & 1 deletion virtualizarr/tests/test_readers/test_kerchunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_dataset_from_df_refs():

assert da.data.zarray.compressor is None
assert da.data.zarray.filters is None
assert da.data.zarray.fill_value is 0
assert da.data.zarray.fill_value == 0
assert da.data.zarray.order == "C"

assert da.data.manifest.dict() == {
Expand Down
7 changes: 4 additions & 3 deletions virtualizarr/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __post_init__(self) -> None:
self.fill_value = "NaN"
elif self.fill_value is np.inf:
self.fill_value = "Infinity"
elif self.fill_value is -np.inf: # TODO: does this work?
elif self.fill_value is -np.inf: # TODO: does this work?
self.fill_value = "-Infinity"
# TODO: Handle other data types (complex, etc.)

Expand Down Expand Up @@ -207,9 +207,10 @@ def _v3_codec_pipeline(self) -> list:
# https://github.com/zarr-developers/zarr-python/pull/1944#issuecomment-2151994097
# "If no ArrayBytesCodec is supplied, we can auto-add a BytesCodec"
bytes = dict(
name="bytes", configuration={
name="bytes",
configuration={
"endian": "little" # TODO need to handle endianess configuration, but little is a sensible default for now
}
},
)

# The order here is significant!
Expand Down

0 comments on commit c10535e

Please sign in to comment.