Skip to content

Commit bdb1bb8

Browse files
authored
Merge pull request #3 from scalableminds/publishing-preparation
Publishing preparation
2 parents d5f6af5 + e4bff36 commit bdb1bb8

File tree

4 files changed

+81
-13
lines changed

4 files changed

+81
-13
lines changed

.github/workflows/ci.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up JDK
2525
uses: actions/setup-java@v3
2626
with:
27-
java-version: '22'
27+
java-version: '11'
2828
distribution: 'temurin'
2929
cache: maven
3030

@@ -38,11 +38,6 @@ jobs:
3838
python -m venv venv_zarrita
3939
if [ "${{ runner.os }}" = "Windows" ]; then venv_zarrita/Scripts/pip install zarrita; else venv_zarrita/bin/pip install zarrita; fi
4040
41-
- name: Download blosc jar
42-
run: |
43-
mkdir -p ../blosc-java/target
44-
curl https://static.webknossos.org/misc/blosc-java-0.1-1.21.4-SNAPSHOT.jar -o ../blosc-java/target/blosc-java-0.1-1.21.4-SNAPSHOT.jar
45-
4641
- name: Download testdata
4742
run: |
4843
mkdir testoutput

.github/workflows/deploy.yml

+22-1
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,29 @@ jobs:
2929
# Verify gpg secret key
3030
gpg --list-secret-keys --keyid-format LONG
3131
32+
# Begin copy from ci.yml. Refactor?
33+
34+
- name: Set up Python
35+
uses: actions/setup-python@v4
36+
with:
37+
python-version: '3.11'
38+
39+
- name: Install zarrita
40+
run: |
41+
python -m venv venv_zarrita
42+
if [ "${{ runner.os }}" = "Windows" ]; then venv_zarrita/Scripts/pip install zarrita; else venv_zarrita/bin/pip install zarrita; fi
43+
44+
- name: Download testdata
45+
run: |
46+
mkdir testoutput
47+
curl https://static.webknossos.org/data/zarr_v3/l4_sample.zip -o testdata/l4_sample.zip
48+
cd testdata
49+
unzip l4_sample.zip
50+
51+
# End copy from ci.yml
52+
3253
- name: Publish package
33-
run: mvn --batch-mode deploy
54+
run: mvn --batch-mode deploy -DargLine="-Xmx6g"
3455
env:
3556
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
3657
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

pom.xml

+49-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>dev.zarr</groupId>
88
<artifactId>zarr-java</artifactId>
9-
<version>0.0.1</version>
9+
<version>0.0.2</version>
1010

1111
<name>zarr-java</name>
1212

@@ -42,8 +42,7 @@
4242
</developers>
4343

4444
<properties>
45-
<maven.compiler.source>8</maven.compiler.source>
46-
<maven.compiler.target>8</maven.compiler.target>
45+
<maven.compiler.release>8</maven.compiler.release>
4746
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4847
<jackson.version>2.14.2</jackson.version>
4948
<aws.version>1.12.477</aws.version>
@@ -147,6 +146,53 @@
147146
<useSystemClassLoader>false</useSystemClassLoader>
148147
</configuration>
149148
</plugin>
149+
<plugin>
150+
<groupId>org.apache.maven.plugins</groupId>
151+
<artifactId>maven-compiler-plugin</artifactId>
152+
<version>3.13.0</version>
153+
<configuration>
154+
<release>${maven.compiler.release}</release>
155+
<encoding>UTF-8</encoding>
156+
<excludes>
157+
<exclude>.gitignore</exclude>
158+
<exclude>temp/**</exclude>
159+
</excludes>
160+
</configuration>
161+
</plugin>
162+
<plugin>
163+
<groupId>org.apache.maven.plugins</groupId>
164+
<artifactId>maven-source-plugin</artifactId>
165+
<version>3.1.0</version>
166+
<executions>
167+
<execution>
168+
<phase>verify</phase>
169+
<goals>
170+
<goal>jar</goal>
171+
</goals>
172+
<configuration>
173+
<excludes>
174+
<exclude>temp.**</exclude>
175+
</excludes>
176+
</configuration>
177+
</execution>
178+
</executions>
179+
<configuration>
180+
<excludeResources>true</excludeResources>
181+
</configuration>
182+
</plugin>
183+
<plugin>
184+
<groupId>org.apache.maven.plugins</groupId>
185+
<artifactId>maven-resources-plugin</artifactId>
186+
<version>3.1.0</version>
187+
<configuration>
188+
<encoding>UTF-8</encoding>
189+
</configuration>
190+
</plugin>
191+
<plugin>
192+
<groupId>org.codehaus.mojo</groupId>
193+
<artifactId>build-helper-maven-plugin</artifactId>
194+
<version>1.10</version>
195+
</plugin>
150196
<plugin>
151197
<groupId>org.apache.maven.plugins</groupId>
152198
<artifactId>maven-javadoc-plugin</artifactId>

src/test/java/dev/zarr/zarrjava/ZarrTest.java

+9-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import dev.zarr.zarrjava.v3.*;
1515
import dev.zarr.zarrjava.v3.codec.CodecBuilder;
1616
import dev.zarr.zarrjava.v3.codec.core.TransposeCodec;
17-
import jdk.jshell.spi.ExecutionControl;
1817
import org.junit.jupiter.api.Assertions;
1918
import org.junit.jupiter.api.BeforeAll;
2019
import org.junit.jupiter.api.Test;
@@ -30,6 +29,7 @@
3029
import java.nio.file.Paths;
3130
import java.util.Arrays;
3231
import java.util.Comparator;
32+
import java.util.HashMap;
3333
import java.util.Map;
3434
import java.util.stream.Stream;
3535

@@ -150,13 +150,16 @@ public void testWriteReadWithZarrita(String codec, String codecParam) throws Exc
150150
int[] testData = new int[16 * 16 * 16];
151151
Arrays.setAll(testData, p -> p);
152152

153+
Map<String, Object> attributes = new HashMap<>();
154+
attributes.put("test_key", "test_value");
155+
153156
StoreHandle storeHandle = new FilesystemStore(TESTOUTPUT).resolve("write_to_zarrita", codec, codecParam);
154157
ArrayMetadataBuilder builder = Array.metadataBuilder()
155158
.withShape(16, 16, 16)
156159
.withDataType(DataType.UINT32)
157160
.withChunkShape(2, 4, 8)
158161
.withFillValue(0)
159-
.withAttributes(Map.of("test_key", "test_value"));
162+
.withAttributes(attributes);
160163

161164
switch (codec) {
162165
case "blosc":
@@ -425,8 +428,11 @@ public void testV3FillValue() throws ZarrException {
425428
public void testV3Group() throws IOException, ZarrException {
426429
FilesystemStore fsStore = new FilesystemStore(TESTOUTPUT);
427430

431+
Map<String, Object> attributes = new HashMap<>();
432+
attributes.put("hello", "world");
433+
428434
Group group = Group.create(fsStore.resolve("testgroup"));
429-
Group group2 = group.createGroup("test2", Map.of("hello", "world"));
435+
Group group2 = group.createGroup("test2", attributes);
430436
Array array = group2.createArray("array", b ->
431437
b.withShape(10, 10)
432438
.withDataType(DataType.UINT8)

0 commit comments

Comments
 (0)