Skip to main content

Add your description here

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ome_zarr_transformations_conformance-0.1.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file ome_zarr_transformations_conformance-0.1.0.tar.gz.

File metadata

  • Download URL: ome_zarr_transformations_conformance-0.1.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for ome_zarr_transformations_conformance-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8aad0eeab4a3b114105fa3150eb45258df3a84231cae56073c00d6895a23de72
MD5 b8ad1827287fc1514baa6c49a8abbefc
BLAKE2b-256 42908adf8146560862f72c1625f666865e685b32d54f91863e15814d78592a29

See more details on using hashes here.

File details

Details for the file ome_zarr_transformations_conformance-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ome_zarr_transformations_conformance-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for ome_zarr_transformations_conformance-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 527fc0c764720bbeb859887e036317e8a7b0a15c04742f007e634c2c37550b50
MD5 9f642eafe2d7f0ff003d10264344d42a
BLAKE2b-256 1d11d47c279422b244afb3587a56ddcaeb065829a73777fb8c31ae108557b461

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page