Skip to content

Commit c36301a

Browse files
normanrzNorman Rzepka
andauthored
Add zarrita support (#912)
* adds zarrita * fixes for zarrita * fixes * cassettes * fix * fix * fix * fix dask example * fixes * fixes for tests * format * fixes * refresh * tests * tests * types * durations * new zarr3 data * no faulthandler in ci * fixes * changelog * bump zarrita * pr feedback * fix tests * update .test_durations --------- Co-authored-by: Norman Rzepka <[email protected]>
1 parent 65a5ea7 commit c36301a

File tree

53 files changed

+14995
-6066
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+14995
-6066
lines changed

.github/workflows/ci.yml

Lines changed: 248 additions & 246 deletions
Large diffs are not rendered by default.

webknossos/.test_durations

Lines changed: 464 additions & 341 deletions
Large diffs are not rendered by default.

webknossos/Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ For upgrade instructions, please check the respective _Breaking Changes_ section
1616

1717
### Added
1818
- Added `duration_in_seconds` and `modified` to `AnnotationInfo`. [#914](https://github.com/scalableminds/webknossos-libs/pull/914)
19+
- Added [`zarrita`](https://github.com/scalableminds/zarrita) storage backend for arrays. zarrita supports Zarr v2 and v3 including sharding. To activate zarrita, the environment variable `WK_USE_ZARRITA` must be set. [#912](https://github.com/scalableminds/webknossos-libs/pull/912)
20+
- Added a `Zarr3` data format which supports sharding. [#912](https://github.com/scalableminds/webknossos-libs/pull/912)
1921

2022
### Changed
2123
- Integrated the `wkcuber` CLI tool into `webknossos` package. [#903](https://github.com/scalableminds/webknossos-libs/pull/903)

webknossos/poetry.lock

Lines changed: 128 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webknossos/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,15 @@ JPype1 = { version = "^1.3.0", optional = true }
6363
pims = { version = "^0.6.0", optional = true }
6464
tifffile = { version = ">=2021.11.2", optional = true }
6565
pylibCZIrw = { version = "3.4.0", source = "scm", optional = true }
66+
zarrita = "0.1.0a12"
6667

6768
[tool.poetry.extras]
6869
pims = ["pims"]
6970
tifffile = ["pims", "tifffile"]
7071
imagecodecs = ["pims", "imagecodecs"]
7172
bioformats = ["pims","JPype1"]
7273
czi = ["pims","pylibCZIrw"]
73-
all = ["pims","tifffile","imagecodecs","JPype1","pylibCZIrw",]
74+
all = ["pims","tifffile","imagecodecs","JPype1","pylibCZIrw","zarrita"]
7475

7576
[tool.poetry.dev-dependencies]
7677
# autoflake

webknossos/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export_vars
1111
# (which is standard python behavior). This is necessary so that the imports
1212
# refer to the checked out (and potentially modified) code.
1313
PYTEST="poetry run python -m pytest --suppress-no-test-exit-code"
14+
export WK_USE_ZARRITA=True
1415

1516

1617
if [ $# -gt 0 ] && [ "$1" = "--refresh-snapshots" ]; then
96.1 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"shape": [3, 24, 24, 24], "data_type": "uint8", "chunk_grid": {"configuration": {"chunk_shape": [3, 32, 32, 32]}, "name": "regular"}, "chunk_key_encoding": {"configuration": {"separator": "/"}, "name": "default"}, "fill_value": 0, "attributes": {}, "codecs": [{"configuration": {"chunk_shape": [3, 16, 16, 16], "codecs": []}, "name": "sharding_indexed"}], "dimension_names": null, "zarr_format": 3, "node_type": "array"}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"node_type": "group",
3+
"zarr_format": 3,
4+
"attributes": {
5+
"ome": {
6+
"multiscales": [
7+
{
8+
"version": "0.4",
9+
"axes": [
10+
{
11+
"name": "c",
12+
"type": "channel"
13+
},
14+
{
15+
"name": "x",
16+
"type": "space",
17+
"unit": "nanometer"
18+
},
19+
{
20+
"name": "y",
21+
"type": "space",
22+
"unit": "nanometer"
23+
},
24+
{
25+
"name": "z",
26+
"type": "space",
27+
"unit": "nanometer"
28+
}
29+
],
30+
"datasets": [
31+
{
32+
"path": "1",
33+
"coordinateTransformations": [
34+
{
35+
"type": "scale",
36+
"scale": [1.0, 1.0, 1.0, 1.0]
37+
}
38+
]
39+
}
40+
]
41+
}
42+
]
43+
}
44+
}
45+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"id": {
3+
"name": "simple_zarr_dataset",
4+
"team": ""
5+
},
6+
"scale": [1.0, 1.0, 1.0],
7+
"dataLayers": [
8+
{
9+
"name": "color",
10+
"category": "color",
11+
"boundingBox": {
12+
"topLeft": [0, 0, 0],
13+
"width": 24,
14+
"height": 24,
15+
"depth": 24
16+
},
17+
"elementClass": "uint24",
18+
"dataFormat": "zarr3",
19+
"mags": [
20+
{
21+
"mag": [1, 1, 1]
22+
}
23+
],
24+
"numChannels": 3,
25+
"defaultViewConfiguration": {
26+
"color": [255, 0, 0]
27+
}
28+
}
29+
],
30+
"defaultViewConfiguration": {
31+
"position": [12, 12, 12]
32+
}
33+
}

0 commit comments

Comments
 (0)