Skip to content

Commit 95a90f3

Browse files
committed
Started #77
1 parent 78fd1c6 commit 95a90f3

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

docs/config.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,16 @@ Variable metadata.
8585

8686
* Type _array_.
8787
Chunk sizes in the order of the dimensions.
88-
The items of the array are of type _integer_.
88+
The items of the array must be one of the following:
89+
90+
* Type _integer_.
91+
Dimension is chunked using given size.
92+
93+
* No chunking in this dimension.
94+
Its value is `null`.
95+
8996

90-
* Disable chunking.
97+
* Disable chunking in all dimensions.
9198
Its value is `null`.
9299

93100

@@ -243,7 +250,7 @@ Options for the filesystem given by the protocol of `temp_dir`.
243250
## `force_new`
244251

245252
Type _boolean_.
246-
Force creation of a new target dataset. An existing target dataset (and its lock) will be permanently deleted before appending of slice datasets begins. WARNING: the deletion cannot be rolled back.
253+
Force creation of a new target dataset. An existing target dataset (and its lock) will be permanently deleted before appending of slice datasets begins. WARNING: the deletion cannot be rolled back.
247254
Defaults to `false`.
248255

249256
## `disable_rollback`

tests/test_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ def process_slice(ctx, slice_ds: xr.Dataset) -> SliceSource:
177177
ds.attrs,
178178
)
179179

180+
def test_some_slices_with_cropping_slice_source(self):
181+
# TODO: implement me after #78
182+
pass
183+
180184
def test_some_slices_with_inc_append_step(self):
181185
target_dir = "memory://target.zarr"
182186
slices = [make_test_dataset(index=i, shape=(1, 50, 100)) for i in range(3)]

zappend/config/schema.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,23 @@
7373
"description": "Storage chunking.",
7474
"oneOf": [
7575
{
76-
"description": "Chunk sizes in the order of the dimensions.",
76+
"description": "Chunk sizes for each dimension of the variable.",
7777
"type": "array",
78-
"items": {"type": "integer", "minimum": 1},
78+
"items": {
79+
"oneOf": [
80+
{
81+
"description": "Dimension is chunked using given size.",
82+
"type": "integer",
83+
"minimum": 1,
84+
},
85+
{
86+
"description": "Disable chunking in this dimension.",
87+
"const": None,
88+
},
89+
]
90+
},
7991
},
80-
{"description": "Disable chunking.", "const": None},
92+
{"description": "Disable chunking in all dimensions.", "const": None},
8193
],
8294
},
8395
fill_value={

0 commit comments

Comments
 (0)