Skip to content

Commit 8a43c9e

Browse files
authored
Refactor wkcuber for Zarr (#679)
1 parent 0342a40 commit 8a43c9e

File tree

101 files changed

+2786
-2096
lines changed

Some content is hidden

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

101 files changed

+2786
-2096
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ jobs:
299299
--jobs 2 \
300300
--batch_size 8 \
301301
--layer_name color \
302-
--wkw_file_len 32 \
302+
--chunks_per_shard 32 \
303303
--scale 1 \
304304
testdata/tiff testoutput/tiff
305305

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,6 @@ webknossos/testoutput/*
124124
*/*/output.nml
125125
*/cell_*/*
126126
cell_*/*
127+
128+
# minio
129+
minio_data

_tooling/local_minio_setup.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export MINIO_ROOT_USER="TtnuieannGt2rGuie2t8Tt7urarg5nauedRndrur"
2+
export MINIO_ROOT_PASSWORD="ANTN35UAENTS5UIAEATD"
3+
4+
# Minio is an S3 clone and is used as local test server
5+
docker run \
6+
-p 8000:9000 \
7+
-e MINIO_ROOT_USER=$MINIO_ROOT_USER \
8+
-e MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD \
9+
--name minio \
10+
--rm \
11+
-d \
12+
minio/minio server /data
13+
14+
stop_minio () {
15+
ARG=$?
16+
docker stop minio
17+
exit $ARG
18+
}
19+
trap stop_minio EXIT

webknossos/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,5 @@ ENV/
105105

106106
/webknossos/version.py
107107
testoutput
108+
# Unpacked version of WT1_wkw.tar.gz
109+
testdata/WT1_wkw

webknossos/poetry.lock

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

webknossos/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ zarr = "^2.11.0"
3131
numcodecs = "^0.9.1"
3232
zipp = "^3.5.0"
3333
fsspec = "^2022.2.0"
34-
universal-pathlib = "^0.0.14"
34+
universal-pathlib = "0.0.16"
3535

3636

3737
[tool.poetry.dev-dependencies]

webknossos/script_collection/move_dataset_slices_by_one.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pathlib import Path
33
from typing import Tuple
44

5-
from wkcuber.utils import ( # pylint: disable=import-error
5+
from wkcuber._internal.utils import ( # pylint: disable=import-error
66
add_distribution_flags,
77
add_scale_flag,
88
get_executor_for_args,

webknossos/test.sh

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,10 @@
22
set -eEuo pipefail
33

44
source local_wk_setup.sh
5+
source ../_tooling/local_minio_setup.sh
56

67
export_vars
78

8-
export MINIO_ROOT_USER="TtnuieannGt2rGuie2t8Tt7urarg5nauedRndrur"
9-
export MINIO_ROOT_PASSWORD="ANTN35UAENTS5UIAEATD"
10-
11-
# Minio is an S3 clone and is used as local test server
12-
docker run \
13-
-p 8000:9000 \
14-
-e MINIO_ROOT_USER=$MINIO_ROOT_USER \
15-
-e MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD \
16-
--name minio \
17-
--rm \
18-
-d \
19-
minio/minio server /data
20-
21-
stop_minio () {
22-
ARG=$?
23-
docker stop minio
24-
exit $ARG
25-
}
26-
trap stop_minio EXIT
279

2810
if [ $# -eq 1 ] && [ "$1" = "--refresh-snapshots" ]; then
2911
ensure_local_test_wk
Binary file not shown.
Lines changed: 30 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,34 @@
11
{
2-
"id": {
3-
"name": "simple_wk_dataset",
4-
"team": ""
5-
},
6-
"scale": [
7-
1, 1, 1
8-
],
9-
"defaultViewConfiguration": {
10-
"position": [
11-
12,
12-
12,
13-
12
14-
]
15-
},
16-
"dataLayers": [
2+
"id": {
3+
"name": "simple_wkw_dataset",
4+
"team": ""
5+
},
6+
"scale": [1, 1, 1],
7+
"defaultViewConfiguration": {
8+
"position": [12, 12, 12]
9+
},
10+
"dataLayers": [
11+
{
12+
"dataFormat": "wkw",
13+
"name": "color",
14+
"category": "color",
15+
"elementClass": "uint24",
16+
"numChannels": 3,
17+
"boundingBox": {
18+
"topLeft": [0, 0, 0],
19+
"width": 24,
20+
"height": 24,
21+
"depth": 24
22+
},
23+
"wkwResolutions": [
1724
{
18-
"dataFormat": "wkw",
19-
"name": "color",
20-
"category": "color",
21-
"elementClass": "uint24",
22-
"numChannels": 3,
23-
"boundingBox": {
24-
"topLeft": [
25-
0,
26-
0,
27-
0
28-
],
29-
"width": 24,
30-
"height": 24,
31-
"depth": 24
32-
},
33-
"wkwResolutions": [
34-
{
35-
"resolution": [
36-
1,
37-
1,
38-
1
39-
],
40-
"cubeLength": 32
41-
}
42-
],
43-
"defaultViewConfiguration": {
44-
"color": [
45-
255,
46-
0,
47-
0
48-
]
49-
}
25+
"resolution": [1, 1, 1],
26+
"cubeLength": 32
5027
}
51-
]
28+
],
29+
"defaultViewConfiguration": {
30+
"color": [255, 0, 0]
31+
}
32+
}
33+
]
5234
}

0 commit comments

Comments
 (0)