Skip to main content

ome-zarr-transformations-conformance

Test fixtures for RFC-5 transformations for OME-Zarr.

Structure

Each directory in ./cases/ represents a test case. It is an OME-Zarr Scene; it contains a zarr.json whose attributes contains an ome object which itself contains a scene object as described by the OME-Zarr v0.6+ specification. This scene contains a transform graph.

The dingus

Implementations of OME-Zarr transformations should provide a "dingus" CLI whose last 4 positional arguments MUST be:

  • PATH: a path to an OME-Zarr hierarchy on the file system
  • SOURCE: the name of the source coordinate system
  • TARGET: the name of the target coordinate system
  • COORDINATES: a JSON-serialised array of D-length arrays of numbers, where D is the dimensionality of a single coordinates

The dingus MUST then

  1. open the OME-Zarr hierarchy at PATH and parse the $.ome.scene from the attributes
  2. calculate a transformation from the coordinate system with name specified by SOURCE to the coordinate system with name specified by TARGET (this may require inverting one or more transforms)
  3. apply this transformation to the COORDINATES array
  4. print to STDOUT a JSON-serialised Response object
  5. exit with status code 0

If any of the above steps are not supported by the implementation, the dingus MUST exit with a status code other than 0. It MAY print to STDOUT a JSON-serialised Error object.

Object: Response

field necessity type description
coordinates MUST array of array of number The resulting coordinates from transforming the input.
message MAY string Free-text details.

Object: Error

field necessity type description
message MAY string Free-text description of error.

Test procedure

Each OME-Zarr hierarchy additionally includes a conformance.toml, which describes the test case. The implementation's dingus CLI does not need to parse this.

The transform_conformance.py script:

  • iterates through all test cases
  • parses the conformance.toml
  • calls the provided dingus CLI, supplying the test case path, the source and target coordinate system names, and the source coordinates
  • reads the output of the dingus CLI
    • if the return code is 0
      • if should_error = false, parse the response and check the output coordinates against those defined in target.coordinates, using the defined tolerances
      • if should_error = true, fail the test
    • if the return code is non-zero
      • if should_error = true, pass the test
      • if should_error = false, fail the test
  • builds a table of test successes and failures, potentially including any messages returned by the dingus CLI

It is called like:

./transformation_conformance.py ./cases -- myDingus --some-arg anotherArg

This in turn calls the dingus repeatedly, seeing arguments like

myDingus --some-arg anotherArg './cases/translation.ome.zarr' 'input' 'output' '[[1, 2]]'

Configs

For convenience, simple test cases can be configured by a single TOML file representing the OME-Zarr scene and Conformance objects; see ./cases_config/ directory and the ./write_cases.py script.

Where invert = true, also create a test which switches the source and target objects.

More complicated test cases cannot be configured this way.

Release files for ome-zarr-transformations-conformance 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ome-zarr-transformations-conformance 0.1.2
File Size Uploaded
ome_zarr_transformations_conformance-0.1.2.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ome-zarr-transformations-conformance 0.1.2
File Interpreter ABI Platform
ome_zarr_transformations_conformance-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 33.8 kB

Release files / ome_zarr_transformations_conformance-0.1.2.tar.gz

Download URL ome_zarr_transformations_conformance-0.1.2.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
690e18147efe224d6d571d67957957c8c08c94e7df51a7b72218c38ea949d897
BLAKE2b-256 checksum
How to use checksums
76b2ad1102916ddd6851cdcba23c4aa5ca0459b02e300afc59435dd79dfd6536
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ome_zarr_transformations_conformance-0.1.2-py3-none-any.whl

Download URL ome_zarr_transformations_conformance-0.1.2-py3-none-any.whl
Size 25.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbb406fa075717e54e82b372d48001f1c869fa5c278eee53a0ad5850264b92fb
BLAKE2b-256 checksum
How to use checksums
cfd94cfefebc68615fad2ae77ceb10ab243184104ae8f16044730a2f8491fadc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page