From 2dbf416294d64ae6999b8a26fac268d500aa3528 Mon Sep 17 00:00:00 2001 From: Trevor Manz Date: Thu, 15 Apr 2021 13:14:47 -0400 Subject: [PATCH] Extract method to create simple fixure --- fixtures/generate_fixtures.py | 67 ++++++++++++------------------- fixtures/simple_gzip_BE.zarr/0.0 | Bin 31 -> 31 bytes fixtures/simple_gzip_BE.zarr/3.0 | Bin 25 -> 25 bytes fixtures/simple_gzip_LE.zarr/0.0 | Bin 28 -> 28 bytes fixtures/simple_gzip_LE.zarr/3.0 | Bin 27 -> 27 bytes 5 files changed, 26 insertions(+), 41 deletions(-) diff --git a/fixtures/generate_fixtures.py b/fixtures/generate_fixtures.py index 8c3dbac..2111bbb 100644 --- a/fixtures/generate_fixtures.py +++ b/fixtures/generate_fixtures.py @@ -1,59 +1,56 @@ import os -import zarr # 2.7 +import zarr +from zarr.creation import create # 2.7 from zarr.util import json_dumps, json_loads FIXTURES_FOLDER = "./" -def generate_fixtures(): - - empty_path = os.path.join(FIXTURES_FOLDER, "empty.zarr") - zarr.open( - empty_path, +def create_simple_array(store, dtype, compression=None, write_chunks=False): + arr = zarr.open( + store=store, shape=(8, 8), chunks=(2, None), - dtype="k diff --git a/fixtures/simple_gzip_LE.zarr/0.0 b/fixtures/simple_gzip_LE.zarr/0.0 index 7c119bf334a44d519a4a09d4b0f3be90f1b503f7..144a79222ac4269282ab0cc6e8639402498a6cef 100644 GIT binary patch literal 28 jcmb2|=3wwBsYqb?pPZ7Akie8w#K`a`G;fOo0|Ns9g82x$ literal 28 jcmb2|=3uBOtVm$_pPZ7Akie8w#K`a`G;fOo0|Ns9hcpQ2 diff --git a/fixtures/simple_gzip_LE.zarr/3.0 b/fixtures/simple_gzip_LE.zarr/3.0 index c68de2155184a557b3b71ce34e66887d0c14cf1f..5b35d97b0bbbb8edbae843ba983449c221f36f12 100644 GIT binary patch literal 27 icmb2|=3wwBsYqb?pPZl|Z@|2jiQ&c>i*yGD1_l6eg9o_) literal 27 icmb2|=3uBOtVm$_pPZl|Z@|2jiQ&c>i*yGD1_l6ikq71g