Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9493eb8
add cli wrapper
brokkoli71 Jan 5, 2026
2ec5bda
Add pull request trigger to conformance workflow
brokkoli71 Jan 5, 2026
5e491af
fix pom dependencies
brokkoli71 Jan 5, 2026
3598312
Merge remote-tracking branch 'origin/cli-wrapper' into cli-wrapper
brokkoli71 Jan 5, 2026
909da8b
print array
brokkoli71 Jan 5, 2026
b8d09c5
Merge branch 'main' into cli-wrapper
brokkoli71 Feb 7, 2026
41ca7b6
use fork for debugging
brokkoli71 Feb 7, 2026
a786b94
add zstd to v2
brokkoli71 Feb 7, 2026
41b0929
update zarr-cli version to 0.0.10 in conformance tests
brokkoli71 Feb 7, 2026
f27dae8
update zarr-cli path in conformance tests
brokkoli71 Feb 7, 2026
6ba852e
set dynamic JAR path for conformance tests
brokkoli71 Feb 7, 2026
39bc251
Improve JAR path handling in conformance workflow
brokkoli71 Feb 7, 2026
592731e
set conformance tests back to Bisaloo/zarr-conformance-tests@main
brokkoli71 Feb 7, 2026
ab8244d
Revert "set conformance tests back to Bisaloo/zarr-conformance-tests@…
brokkoli71 Feb 7, 2026
8cd359b
Merge branch 'main' into cli-wrapper
brokkoli71 Feb 9, 2026
0dbb851
remove debug statements
brokkoli71 Feb 9, 2026
2e5c6fc
Update conformance test action to not use fork
brokkoli71 Feb 18, 2026
f7c4dc4
Merge branch 'main' into cli-wrapper
brokkoli71 Mar 3, 2026
bf634ec
Merge branch 'main' into cli-wrapper
brokkoli71 Mar 5, 2026
505b765
Merge branch 'main' into cli-wrapper
brokkoli71 Mar 19, 2026
ff48199
fix version v0.0.2 of Bisaloo/zarr-conformance-tests
brokkoli71 Mar 19, 2026
d655516
Merge branch 'main' into cli-wrapper
brokkoli71 Mar 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Zarr Conformance Tests

on:
workflow_dispatch:
schedule:
- cron: '17 3 * * 0'
pull_request:
branches: [ "main" ]

jobs:
conformance-tests:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v5

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven

- name: Build
run: mvn package -DskipTests

- name: Prepare JAR for testing
run: |
# Find the JAR
JAR_PATH=$(ls target/zarr-java-*.jar | grep -v original | grep -v javadoc | grep -v sources | head -1)
FULL_JAR_PATH="${GITHUB_WORKSPACE}/${JAR_PATH}"
echo "JAR_PATH=${FULL_JAR_PATH}" >> $GITHUB_ENV
echo "Found JAR at: ${FULL_JAR_PATH}"

- name: Run Conformance Tests
uses: Bisaloo/zarr-conformance-tests@v0.0.2
with:
zarr-cli: "java -jar ${{ env.JAR_PATH }}"
26 changes: 26 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@
<artifactId>commons-compress</artifactId>
<version>1.28.0</version>
</dependency>

<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
<version>4.7.6</version>
</dependency>
</dependencies>

<repositories>
Expand Down Expand Up @@ -246,6 +252,26 @@
<tokenAuth>true</tokenAuth>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>dev.zarr.zarrjava.cli.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
44 changes: 44 additions & 0 deletions src/main/java/dev/zarr/zarrjava/cli/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package dev.zarr.zarrjava.cli;

import dev.zarr.zarrjava.core.Array;
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.concurrent.Callable;

@Command(name = "zarr-java-cli", mixinStandardHelpOptions = true, version = "1.0", description = "CLI wrapper for zarr-java conformance tests.")
public class Main implements Callable<Integer> {

@Option(names = { "--array_path" }, description = "Path to the Zarr array", required = true)
private String arrayPath;

@Override
public Integer call() throws Exception {
try {
Path path = Paths.get(arrayPath);
// Attempt to open the array. This should throw if the array is invalid or
// cannot be opened.
Array array = Array.open(path);

// Read the entire array
ucar.ma2.Array data = array.read();

// Print the array values using ucar.ma2.Array's string representation.
System.out.println(data.toString());

return 0;
} catch (Exception e) {
System.err.println("Failed to open array at " + arrayPath);
e.printStackTrace();
return 1;
}
}

public static void main(String[] args) {
int exitCode = new CommandLine(new Main()).execute(args);
System.exit(exitCode);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import dev.zarr.zarrjava.v3.codec.Codec;

import javax.annotation.Nonnull;
import java.nio.ByteBuffer;

public class ZstdCodec extends dev.zarr.zarrjava.core.codec.core.ZstdCodec implements Codec {

Expand Down
Loading