Skip to content

Commit

Permalink
chore: use zarr-python 3.0.0 in compatibility tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LDeakin committed Jan 9, 2025
1 parent 58fcf95 commit 4f49fbd
Show file tree
Hide file tree
Showing 53 changed files with 313 additions and 167 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Breaking**: Make `VlenV2Codec` private
- Bump `itertools` to 0.14
- Indicate that `zfp` / `zfpy` codecs have different metadata in codec table
- Use `zarr-python` 3.0.0 in compatibility tests

### Removed
- Remove support for pcodec `Try{FloatMult,FloatQuant,IntMult}` mode specs
Expand Down
18 changes: 18 additions & 0 deletions zarrs/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,23 @@ mod tests {
}
}

#[test]
fn array_v2_none_c() {
array_v2_to_v3(
"tests/data/v2/array_none_C.zarr",
"tests/data/v3/array_none.zarr",
)
}

#[ignore] // FIXME: Reported upstream https://github.com/zarr-developers/zarr-python/issues/2675
#[test]
fn array_v2_none_f() {
array_v2_to_v3(
"tests/data/v2/array_none_F.zarr",
"tests/data/v3/array_none_tranpose.zarr",
)
}

#[cfg(feature = "blosc")]
#[test]
#[cfg_attr(miri, ignore)]
Expand All @@ -1105,6 +1122,7 @@ mod tests {
}

