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 systemSOURCE: the name of the source coordinate systemTARGET: the name of the target coordinate systemCOORDINATES: a JSON-serialised array of D-length arrays of numbers, where D is the dimensionality of a single coordinates
The dingus MUST then
- open the OME-Zarr hierarchy at
PATHand parse the$.ome.scenefrom the attributes - calculate a transformation from the coordinate system with name specified by
SOURCEto the coordinate system with name specified byTARGET(this may require inverting one or more transforms) - apply this transformation to the
COORDINATESarray - print to STDOUT a JSON-serialised Response object
- 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 intarget.coordinates, using the defined tolerances - if
should_error = true, fail the test
- if
- if the return code is non-zero
- if
should_error = true, pass the test - if
should_error = false, fail the test
- if
- if the return code is 0
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8aad0eeab4a3b114105fa3150eb45258df3a84231cae56073c00d6895a23de72
|
|
| MD5 |
b8ad1827287fc1514baa6c49a8abbefc
|
|
| BLAKE2b-256 |
42908adf8146560862f72c1625f666865e685b32d54f91863e15814d78592a29
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
527fc0c764720bbeb859887e036317e8a7b0a15c04742f007e634c2c37550b50
|
|
| MD5 |
9f642eafe2d7f0ff003d10264344d42a
|
|
| BLAKE2b-256 |
1d11d47c279422b244afb3587a56ddcaeb065829a73777fb8c31ae108557b461
|