Skip to content

Commit 7a40734

Browse files
committed
reformat readme
1 parent b3f719a commit 7a40734

1 file changed

Lines changed: 25 additions & 16 deletions

File tree

README.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
This repository contains a Java implementation of Zarr version 2 and 3.
44

55
## Usage
6+
67
```java
78
import dev.zarr.zarrjava.store.FilesystemStore;
89
import dev.zarr.zarrjava.store.HttpStore;
@@ -11,36 +12,42 @@ import dev.zarr.zarrjava.v3.DataType;
1112
import dev.zarr.zarrjava.v3.Group;
1213

1314
Group hierarchy = Group.open(
14-
new HttpStore("https://static.webknossos.org/data/zarr_v3")
15-
.resolve("l4_sample")
15+
new HttpStore("https://static.webknossos.org/data/zarr_v3")
16+
.resolve("l4_sample")
1617
);
1718
Group color = (Group) hierarchy.get("color");
1819
Array array = (Array) color.get("1");
1920
ucar.ma2.Array outArray = array.read(
20-
new long[]{0, 3073, 3073, 513}, // offset
21-
new int[]{1, 64, 64, 64} // shape
21+
new long[]{0, 3073, 3073, 513}, // offset
22+
new int[]{1, 64, 64, 64} // shape
2223
);
2324

2425
Array array = Array.create(
25-
new FilesystemStore("/path/to/zarr").resolve("array"),
26-
Array.metadataBuilder()
27-
.withShape(1, 4096, 4096, 1536)
28-
.withDataType(DataType.UINT32)
29-
.withChunkShape(1, 1024, 1024, 1024)
30-
.withFillValue(0)
31-
.withCodecs(c -> c.withSharding(new int[]{1, 32, 32, 32}, c1 -> c1.withBlosc()))
32-
.build()
26+
new FilesystemStore("/path/to/zarr").resolve("array"),
27+
Array.metadataBuilder()
28+
.withShape(1, 4096, 4096, 1536)
29+
.withDataType(DataType.UINT32)
30+
.withChunkShape(1, 1024, 1024, 1024)
31+
.withFillValue(0)
32+
.withCodecs(c -> c.withSharding(new int[]{1, 32, 32, 32}, c1 -> c1.withBlosc()))
33+
.build()
3334
);
3435
ucar.ma2.Array data = ucar.ma2.Array.factory(ucar.ma2.DataType.UINT, new int[]{1, 1024, 1024, 1024});
35-
array.write(
36-
new long[]{0, 0, 0, 0}, // offset
37-
data
36+
array.
37+
38+
write(
39+
new long[] {
40+
0, 0, 0, 0
41+
}, // offset
42+
data
3843
);
3944
```
45+
4046
## Development Start-Guide
4147

4248
### Run Tests Locally
43-
To be able to run the tests locally, make sure to have `python3.11` and `uv` installed.
49+
50+
To be able to run the tests locally, make sure to have `python3.11` and `uv` installed.
4451

4552
Furthermore, you will need the `l4_sample` test data:
4653

@@ -50,7 +57,9 @@ Furthermore, you will need the `l4_sample` test data:
5057
`
5158

5259
### Code Style & Formatting
60+
5361
This project uses IntelliJ IDEA default Java formatting
5462

5563
Before submitting changes, please run:
64+
5665
- IntelliJ: `Reformat Code` and `Optimize Imports`

0 commit comments

Comments
 (0)