Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ZarrReader tests #16

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 31 additions & 0 deletions scripts/zarr_reader_open
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

set -e
set -u
set -x

export INVOCATION_DIR=${INVOCATION_DIR:-$PWD}

echo =======================
echo Current Directory: $PWD
echo Invocation Directory: ${INVOCATION_DIR}
echo =======================

# Install bftools if missing
test -e ${INVOCATION_DIR}/bftools || {
pushd ${INVOCATION_DIR}
test -e bftools.zip || wget https://downloads.openmicroscopy.org/bio-formats/latest/artifacts/bftools.zip
unzip bftools
popd
}

# Build ZarrReader if not built
test -e ${INVOCATION_DIR}/ZarrReader || {
git clone git://github.com/ome/ZarrReader ${INVOCATION_DIR}/ZarrReader
pushd ${INVOCATION_DIR}ZarrReader
mvn package -DskipTests # 1>&2
popd
}

export BF_CP=${INVOCATION_DIR}/ZarrReader/target/\*
${INVOCATION_DIR}/bftools/showinf -format Zarr -nopix "$@"/.zattrs
3 changes: 3 additions & 0 deletions suites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@

- name: checksum
script: zarr_checksum

- name: reader
script: zarr_reader_open
4 changes: 3 additions & 1 deletion test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ def source(request: SubRequest, tmpdir: py.path.local) -> typing.Iterator[Source
def suite(request: SubRequest, tmpdir: os.PathLike) -> typing.Iterator[Suite]:
doc = request.param
script = doc["script"]
script = f"{request.config.invocation_dir}/scripts/{script}"
idir = f"{request.config.invocation_dir}"
os.environ["INVOCATION_DIR"] = idir
script = f"{idir}/scripts/{script}"
yield Suite(script)


Expand Down