#[cfg(feature = "blosc")]
#[ignore] // FIXME: Reported upstream https://github.com/zarr-developers/zarr-python/issues/2675
#[test]
#[cfg_attr(miri, ignore)]
fn array_v2_blosc_f() {
Expand Down
41 changes: 21 additions & 20 deletions zarrs/tests/data/v2/array_blosc_C.zarr/.zarray
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"chunks": [
5,
5
],
"compressor": {
"blocksize": 0,
"clevel": 1,
"cname": "zstd",
"id": "blosc",
"shuffle": 2
},
"dtype": "<f4",
"fill_value": 0.0,
"filters": null,
"order": "C",
"shape": [
10,
10
],
"zarr_format": 2
"shape": [
10,
10
],
"chunks": [
5,
5
],
"fill_value": 0.0,
"order": "C",
"filters": null,
"dimension_separator": ".",
"compressor": {
"id": "blosc",
"cname": "zstd",
"clevel": 1,
"shuffle": 2,
"blocksize": 0
},
"zarr_format": 2,
"dtype": "<f4"
}
2 changes: 1 addition & 1 deletion zarrs/tests/data/v2/array_blosc_C.zarr/.zattrs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"key": "value"
"key": "value"
}
41 changes: 21 additions & 20 deletions zarrs/tests/data/v2/array_blosc_F.zarr/.zarray
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"chunks": [
5,
5
],
"compressor": {
"blocksize": 0,
"clevel": 1,
"cname": "zstd",
"id": "blosc",
"shuffle": 2
},
"dtype": "<f4",
"fill_value": 0.0,
"filters": null,
"order": "F",
"shape": [
10,
10
],
"zarr_format": 2
"shape": [
10,
10
],
"chunks": [
5,
5
],
"fill_value": 0.0,
"order": "F",
"filters": null,
"dimension_separator": ".",
"compressor": {
"id": "blosc",
"cname": "zstd",
"clevel": 1,
"shuffle": 2,
"blocksize": 0
},
"zarr_format": 2,
"dtype": "<f4"
}
2 changes: 1 addition & 1 deletion zarrs/tests/data/v2/array_blosc_F.zarr/.zattrs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"key": "value"
"key": "value"
}
Binary file modified zarrs/tests/data/v2/array_blosc_F.zarr/0.0
Binary file not shown.
Binary file modified zarrs/tests/data/v2/array_blosc_F.zarr/0.1
Binary file not shown.
Binary file modified zarrs/tests/data/v2/array_blosc_F.zarr/1.0
Binary file not shown.
Binary file modified zarrs/tests/data/v2/array_blosc_F.zarr/1.1
Binary file not shown.
35 changes: 18 additions & 17 deletions zarrs/tests/data/v2/array_bz2_C.zarr/.zarray
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"chunks": [
5,
5
],
"compressor": {
"id": "bz2",
"level": 9
},
"dtype": "<f4",
"fill_value": 0.0,
"filters": null,
"order": "C",
"shape": [
10,
10
],
"zarr_format": 2
"shape": [
10,
10
],
"chunks": [
5,
5
],
"fill_value": 0.0,
"order": "C",
"filters": null,
"dimension_separator": ".",
"compressor": {
"id": "bz2",
"level": 9
},
"zarr_format": 2,
"dtype": "<f4"
}
2 changes: 1 addition & 1 deletion zarrs/tests/data/v2/array_bz2_C.zarr/.zattrs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"key": "value"
"key": "value"
}
35 changes: 18 additions & 17 deletions zarrs/tests/data/v2/array_gzip_C.zarr/.zarray
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"chunks": [
5,
5
],
"compressor": {
"id": "gzip",
"level": 9
},
"dtype": "<f4",
"fill_value": 0.0,
"filters": null,
"order": "C",
"shape": [
10,
10
],
"zarr_format": 2
"shape": [
10,
10
],
"chunks": [
5,
5
],
"fill_value": 0.0,
"order": "C",
"filters": null,
"dimension_separator": ".",
"compressor": {
"id": "gzip",
"level": 9
},
"zarr_format": 2,
"dtype": "<f4"
}
2 changes: 1 addition & 1 deletion zarrs/tests/data/v2/array_gzip_C.zarr/.zattrs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"key": "value"
"key": "value"
}
Binary file modified zarrs/tests/data/v2/array_gzip_C.zarr/0.0
Binary file not shown.
Binary file modified zarrs/tests/data/v2/array_gzip_C.zarr/0.1
Binary file not shown.
Binary file modified zarrs/tests/data/v2/array_gzip_C.zarr/1.0
Binary file not shown.
Binary file modified zarrs/tests/data/v2/array_gzip_C.zarr/1.1
Binary file not shown.
17 changes: 17 additions & 0 deletions zarrs/tests/data/v2/array_none_C.zarr/.zarray
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"shape": [
10,
10
],
"chunks": [
5,
5
],
"fill_value": 0.0,
"order": "C",
"filters": null,
"dimension_separator": ".",
"compressor": null,
"zarr_format": 2,
"dtype": "<f4"
}
3 changes: 3 additions & 0 deletions zarrs/tests/data/v2/array_none_C.zarr/.zattrs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"key": "value"
}
Binary file added zarrs/tests/data/v2/array_none_C.zarr/0.0
Binary file not shown.
Binary file added zarrs/tests/data/v2/array_none_C.zarr/0.1
Binary file not shown.
Binary file added zarrs/tests/data/v2/array_none_C.zarr/1.0
Binary file not shown.
Binary file added zarrs/tests/data/v2/array_none_C.zarr/1.1
Binary file not shown.
17 changes: 17 additions & 0 deletions zarrs/tests/data/v2/array_none_F.zarr/.zarray
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"shape": [
10,
10
],
"chunks": [
5,
5
],
"fill_value": 0.0,
"order": "F",
"filters": null,
"dimension_separator": ".",
"compressor": null,
"zarr_format": 2,
"dtype": "<f4"
}
3 changes: 3 additions & 0 deletions zarrs/tests/data/v2/array_none_F.zarr/.zattrs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"key": "value"
}
Binary file added zarrs/tests/data/v2/array_none_F.zarr/0.0
Binary file not shown.
Binary file added zarrs/tests/data/v2/array_none_F.zarr/0.1
Binary file not shown.
Binary file added zarrs/tests/data/v2/array_none_F.zarr/1.0
Binary file not shown.
Binary file added zarrs/tests/data/v2/array_none_F.zarr/1.1
Binary file not shown.
43 changes: 23 additions & 20 deletions zarrs/tests/data/v2/array_pcodec_C.zarr/.zarray
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
{
"chunks": [
5,
5
],
"compressor": {
"delta_encoding_order": null,
"equal_pages_up_to": 262144,
"id": "pcodec",
"level": 8,
"mode_spec": "auto"
},
"dtype": "<f4",
"fill_value": 0.0,
"filters": null,
"order": "C",
"shape": [
10,
10
],
"zarr_format": 2
"shape": [
10,
10
],
"chunks": [
5,
5
],
"fill_value": 0.0,
"order": "C",
"filters": null,
"dimension_separator": ".",
"compressor": {
"id": "pcodec",
"level": 8,
"mode_spec": "auto",
"delta_spec": "auto",
"paging_spec": "equal_pages_up_to",
"delta_encoding_order": null,
"equal_pages_up_to": 262144
},
"zarr_format": 2,
"dtype": "<f4"
}
2 changes: 1 addition & 1 deletion zarrs/tests/data/v2/array_pcodec_C.zarr/.zattrs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"key": "value"
"key": "value"
}
Binary file modified zarrs/tests/data/v2/array_pcodec_C.zarr/0.0
Binary file not shown.
Binary file modified zarrs/tests/data/v2/array_pcodec_C.zarr/0.1
Binary file not shown.
Binary file modified zarrs/tests/data/v2/array_pcodec_C.zarr/1.0
Binary file not shown.
Binary file modified zarrs/tests/data/v2/array_pcodec_C.zarr/1.1
Binary file not shown.
45 changes: 23 additions & 22 deletions zarrs/tests/data/v2/array_zfpy_C.zarr/.zarray
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
{
"chunks": [
5,
5
],
"compressor": {
"compression_kwargs": {
"tolerance": 0.01
},
"id": "zfpy",
"mode": 4,
"precision": -1,
"rate": -1,
"tolerance": 0.01
"shape": [
10,
10
],
"chunks": [
5,
5
],
"fill_value": 0.0,
"order": "C",
"filters": null,
"dimension_separator": ".",
"compressor": {
"id": "zfpy",
"mode": 4,
"compression_kwargs": {
"tolerance": 0.01
},
"dtype": "<f4",
"fill_value": 0.0,
"filters": null,
"order": "C",
"shape": [
10,
10
],
"zarr_format": 2
"tolerance": 0.01,
"rate": -1,
"precision": -1
},
"zarr_format": 2,
"dtype": "<f4"
}
2 changes: 1 addition & 1 deletion zarrs/tests/data/v2/array_zfpy_C.zarr/.zattrs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"key": "value"
"key": "value"
}
Loading

0 comments on commit 4f49fbd

Please sign in to comment.