diff --git a/README.md b/README.md index 84da7852..210498a4 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,78 @@ address issues of scalability and interoperability. This repository contains the central [specification text](./ngff_spec/specification.md), a comprehensive list of [metadata examples](./ngff_spec/examples) -as well as [json schemas](./ngff_spec/schemas) to validate written ome-zarr image data. +as well as [json schemas](./ngff_spec/schemas) to validate written ome-zarr image data. The built documentation including contribution hints can be found **[here](https://ngff-spec.readthedocs.io/en/latest/specification.html)**. + +## Conformance tests + +Conformance can be tested at several levels. + +1. Validating that individual fields of a zarr attributes object are valid. +2. Validating a single zarr attributes object (i.e. containing OME-Zarr metadata) + + - Validates that correct data can be represented, and that internally inconsistent data can be caught + - Cannot validate references to other objects in the zarr hierarchy + - Cannot validate conformance to other zarr metadata e.g. array data type, dimensionality + +3. Validating a metadata-only zarr hierarchy + + - Can validate references to other objects and other zarr metadata + - Cannot validate values e.g. the invertibility of an affine matrix defined as a zarr array + +4. Validating a zarr hierarchy with data + +This repository contains + +- JSON schemas which handle level 1 +- a set of test zarr attributes JSON for level 2 ([`./tests/attributes`](./tests/attributes/)) +- a set of metadata-only zarr hierarchies for level 3 ([`./tests/zarr`](./tests/zarr/)) + +as well as a tool for feeding these test cases into an external validator. + +### Testing tool + +See [`ome_zarr_conformance.py`](./ome_zarr_conformance.py). + +Run it in either `attributes` or `zarr` mode, optionally with filters for test names or types. + +Wrap your own OME-Zarr implementation in a +["dingus"](https://talk.commonmark.org/t/origin-of-the-usage-for-dingus/1226) CLI, +which takes as its last argument the path to either + +- attributes mode: a JSON file representing zarr attributes (i.e. containing OME-Zarr metadata) +- zarr mode: a zarr hierarchy root on the file system (i.e. a directory containing `zarr.json`) + +The dingus should print to STDOUT a JSON object with the keys: + +- `"valid"`: boolean, whether this is valid +- optionally `"message"`: string, free text describing the success/ failure + +Call the tool like + +```sh +python3 ./ome_zarr_conformance.py attributes -- path/to/my/dingus -dingusArg +argValue 10 +``` + +Each call to the dingus will then look like + +```sh +>>> path/to/my/dingus -dingusArg +argValue 10 /home/you/ngff-spec/tests/attributes/spec/valid/custom_type_axes.json + +{"valid": true} +``` + +`ome_zarr_conformance.py` will parse the JSON output and format the results of all requested tests in a tab-separated table. + +Full usage information is available with `./ome_zarr_conformance.py --help`. + +### JSON Schema tests + +You can use the conformance testing tool to test JSON Schema-based validation with + +```sh +>>> ./ome_zarr_conformance.py attributes -- uv run jsonschema_dingus.py attributes +``` + +Some failures are expected as JSON Schema can only handle level 1 validation. diff --git a/jsonschema_dingus.py b/jsonschema_dingus.py new file mode 100755 index 00000000..24d3e36c --- /dev/null +++ b/jsonschema_dingus.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 +# /// script +# dependencies = [ +# "jsonschema", +# "referencing", +# ] +# /// +from __future__ import annotations +from dataclasses import dataclass +from pathlib import Path +import json +from argparse import ArgumentParser +from typing import Any, Self + +from referencing import Registry, Resource +from jsonschema import Draft202012Validator as Validator +from jsonschema.exceptions import ValidationError + +HERE = Path(__file__).resolve().parent +SCHEMA_DIR = HERE / "ngff_spec" / "schemas" + + +@dataclass +class SchemasInfo: + generic_id: str + base_url: str + registry: Registry + + @classmethod + def load(cls) -> Self: + """Get the ID of the top-level schema, and the mapping of schema IDs to objects""" + registry = Registry() + generic = None + base_url = None + for p in SCHEMA_DIR.glob("*.schema*"): + schema = json.loads(p.read_text()) + resource = Resource.from_contents(schema) + registry = resource @ registry + + schema_id = resource.id() + if schema_id is None: + raise RuntimeError("schema has no ID") + if p.stem == "ome_zarr": + generic = schema_id + base_url = generic.split("/schemas/")[0] + + if generic is None or base_url is None: + raise RuntimeError("Could not find generic ome_zarr schema") + + return cls(generic, base_url, registry) + + +def main(raw_args=None): + parser = ArgumentParser() + parser.add_argument("mode", choices=["attributes", "zarr"]) + parser.add_argument("path", type=Path) + + args = parser.parse_args(raw_args) + + p: Path = args.path + attrs: None | dict[str, Any] = None + match args.mode: + case "attributes": + attrs = json.loads(p.read_text()) + case "zarr": + attrs = json.loads(p.joinpath("zarr.json").read_text())["attributes"] + case _: + raise RuntimeError("unreachable") + + if attrs is None: + raise RuntimeError("unreachable") + + schemas = SchemasInfo.load() + + generic_schema = schemas.registry.get(schemas.generic_id) + if generic_schema is None: + raise RuntimeError("could not find generic schema") + + validator = Validator( + generic_schema.contents, + registry=schemas.registry, + ) + + result = dict() + try: + validator.validate(attrs) + result["valid"] = True + except ValidationError as e: + result["valid"] = False + result["message"] = str(e) + + print(json.dumps(result)) + + +if __name__ == "__main__": + main() diff --git a/ngff_spec/pre_build.py b/ngff_spec/pre_build.py index ca0de89e..b1ca8636 100644 --- a/ngff_spec/pre_build.py +++ b/ngff_spec/pre_build.py @@ -74,6 +74,7 @@ def build_json_examples(): def build_json_schemas(): from json_schema_for_humans.generate import generate_from_filename from json_schema_for_humans.generation_configuration import GenerationConfiguration + import json schema_source_dir = 'schemas' output_directory = '_generated/schemas' diff --git a/ngff_spec/schemas/strict_coordinate_systems.schema b/ngff_spec/schemas/strict_coordinate_systems.schema index e39c5955..7f160fda 100644 --- a/ngff_spec/schemas/strict_coordinate_systems.schema +++ b/ngff_spec/schemas/strict_coordinate_systems.schema @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://ngff.openmicroscopy.org/0.6.dev2/schemas/strict_coordinate_systems.schema", "allOf" : [ { diff --git a/ngff_spec/schemas/strict_image.schema b/ngff_spec/schemas/strict_image.schema index d0508687..5207e3bd 100644 --- a/ngff_spec/schemas/strict_image.schema +++ b/ngff_spec/schemas/strict_image.schema @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://ngff.openmicroscopy.org/0.6.dev2/schemas/strict_image.schema", "allOf": [ { diff --git a/ngff_spec/schemas/strict_label.schema b/ngff_spec/schemas/strict_label.schema index 73625010..7557420c 100644 --- a/ngff_spec/schemas/strict_label.schema +++ b/ngff_spec/schemas/strict_label.schema @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://ngff.openmicroscopy.org/0.6.dev2/schemas/strict_label.schema", "allOf": [ { diff --git a/ngff_spec/schemas/strict_ome_zarr.schema b/ngff_spec/schemas/strict_ome_zarr.schema new file mode 100644 index 00000000..187a962f --- /dev/null +++ b/ngff_spec/schemas/strict_ome_zarr.schema @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://ngff.openmicroscopy.org/0.6.dev2/schemas/strict_ome_zarr.schema", + "anyOf": [ + { + "$ref": "https://ngff.openmicroscopy.org/0.6.dev2/schemas/bf2raw.schema" + }, + { + "$ref": "https://ngff.openmicroscopy.org/0.6.dev2/schemas/strict_image.schema" + }, + { + "$ref": "https://ngff.openmicroscopy.org/0.6.dev2/schemas/strict_label.schema" + }, + { + "$ref": "https://ngff.openmicroscopy.org/0.6.dev2/schemas/ome.schema" + }, + { + "$ref": "https://ngff.openmicroscopy.org/0.6.dev2/schemas/strict_plate.schema" + }, + { + "$ref": "https://ngff.openmicroscopy.org/0.6.dev2/schemas/strict_well.schema" + } + ] +} diff --git a/ngff_spec/schemas/strict_plate.schema b/ngff_spec/schemas/strict_plate.schema index 532d5dfc..666dd65b 100644 --- a/ngff_spec/schemas/strict_plate.schema +++ b/ngff_spec/schemas/strict_plate.schema @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://ngff.openmicroscopy.org/0.6.dev2/schemas/strict_plate.schema", "allOf": [ { diff --git a/ngff_spec/schemas/strict_well.schema b/ngff_spec/schemas/strict_well.schema index 57018470..3ed4a084 100644 --- a/ngff_spec/schemas/strict_well.schema +++ b/ngff_spec/schemas/strict_well.schema @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://ngff.openmicroscopy.org/0.6.dev2/schemas/strict_well.schema", "allOf": [ { diff --git a/ome_zarr_conformance.py b/ome_zarr_conformance.py new file mode 100755 index 00000000..01339046 --- /dev/null +++ b/ome_zarr_conformance.py @@ -0,0 +1,308 @@ +#!/usr/bin/env python3 +""" +Test with + +```sh +./ome_zarr_conformance.py zarr -- sh -c 'echo "{\"valid\": true}"' +``` +""" + +from __future__ import annotations +from concurrent.futures import Future, ThreadPoolExecutor +import os +import subprocess as sp +from argparse import ArgumentParser +from pathlib import Path +import sys +import re +import json +from dataclasses import dataclass +from typing import Any, Iterable, Literal, Self +import logging + +logger = logging.getLogger("ome_zarr_conformance") + +here = Path(__file__).resolve().parent +tests_dir = here / "tests" + + +@dataclass +class CommandOutput: + valid: bool + message: str | None + + @classmethod + def from_jso(cls, jso: dict[str, Any]) -> Self: + return cls(jso["valid"], jso.get("message")) + + +@dataclass +class TestResult: + test_name: str + status: Literal["pass", "fail", "error"] + message: str | None + stderr: str + return_code: int + conformance: Conformance | None = None + + +@dataclass +class Conformance: + strict: bool + valid: bool + description: bool | None + + @classmethod + def from_jso(cls, jso: dict[str, Any]) -> Self: + return cls( + strict=jso.get("strict", False), + valid=jso.get("valid", True), + description=jso.get("description"), + ) + + @classmethod + def from_attributes(cls, attrs: dict[str, Any], pop=False) -> Self: + if pop: + conformance_jso = attrs.pop("_conformance", {}) + else: + conformance_jso = attrs.get("_conformance", {}) + return cls.from_jso(conformance_jso) + + @classmethod + def from_attributes_file(cls, fpath: Path) -> Self: + content = fpath.read_text() + jso: dict[str, Any] = json.loads(content) + return cls.from_attributes(jso) + + +class Requested: + def __init__( + self, + exclude_patterns: list[re.Pattern] | None = None, + include_patterns: list[re.Pattern] | None = None, + exclude_strict=False, + exclude_invalid=False, + ) -> None: + self.exclude_patterns = exclude_patterns or [] + self.include_patterns = include_patterns or [] + + if exclude_strict: + self.exclude_patterns.append(re.compile(r"^strict/")) + if exclude_invalid: + self.exclude_patterns.append(re.compile(r"^\w+/invalid/")) + + def include(self, name: str) -> bool: + if self.exclude_patterns and any(p.search(name) for p in self.exclude_patterns): + return False + if self.include_patterns and not any( + p.search(name) for p in self.include_patterns + ): + return False + return True + + +def test_path_to_name(fpath: Path, root: Path) -> str: + w_suff = str(fpath.relative_to(root)).replace(os.path.sep, "/") + return w_suff.split(".", 1)[0] + + +def run_test(dingus_cmd: list[str], fpath: Path, test_name: str) -> TestResult: + test_logger = logger.getChild(test_name) + + strictness, validity, *_ = test_name.split("/") + if strictness not in ("strict", "spec"): + raise RuntimeError(f"cannot determine strictness from name: {test_name}") + + if validity == "invalid": + is_valid = False + elif validity == "valid": + is_valid = True + else: + raise RuntimeError(f"cannot determine validity from name: {test_name}") + + res = sp.run( + dingus_cmd + [os.fspath(fpath)], + text=True, + capture_output=True, + ) + + if res.returncode: + test_logger.error( + "error (exit code %s):%s", + res.returncode, + "\n" + res.stderr if res.stderr else "", + ) + return TestResult(test_name, "error", None, res.stderr, res.returncode) + + out: CommandOutput = CommandOutput.from_jso(json.loads(res.stdout)) + if out.valid == is_valid: + test_logger.debug("pass: %s", out.message or "") + return TestResult(test_name, "pass", out.message, res.stderr, res.returncode) + else: + test_logger.warning( + "fail (expected %svalid): %s%s", + "" if is_valid else "in", + out.message or "", + "\n" + res.stderr if res.stderr else "", + ) + return TestResult(test_name, "fail", out.message, res.stderr, res.returncode) + + +def run_all_tests( + cmd: list[str], + cases: dict[str, Path], + threads=None, +) -> Iterable[TestResult]: + with ThreadPoolExecutor(threads) as pool: + logger.info( + "Running %s tests with max %s threads", len(cases), pool._max_workers + ) + futs: list[Future] = [] + for name, path in cases.items(): + futs.append(pool.submit(run_test, cmd, path, name)) + + for f in futs: + res = f.result() + if res is not None: + yield res + + +def main(raw_args=None): + parser = ArgumentParser( + description=( + "Feed sample Zarr data into a dingus CLI for validation. " + "After the arguments shown, add a -- followed by the dingus CLI call; " + "e.g., `ome_zarr_conformance attributes --exclude-strict -- path/to/my/dingus -cli +args`. " + "The path to the attributes file or root of the zarr container will be appended to the dingus call." + ) + ) + parser.add_argument( + "mode", + choices=["attributes", "zarr"], + help=("whether to test single attributes documents or full zarr hierarchies."), + ) + parser.add_argument( + "--no-exit-code", + "-X", + action="store_true", + help="return exit code 0 (success) even if tests failed", + ) + parser.add_argument( + "--include-pattern", + "-p", + type=re.compile, + action="append", + help="regular expression pattern for test names to include; can be given multiple times", + ) + parser.add_argument( + "--exclude-pattern", + "-P", + type=re.compile, + action="append", + help="regular expression pattern for test names to exclude; can be given multiple times", + ) + parser.add_argument( + "--exclude-strict", + "-S", + action="store_true", + help="exclude strict tests", + ) + parser.add_argument( + "--exclude-invalid", + "-I", + action="store_true", + help="exclude tests for invalid attributes", + ) + parser.add_argument( + "--verbose", + "-v", + action="count", + default=0, + help="increase logging verbosity; can be repeated", + ) + + if raw_args is None: + raw_args = sys.argv + + try: + split = raw_args.index("--") + dingus_args = raw_args[split + 1 :] + these_args = raw_args[1:split] + except ValueError: + these_args = raw_args + dingus_args = None + + args = parser.parse_args(these_args) + + lvl = { + 0: logging.ERROR, + 1: logging.WARNING, + 2: logging.INFO, + 3: logging.DEBUG, + }.get(args.verbose, logging.DEBUG) + logging.basicConfig(level=lvl) + logging.debug("Got args: %s", args) + + if dingus_args is None: + print( + "No dingus command provided; add -- followed by the command", + file=sys.stderr, + ) + sys.exit(0) + + passes = 0 + failures = 0 + errors = 0 + + match args.mode: + case "attributes": + dpath = tests_dir / "attributes" + rglob = "*.json" + case "zarr": + dpath = tests_dir / "zarr" + rglob = "*.ome.zarr" + case _: + raise RuntimeError("unreachable") + + req = Requested( + exclude_patterns=args.exclude_pattern, + include_patterns=args.include_pattern, + exclude_strict=bool(args.exclude_strict), + exclude_invalid=bool(args.exclude_invalid), + ) + + test_paths = ((test_path_to_name(p, dpath), p) for p in dpath.rglob(rglob)) + cases = dict(sorted((n, p) for n, p in test_paths if req.include(n))) + + for res in run_all_tests( + dingus_args, + cases, + ): + row = [ + res.test_name, + res.status, + ] + if res.status == "pass": + passes += 1 + elif res.status == "fail": + failures += 1 + elif res.status == "error": + errors += 1 + + print("\t".join(row)) + + logger.info("Got %s passes, %s failures, %s errors", passes, failures, errors) + + if args.no_exit_code: + sys.exit(0) + + code = 0 + if failures: + code += 1 + if errors: + code += 2 + sys.exit(code) + + +if __name__ == "__main__": + main() diff --git a/tests/attributes/spec/invalid/image/duplicate_axes.json b/tests/attributes/spec/invalid/image/duplicate_axes.json new file mode 100644 index 00000000..731a13ad --- /dev/null +++ b/tests/attributes/spec/invalid/image/duplicate_axes.json @@ -0,0 +1,47 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "x", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/duplicate_scale.json b/tests/attributes/spec/invalid/image/duplicate_scale.json new file mode 100644 index 00000000..fec599b3 --- /dev/null +++ b/tests/attributes/spec/invalid/image/duplicate_scale.json @@ -0,0 +1,56 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + }, + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/empty_transformations.json b/tests/attributes/spec/invalid/image/empty_transformations.json new file mode 100644 index 00000000..f4ffaf65 --- /dev/null +++ b/tests/attributes/spec/invalid/image/empty_transformations.json @@ -0,0 +1,37 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/invalid_axes_count.json b/tests/attributes/spec/invalid/image/invalid_axes_count.json new file mode 100644 index 00000000..a9a45e85 --- /dev/null +++ b/tests/attributes/spec/invalid/image/invalid_axes_count.json @@ -0,0 +1,42 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/invalid_axis_type.json b/tests/attributes/spec/invalid/image/invalid_axis_type.json new file mode 100644 index 00000000..4775395d --- /dev/null +++ b/tests/attributes/spec/invalid/image/invalid_axis_type.json @@ -0,0 +1,47 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "invalid", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/invalid_channels_color.json b/tests/attributes/spec/invalid/image/invalid_channels_color.json new file mode 100644 index 00000000..a5717520 --- /dev/null +++ b/tests/attributes/spec/invalid/image/invalid_channels_color.json @@ -0,0 +1,64 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ], + "omero": { + "channels": [ + { + "active": true, + "coefficient": 1.0, + "color": 255, + "family": "linear", + "label": "1234", + "window": { + "end": 1765.0, + "max": 2555.0, + "min": 5.0, + "start": 0.0 + } + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/invalid_channels_window.json b/tests/attributes/spec/invalid/image/invalid_channels_window.json new file mode 100644 index 00000000..481d0b9b --- /dev/null +++ b/tests/attributes/spec/invalid/image/invalid_channels_window.json @@ -0,0 +1,64 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ], + "omero": { + "channels": [ + { + "active": true, + "coefficient": 1.0, + "color": "ff0000", + "family": "linear", + "label": "1234", + "window": { + "end": "100", + "max": 2555.0, + "min": 5.0, + "start": 0.0 + } + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/invalid_multiscales_transformations.json b/tests/attributes/spec/invalid/image/invalid_multiscales_transformations.json new file mode 100644 index 00000000..7362299b --- /dev/null +++ b/tests/attributes/spec/invalid/image/invalid_multiscales_transformations.json @@ -0,0 +1,55 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ], + "coordinateTransformations": [ + { + "scale": [ + "invalid" + ], + "type": "scale" + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/invalid_path.json b/tests/attributes/spec/invalid/image/invalid_path.json new file mode 100644 index 00000000..26585f0f --- /dev/null +++ b/tests/attributes/spec/invalid/image/invalid_path.json @@ -0,0 +1,47 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": 0, + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": 0, + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/invalid_transformation_type.json b/tests/attributes/spec/invalid/image/invalid_transformation_type.json new file mode 100644 index 00000000..df8a4981 --- /dev/null +++ b/tests/attributes/spec/invalid/image/invalid_transformation_type.json @@ -0,0 +1,47 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "translation", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/missing_axes.json b/tests/attributes/spec/invalid/image/missing_axes.json new file mode 100644 index 00000000..434fa0e7 --- /dev/null +++ b/tests/attributes/spec/invalid/image/missing_axes.json @@ -0,0 +1,30 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/missing_axes_name.json b/tests/attributes/spec/invalid/image/missing_axes_name.json new file mode 100644 index 00000000..6acf6a0c --- /dev/null +++ b/tests/attributes/spec/invalid/image/missing_axes_name.json @@ -0,0 +1,45 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "type": "space", + "unit": "micrometer" + }, + { + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 0.13, + 0.13 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/missing_datasets.json b/tests/attributes/spec/invalid/image/missing_datasets.json new file mode 100644 index 00000000..13a7ef4d --- /dev/null +++ b/tests/attributes/spec/invalid/image/missing_datasets.json @@ -0,0 +1,31 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/missing_path.json b/tests/attributes/spec/invalid/image/missing_path.json new file mode 100644 index 00000000..422037b8 --- /dev/null +++ b/tests/attributes/spec/invalid/image/missing_path.json @@ -0,0 +1,46 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/missing_scale.json b/tests/attributes/spec/invalid/image/missing_scale.json new file mode 100644 index 00000000..cd9af492 --- /dev/null +++ b/tests/attributes/spec/invalid/image/missing_scale.json @@ -0,0 +1,47 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "translation": [ + 1, + 1 + ], + "type": "translation", + "input": "0", + "output": "intrinsice" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/missing_space_axes.json b/tests/attributes/spec/invalid/image/missing_space_axes.json new file mode 100644 index 00000000..7bdaf11f --- /dev/null +++ b/tests/attributes/spec/invalid/image/missing_space_axes.json @@ -0,0 +1,45 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "t", + "type": "time" + }, + { + "name": "c", + "type": "channel" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/missing_transformations.json b/tests/attributes/spec/invalid/image/missing_transformations.json new file mode 100644 index 00000000..847d330e --- /dev/null +++ b/tests/attributes/spec/invalid/image/missing_transformations.json @@ -0,0 +1,36 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0" + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/no_axes.json b/tests/attributes/spec/invalid/image/no_axes.json new file mode 100644 index 00000000..6dc2b35e --- /dev/null +++ b/tests/attributes/spec/invalid/image/no_axes.json @@ -0,0 +1,31 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "axes": [], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/no_datasets.json b/tests/attributes/spec/invalid/image/no_datasets.json new file mode 100644 index 00000000..42579cf8 --- /dev/null +++ b/tests/attributes/spec/invalid/image/no_datasets.json @@ -0,0 +1,32 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/no_multiscales.json b/tests/attributes/spec/invalid/image/no_multiscales.json new file mode 100644 index 00000000..8e3a3aba --- /dev/null +++ b/tests/attributes/spec/invalid/image/no_multiscales.json @@ -0,0 +1,11 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/one_space_axes.json b/tests/attributes/spec/invalid/image/one_space_axes.json new file mode 100644 index 00000000..6c5affe7 --- /dev/null +++ b/tests/attributes/spec/invalid/image/one_space_axes.json @@ -0,0 +1,50 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "t", + "type": "time" + }, + { + "name": "c", + "type": "channel" + }, + { + "name": "x", + "type": "space" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/too_many_axes.json b/tests/attributes/spec/invalid/image/too_many_axes.json new file mode 100644 index 00000000..bf02199b --- /dev/null +++ b/tests/attributes/spec/invalid/image/too_many_axes.json @@ -0,0 +1,65 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "angle", + "type": "custom" + }, + { + "name": "t", + "type": "time" + }, + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space" + }, + { + "name": "y", + "type": "space" + }, + { + "name": "x", + "type": "space" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1, + 1, + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/image/too_many_space_axes.json b/tests/attributes/spec/invalid/image/too_many_space_axes.json new file mode 100644 index 00000000..16e9af7d --- /dev/null +++ b/tests/attributes/spec/invalid/image/too_many_space_axes.json @@ -0,0 +1,55 @@ +{ + "ome": { + "version": "0.6.dev22", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "X", + "type": "space" + }, + { + "name": "z", + "type": "space" + }, + { + "name": "y", + "type": "space" + }, + { + "name": "x", + "type": "space" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/label/colors_duplicate.json b/tests/attributes/spec/invalid/label/colors_duplicate.json new file mode 100644 index 00000000..e104c02d --- /dev/null +++ b/tests/attributes/spec/invalid/label/colors_duplicate.json @@ -0,0 +1,33 @@ +{ + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [ + { + "label-value": 1, + "rgba": [ + 0, + 0, + 0, + 0 + ] + }, + { + "label-value": 1, + "rgba": [ + 0, + 0, + 0, + 0 + ] + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/label/colors_no_label_value.json b/tests/attributes/spec/invalid/label/colors_no_label_value.json new file mode 100644 index 00000000..946c3402 --- /dev/null +++ b/tests/attributes/spec/invalid/label/colors_no_label_value.json @@ -0,0 +1,23 @@ +{ + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [ + { + "rgba": [ + 0, + 0, + 0, + 0 + ] + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/label/colors_rgba_length.json b/tests/attributes/spec/invalid/label/colors_rgba_length.json new file mode 100644 index 00000000..789bdd5e --- /dev/null +++ b/tests/attributes/spec/invalid/label/colors_rgba_length.json @@ -0,0 +1,23 @@ +{ + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [ + { + "label-value": 1, + "rgba": [ + 0, + 0, + 0 + ] + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/label/colors_rgba_type.json b/tests/attributes/spec/invalid/label/colors_rgba_type.json new file mode 100644 index 00000000..5bc618e0 --- /dev/null +++ b/tests/attributes/spec/invalid/label/colors_rgba_type.json @@ -0,0 +1,24 @@ +{ + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [ + { + "label-value": 1, + "rgba": [ + 0, + 0, + 0, + 500 + ] + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/label/empty_colors.json b/tests/attributes/spec/invalid/label/empty_colors.json new file mode 100644 index 00000000..1711513d --- /dev/null +++ b/tests/attributes/spec/invalid/label/empty_colors.json @@ -0,0 +1,14 @@ +{ + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/label/empty_properties.json b/tests/attributes/spec/invalid/label/empty_properties.json new file mode 100644 index 00000000..02392887 --- /dev/null +++ b/tests/attributes/spec/invalid/label/empty_properties.json @@ -0,0 +1,14 @@ +{ + "ome": { + "version": "0.6.dev2", + "image-label": { + "properties": [] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/label/properties_no_label_value.json b/tests/attributes/spec/invalid/label/properties_no_label_value.json new file mode 100644 index 00000000..5c5fce16 --- /dev/null +++ b/tests/attributes/spec/invalid/label/properties_no_label_value.json @@ -0,0 +1,18 @@ +{ + "ome": { + "version": "0.6.dev2", + "image-label": { + "properties": [ + { + "value": "foo" + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/acquisition_negative_starttime.json b/tests/attributes/spec/invalid/plate/acquisition_negative_starttime.json new file mode 100644 index 00000000..11498993 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/acquisition_negative_starttime.json @@ -0,0 +1,36 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "starttime": -1 + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/acquisition_noninteger_endtime.json b/tests/attributes/spec/invalid/plate/acquisition_noninteger_endtime.json new file mode 100644 index 00000000..f1cace8a --- /dev/null +++ b/tests/attributes/spec/invalid/plate/acquisition_noninteger_endtime.json @@ -0,0 +1,36 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "endtime": "2022-05-13T13:48:06+00:00" + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/acquisition_noninteger_starttime.json b/tests/attributes/spec/invalid/plate/acquisition_noninteger_starttime.json new file mode 100644 index 00000000..82c5014b --- /dev/null +++ b/tests/attributes/spec/invalid/plate/acquisition_noninteger_starttime.json @@ -0,0 +1,36 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "starttime": "2022-05-13T13:48:06+00:00" + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/acquisition_zero_maximumfieldcount.json b/tests/attributes/spec/invalid/plate/acquisition_zero_maximumfieldcount.json new file mode 100644 index 00000000..56225f52 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/acquisition_zero_maximumfieldcount.json @@ -0,0 +1,36 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "maximumfieldcount": 0 + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/duplicate_columns.json b/tests/attributes/spec/invalid/plate/duplicate_columns.json new file mode 100644 index 00000000..3c39f156 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/duplicate_columns.json @@ -0,0 +1,33 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + }, + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/duplicate_rows-2.json b/tests/attributes/spec/invalid/plate/duplicate_rows-2.json new file mode 100644 index 00000000..4f9eb402 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/duplicate_rows-2.json @@ -0,0 +1,38 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + }, + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + }, + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/duplicate_rows.json b/tests/attributes/spec/invalid/plate/duplicate_rows.json new file mode 100644 index 00000000..9ddcfbc8 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/duplicate_rows.json @@ -0,0 +1,33 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + }, + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/empty_columns.json b/tests/attributes/spec/invalid/plate/empty_columns.json new file mode 100644 index 00000000..2b72fd3d --- /dev/null +++ b/tests/attributes/spec/invalid/plate/empty_columns.json @@ -0,0 +1,26 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/empty_rows.json b/tests/attributes/spec/invalid/plate/empty_rows.json new file mode 100644 index 00000000..5c03ac91 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/empty_rows.json @@ -0,0 +1,26 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/empty_wells.json b/tests/attributes/spec/invalid/plate/empty_wells.json new file mode 100644 index 00000000..9b099a89 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/empty_wells.json @@ -0,0 +1,24 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": {} + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/missing_acquisition_id.json b/tests/attributes/spec/invalid/plate/missing_acquisition_id.json new file mode 100644 index 00000000..f3370e3b --- /dev/null +++ b/tests/attributes/spec/invalid/plate/missing_acquisition_id.json @@ -0,0 +1,35 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "maximumfieldcount": 1 + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/missing_column_name.json b/tests/attributes/spec/invalid/plate/missing_column_name.json new file mode 100644 index 00000000..f866f544 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/missing_column_name.json @@ -0,0 +1,30 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "concentration": 10 + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/missing_columns.json b/tests/attributes/spec/invalid/plate/missing_columns.json new file mode 100644 index 00000000..380d7fff --- /dev/null +++ b/tests/attributes/spec/invalid/plate/missing_columns.json @@ -0,0 +1,25 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/missing_row_name.json b/tests/attributes/spec/invalid/plate/missing_row_name.json new file mode 100644 index 00000000..6d0d3bf4 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/missing_row_name.json @@ -0,0 +1,30 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "concentration": 10 + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/missing_rows.json b/tests/attributes/spec/invalid/plate/missing_rows.json new file mode 100644 index 00000000..39dc2e3d --- /dev/null +++ b/tests/attributes/spec/invalid/plate/missing_rows.json @@ -0,0 +1,25 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/missing_well_columnIndex.json b/tests/attributes/spec/invalid/plate/missing_well_columnIndex.json new file mode 100644 index 00000000..3a2c408a --- /dev/null +++ b/tests/attributes/spec/invalid/plate/missing_well_columnIndex.json @@ -0,0 +1,29 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/missing_well_path.json b/tests/attributes/spec/invalid/plate/missing_well_path.json new file mode 100644 index 00000000..473617ad --- /dev/null +++ b/tests/attributes/spec/invalid/plate/missing_well_path.json @@ -0,0 +1,29 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/missing_well_rowIndex.json b/tests/attributes/spec/invalid/plate/missing_well_rowIndex.json new file mode 100644 index 00000000..fca57a20 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/missing_well_rowIndex.json @@ -0,0 +1,29 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/missing_wells.json b/tests/attributes/spec/invalid/plate/missing_wells.json new file mode 100644 index 00000000..63c56075 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/missing_wells.json @@ -0,0 +1,23 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/negative_acquisition_id.json b/tests/attributes/spec/invalid/plate/negative_acquisition_id.json new file mode 100644 index 00000000..fbf60ca6 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/negative_acquisition_id.json @@ -0,0 +1,35 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": -1 + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/negative_endtime.json b/tests/attributes/spec/invalid/plate/negative_endtime.json new file mode 100644 index 00000000..7a765990 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/negative_endtime.json @@ -0,0 +1,36 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "endtime": -1 + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/non_alphanumeric_column.json b/tests/attributes/spec/invalid/plate/non_alphanumeric_column.json new file mode 100644 index 00000000..343de6c9 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/non_alphanumeric_column.json @@ -0,0 +1,30 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A-1" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A-1/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/non_integer_acquisition_id.json b/tests/attributes/spec/invalid/plate/non_integer_acquisition_id.json new file mode 100644 index 00000000..c4e37b6d --- /dev/null +++ b/tests/attributes/spec/invalid/plate/non_integer_acquisition_id.json @@ -0,0 +1,35 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": "0" + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/non_integer_acquisition_maximumfieldcount.json b/tests/attributes/spec/invalid/plate/non_integer_acquisition_maximumfieldcount.json new file mode 100644 index 00000000..85568666 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/non_integer_acquisition_maximumfieldcount.json @@ -0,0 +1,36 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "maximumfieldcount": "0" + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/well_1group.json b/tests/attributes/spec/invalid/plate/well_1group.json new file mode 100644 index 00000000..df2363cc --- /dev/null +++ b/tests/attributes/spec/invalid/plate/well_1group.json @@ -0,0 +1,29 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A1", + "rowIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/well_3groups.json b/tests/attributes/spec/invalid/plate/well_3groups.json new file mode 100644 index 00000000..6cd37657 --- /dev/null +++ b/tests/attributes/spec/invalid/plate/well_3groups.json @@ -0,0 +1,29 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "plate/A/1", + "rowIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/plate/zero_field_count.json b/tests/attributes/spec/invalid/plate/zero_field_count.json new file mode 100644 index 00000000..0995f29b --- /dev/null +++ b/tests/attributes/spec/invalid/plate/zero_field_count.json @@ -0,0 +1,31 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "field_count": 0, + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/well/duplicate_images.json b/tests/attributes/spec/invalid/well/duplicate_images.json new file mode 100644 index 00000000..8da2ad82 --- /dev/null +++ b/tests/attributes/spec/invalid/well/duplicate_images.json @@ -0,0 +1,18 @@ +{ + "well": { + "images": [ + { + "path": "0" + }, + { + "path": "0" + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/well.schema" + }, + "description": "Tests for the well JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/well/empty_images.json b/tests/attributes/spec/invalid/well/empty_images.json new file mode 100644 index 00000000..b195e3ab --- /dev/null +++ b/tests/attributes/spec/invalid/well/empty_images.json @@ -0,0 +1,11 @@ +{ + "well": { + "images": [] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/well.schema" + }, + "description": "Tests for the well JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/invalid/well/non_integer_acquisition_id.json b/tests/attributes/spec/invalid/well/non_integer_acquisition_id.json new file mode 100644 index 00000000..ec8888eb --- /dev/null +++ b/tests/attributes/spec/invalid/well/non_integer_acquisition_id.json @@ -0,0 +1,16 @@ +{ + "well": { + "images": [ + { + "acquisition": "0", + "path": "0" + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/well.schema" + }, + "description": "Tests for the well JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/valid/image/custom_type_axes.json b/tests/attributes/spec/valid/image/custom_type_axes.json new file mode 100644 index 00000000..3450f0aa --- /dev/null +++ b/tests/attributes/spec/valid/image/custom_type_axes.json @@ -0,0 +1,52 @@ +{ + "ome": { + "version": "0.6.dev22", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "angle", + "type": "custom" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1 + ], + "input": "0", + "output": "intrinsic", + "type": "scale" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/valid/image/invalid_axis_units.json b/tests/attributes/spec/valid/image/invalid_axis_units.json new file mode 100644 index 00000000..dab30483 --- /dev/null +++ b/tests/attributes/spec/valid/image/invalid_axis_units.json @@ -0,0 +1,47 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micron" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 0.13, + 0.13 + ], + "input": "0", + "output": "intrinsic", + "type": "scale" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/valid/image/mismatch_axes_units.json b/tests/attributes/spec/valid/image/mismatch_axes_units.json new file mode 100644 index 00000000..0bb4cf2c --- /dev/null +++ b/tests/attributes/spec/valid/image/mismatch_axes_units.json @@ -0,0 +1,52 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "t", + "type": "time", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 0.13, + 0.13 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/valid/image/missing_name.json b/tests/attributes/spec/valid/image/missing_name.json new file mode 100644 index 00000000..7a136f17 --- /dev/null +++ b/tests/attributes/spec/valid/image/missing_name.json @@ -0,0 +1,59 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "datasets": [ + { + "path": "path/to/0", + "coordinateTransformations": [ + { + "type": "scale", + "scale": [ + 1, + 1 + ], + "input": "path/to/0", + "output": "intrinsic" + } + ] + } + ], + "type": "gaussian", + "metadata": { + "method": "skimage.transform.pyramid_gaussian", + "version": "0.16.1", + "args": [ + "true", + "false" + ], + "kwargs": { + "multichannel": true + } + }, + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/valid/image/untyped_axes.json b/tests/attributes/spec/valid/image/untyped_axes.json new file mode 100644 index 00000000..76c2472e --- /dev/null +++ b/tests/attributes/spec/valid/image/untyped_axes.json @@ -0,0 +1,51 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "angle" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1 + ], + "input": "0", + "output": "intrinsic", + "type": "scale" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/spec/valid/label/minimal.json b/tests/attributes/spec/valid/label/minimal.json new file mode 100644 index 00000000..f8983b1b --- /dev/null +++ b/tests/attributes/spec/valid/label/minimal.json @@ -0,0 +1,24 @@ +{ + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [ + { + "label-value": 1, + "rgba": [ + 0, + 0, + 0, + 0 + ] + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/valid/label/minimal_properties.json b/tests/attributes/spec/valid/label/minimal_properties.json new file mode 100644 index 00000000..29822a2a --- /dev/null +++ b/tests/attributes/spec/valid/label/minimal_properties.json @@ -0,0 +1,29 @@ +{ + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [ + { + "label-value": 1, + "rgba": [ + 0, + 0, + 0, + 0 + ] + } + ], + "properties": [ + { + "label-value": 1 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/valid/plate/minimal_acquisitions.json b/tests/attributes/spec/valid/plate/minimal_acquisitions.json new file mode 100644 index 00000000..119bde45 --- /dev/null +++ b/tests/attributes/spec/valid/plate/minimal_acquisitions.json @@ -0,0 +1,35 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0 + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/valid/plate/minimal_no_acquisitions.json b/tests/attributes/spec/valid/plate/minimal_no_acquisitions.json new file mode 100644 index 00000000..ea61c1cf --- /dev/null +++ b/tests/attributes/spec/valid/plate/minimal_no_acquisitions.json @@ -0,0 +1,30 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/valid/plate/non_alphanumeric_row.json b/tests/attributes/spec/valid/plate/non_alphanumeric_row.json new file mode 100644 index 00000000..2d35a8c7 --- /dev/null +++ b/tests/attributes/spec/valid/plate/non_alphanumeric_row.json @@ -0,0 +1,30 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "A1" + } + ], + "wells": [ + { + "path": "A/A1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/valid/well/minimal_acquisitions.json b/tests/attributes/spec/valid/well/minimal_acquisitions.json new file mode 100644 index 00000000..75781595 --- /dev/null +++ b/tests/attributes/spec/valid/well/minimal_acquisitions.json @@ -0,0 +1,19 @@ +{ + "ome": { + "version": "0.6.dev2", + "well": { + "images": [ + { + "acquisition": 1, + "path": "0" + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/well.schema" + }, + "description": "Tests for the well JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/spec/valid/well/minimal_no_acquisition.json b/tests/attributes/spec/valid/well/minimal_no_acquisition.json new file mode 100644 index 00000000..f17e04d7 --- /dev/null +++ b/tests/attributes/spec/valid/well/minimal_no_acquisition.json @@ -0,0 +1,18 @@ +{ + "ome": { + "version": "0.6.dev2", + "well": { + "images": [ + { + "path": "0" + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/well.schema" + }, + "description": "Tests for the well JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/strict/invalid/label/no_colors.json b/tests/attributes/strict/invalid/label/no_colors.json new file mode 100644 index 00000000..b74a2087 --- /dev/null +++ b/tests/attributes/strict/invalid/label/no_colors.json @@ -0,0 +1,12 @@ +{ + "ome": { + "version": "0.6.dev2", + "image-label": {} + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_label.schema" + }, + "description": "Tests for the strict image-label JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/strict/invalid/plate/missing_acquisition_maximumfieldcount.json b/tests/attributes/strict/invalid/plate/missing_acquisition_maximumfieldcount.json new file mode 100644 index 00000000..41f4749e --- /dev/null +++ b/tests/attributes/strict/invalid/plate/missing_acquisition_maximumfieldcount.json @@ -0,0 +1,37 @@ +{ + "ome": { + "version": "0.6.dev22", + "plate": { + "acquisitions": [ + { + "id": 0, + "name": "0" + } + ], + "columns": [ + { + "name": "A" + } + ], + "name": "test plate", + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_plate.schema" + }, + "description": "Tests for the strict plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/strict/invalid/plate/missing_acquisition_name.json b/tests/attributes/strict/invalid/plate/missing_acquisition_name.json new file mode 100644 index 00000000..4929c2d2 --- /dev/null +++ b/tests/attributes/strict/invalid/plate/missing_acquisition_name.json @@ -0,0 +1,37 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "maximumfieldcount": 1 + } + ], + "columns": [ + { + "name": "A" + } + ], + "name": "test plate", + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_plate.schema" + }, + "description": "Tests for the strict plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/strict/invalid/plate/missing_name.json b/tests/attributes/strict/invalid/plate/missing_name.json new file mode 100644 index 00000000..1e608de4 --- /dev/null +++ b/tests/attributes/strict/invalid/plate/missing_name.json @@ -0,0 +1,30 @@ +{ + "ome": { + "version": "0.6.dev22", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_plate.schema" + }, + "description": "Tests for the strict plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/strict/valid/image/image.json b/tests/attributes/strict/valid/image/image.json new file mode 100644 index 00000000..780d1edf --- /dev/null +++ b/tests/attributes/strict/valid/image/image.json @@ -0,0 +1,52 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "physical", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "physical" + } + ] + } + ], + "name": "simple_image", + "type": "foo", + "metadata": { + "key": "value" + } + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/strict/valid/image/image_metadata.json b/tests/attributes/strict/valid/image/image_metadata.json new file mode 100644 index 00000000..239d749f --- /dev/null +++ b/tests/attributes/strict/valid/image/image_metadata.json @@ -0,0 +1,63 @@ +{ + "ome": { + "version": "0.6.dev2", + "@id": "top", + "@type": "ngff:Image", + "multiscales": [ + { + "@id": "inner", + "name": "example", + "datasets": [ + { + "path": "path/to/0", + "coordinateTransformations": [ + { + "type": "scale", + "scale": [ + 1, + 1 + ], + "input": "path/to/0", + "output": "physical" + } + ] + } + ], + "type": "gaussian", + "metadata": { + "method": "skimage.transform.pyramid_gaussian", + "version": "0.16.1", + "args": [ + "true", + "false" + ], + "kwargs": { + "multichannel": true + } + }, + "coordinateSystems": [ + { + "name": "physical", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/strict/valid/image/image_omero.json b/tests/attributes/strict/valid/image/image_omero.json new file mode 100644 index 00000000..bda5ae01 --- /dev/null +++ b/tests/attributes/strict/valid/image/image_omero.json @@ -0,0 +1,166 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "world", + "axes": [ + { + "name": "t", + "type": "time" + }, + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + }, + { + "name": "physical", + "axes": [ + { + "name": "t", + "type": "time" + }, + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 0.5, + 0.13, + 0.13 + ], + "type": "scale", + "input": "0", + "output": "physical" + } + ] + }, + { + "path": "1", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1, + 0.26, + 0.26 + ], + "type": "scale", + "input": "1", + "output": "physical" + } + ] + } + ], + "coordinateTransformations": [ + { + "translation": [ + 0, + 9, + 0.5, + 25.74, + 21.58 + ], + "type": "translation", + "input": "intrinsic", + "output": "world" + } + ], + "name": "image_with_omero_metadata", + "type": "foo", + "metadata": { + "key": "value" + } + } + ], + "omero": { + "channels": [ + { + "active": true, + "coefficient": 1.0, + "color": "00FF00", + "family": "linear", + "inverted": false, + "label": "FITC", + "window": { + "end": 813.0, + "max": 870.0, + "min": 102.0, + "start": 82.0 + } + }, + { + "active": true, + "coefficient": 1.0, + "color": "FF0000", + "family": "linear", + "inverted": false, + "label": "RD-TR-PE", + "window": { + "end": 815.0, + "max": 441.0, + "min": 129.0, + "start": 78.0 + } + } + ], + "id": 1, + "rdefs": { + "defaultT": 0, + "defaultZ": 2, + "model": "color" + }, + "version": "0.6.dev2" + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/strict/valid/image/multiscales_example.json b/tests/attributes/strict/valid/image/multiscales_example.json new file mode 100644 index 00000000..9eba7550 --- /dev/null +++ b/tests/attributes/strict/valid/image/multiscales_example.json @@ -0,0 +1,152 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "name": "example", + "coordinateSystems": [ + { + "name": "world", + "axes": [ + { + "name": "t", + "type": "time", + "unit": "millisecond" + }, + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + }, + { + "name": "intrinsic", + "axes": [ + { + "name": "t", + "type": "time", + "unit": "millisecond" + }, + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "type": "scale", + "scale": [ + 1.0, + 1.0, + 0.5, + 0.5, + 0.5 + ], + "input": "0", + "output": "intrinsic" + } + ] + }, + { + "path": "1", + "coordinateTransformations": [ + { + "type": "scale", + "scale": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "input": "1", + "output": "intrinsic" + } + ] + }, + { + "path": "2", + "coordinateTransformations": [ + { + "type": "scale", + "scale": [ + 1.0, + 1.0, + 2.0, + 2.0, + 2.0 + ], + "input": "2", + "output": "intrinsic" + } + ] + } + ], + "coordinateTransformations": [ + { + "type": "scale", + "scale": [ + 0.1, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "input": "world", + "output": "intrinsic" + } + ], + "type": "gaussian", + "metadata": { + "description": "the fields in metadata depend on the downscaling implementation. Here, the parameters passed to the skimage function are given", + "method": "skimage.transform.pyramid_gaussian", + "version": "0.16.1", + "args": "[true]", + "kwargs": { + "multichannel": true + } + } + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/strict/valid/image/multiscales_transformations.json b/tests/attributes/strict/valid/image/multiscales_transformations.json new file mode 100644 index 00000000..d35b5385 --- /dev/null +++ b/tests/attributes/strict/valid/image/multiscales_transformations.json @@ -0,0 +1,78 @@ +{ + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "world", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + }, + { + "name": "physical", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "physical" + } + ] + } + ], + "coordinateTransformations": [ + { + "scale": [ + 10, + 10 + ], + "type": "scale", + "input": "physical", + "output": "world" + } + ], + "name": "image_with_coordinateTransformations", + "type": "foo", + "metadata": { + "key": "value" + } + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_image.schema" + } + } +} \ No newline at end of file diff --git a/tests/attributes/strict/valid/plate/strict_acquisitions.json b/tests/attributes/strict/valid/plate/strict_acquisitions.json new file mode 100644 index 00000000..2dd5e665 --- /dev/null +++ b/tests/attributes/strict/valid/plate/strict_acquisitions.json @@ -0,0 +1,38 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "name": "0", + "maximumfieldcount": 1 + } + ], + "columns": [ + { + "name": "A" + } + ], + "name": "test plate", + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_plate.schema" + }, + "description": "Tests for the strict plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/strict/valid/plate/strict_no_acquisitions.json b/tests/attributes/strict/valid/plate/strict_no_acquisitions.json new file mode 100644 index 00000000..244c72ca --- /dev/null +++ b/tests/attributes/strict/valid/plate/strict_no_acquisitions.json @@ -0,0 +1,31 @@ +{ + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "name": "test plate", + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_plate.schema" + }, + "description": "Tests for the strict plate JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/strict/valid/well/strict_acquisitions.json b/tests/attributes/strict/valid/well/strict_acquisitions.json new file mode 100644 index 00000000..b7bfc2b7 --- /dev/null +++ b/tests/attributes/strict/valid/well/strict_acquisitions.json @@ -0,0 +1,19 @@ +{ + "ome": { + "version": "0.6.dev2", + "well": { + "images": [ + { + "acquisition": 0, + "path": "0" + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_well.schema" + }, + "description": "Tests for the strict well JSON schema: " + } +} \ No newline at end of file diff --git a/tests/attributes/strict/valid/well/strict_no_acquisitions.json b/tests/attributes/strict/valid/well/strict_no_acquisitions.json new file mode 100644 index 00000000..14dd1d64 --- /dev/null +++ b/tests/attributes/strict/valid/well/strict_no_acquisitions.json @@ -0,0 +1,18 @@ +{ + "ome": { + "version": "0.6.dev2", + "well": { + "images": [ + { + "path": "0" + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_well.schema" + }, + "description": "Tests for the strict well JSON schema: " + } +} \ No newline at end of file diff --git a/tests/test_validation.py b/tests/test_validation.py index 9e58172d..b4d397e6 100644 --- a/tests/test_validation.py +++ b/tests/test_validation.py @@ -19,8 +19,9 @@ GENERIC_SCHEMA = schema_store[ "https://ngff.openmicroscopy.org/0.6.dev2/schemas/ome_zarr.schema" ] - -print(schema_store) +GENERIC_STRICT_SCHEMA = schema_store[ + "https://ngff.openmicroscopy.org/0.6.dev2/schemas/strict_ome_zarr.schema" +] @dataclass @@ -57,63 +58,55 @@ def pytest_generate_tests(metafunc): styled JSON tests. Metadata in each test defines which schema is used and whether or not the block is considered valid. """ - if "suite" in metafunc.fixturenames: - suites: List[Schema] = [] - ids: List[str] = [] - schema_store = {} - for filename in glob.glob("ngff_spec/schemas/*.schema"): - with open(filename) as o: - schema = json.load(o) - schema_store[schema["$id"]] = schema - - # Validation - for filename in glob.glob("tests/*.json"): - with open(filename) as o: - suite = json.load(o) - schema = suite["schema"] - with open(schema["id"]) as f: - schema = json.load(f) - for test in suite["tests"]: - ids.append("validate_" + str(test["formerly"]).split("/")[-1][0:-5]) - suites.append(Suite(schema, test["data"], test["valid"])) - - # Examples - # TODO: Split examples into snippets (used for reference in spec) and - # complete examples (to be validated here) - # for config_filename in glob.glob("ngff_spec/examples/*/.config.json"): - # with open(config_filename) as o: - # data = json.load(o) - # schema = data["schema"] - # with open(schema) as f: - # schema = json.load(f) - # example_folder = os.path.dirname(config_filename) - # for filename in glob.glob(f"{example_folder}/*.json"): - # print(filename) - # with open(filename) as f: - # # Strip comments - # data = "".join( - # line for line in f if not line.lstrip().startswith("//") - # ) - # data = json.loads(data) - # data = data["attributes"] # Only validate the attributes object - # ids.append("example_" + str(filename).split("/")[-1][0:-5]) - # suites.append(Suite(schema, data, True)) # Assume true - - metafunc.parametrize("suite", suites, ids=ids, indirect=True) + if "suite" not in metafunc.fixturenames: + return + + suites: List[Suite] = [] + ids: List[str] = [] + + # Validation + for filename in glob.glob("tests/*.json"): + with open(filename) as o: + suite = json.load(o) + schema_path = suite["schema"] + with open(schema_path["id"]) as f: + schema = json.load(f) + for test in suite["tests"]: + ids.append("validate_" + str(test["formerly"]).split("/")[-1][0:-5]) + suites.append(Suite(schema, test["data"], test["valid"])) + + # Examples + for config_filename in glob.glob("examples/*/.config.json"): + with open(config_filename) as o: + data = json.load(o) + schema_path = data["schema"] + with open(schema_path) as f: + schema = json.load(f) + example_folder = os.path.dirname(config_filename) + for filename in glob.glob(f"{example_folder}/*.json"): + with open(filename) as f: + # Strip comments + data = "".join(line for line in f if not line.lstrip().startswith("//")) + data = json.loads(data) + data = data["attributes"] # Only validate the attributes object + ids.append("example_" + str(filename).split("/")[-1][0:-5]) + suites.append(Suite(schema, data, True)) # Assume true + + metafunc.parametrize("suite", suites, ids=ids, indirect=True) @pytest.fixture -def suite(request): +def suite(request) -> Suite: return request.param -def test_run(suite): +def test_run(suite: Suite): resolver = RefResolver.from_schema(suite.schema, store=schema_store) validator = Validator(suite.schema, resolver=resolver) suite.validate(validator) -def test_generic_run(suite): +def test_generic_run(suite: Suite): resolver = RefResolver.from_schema(GENERIC_SCHEMA, store=schema_store) validator = Validator(GENERIC_SCHEMA, resolver=resolver) suite.maybe_validate(validator) diff --git a/tests/zarr/spec/invalid/image/duplicate_axes.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/duplicate_axes.ome.zarr/zarr.json new file mode 100644 index 00000000..373da8a9 --- /dev/null +++ b/tests/zarr/spec/invalid/image/duplicate_axes.ome.zarr/zarr.json @@ -0,0 +1,51 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "x", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/duplicate_scale.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/duplicate_scale.ome.zarr/zarr.json new file mode 100644 index 00000000..bc5212bc --- /dev/null +++ b/tests/zarr/spec/invalid/image/duplicate_scale.ome.zarr/zarr.json @@ -0,0 +1,60 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + }, + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/empty_transformations.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/empty_transformations.ome.zarr/zarr.json new file mode 100644 index 00000000..1228edfe --- /dev/null +++ b/tests/zarr/spec/invalid/image/empty_transformations.ome.zarr/zarr.json @@ -0,0 +1,41 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/invalid_axes_count.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/invalid_axes_count.ome.zarr/zarr.json new file mode 100644 index 00000000..b27e9e7e --- /dev/null +++ b/tests/zarr/spec/invalid/image/invalid_axes_count.ome.zarr/zarr.json @@ -0,0 +1,46 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/invalid_axis_type.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/invalid_axis_type.ome.zarr/zarr.json new file mode 100644 index 00000000..17df1d79 --- /dev/null +++ b/tests/zarr/spec/invalid/image/invalid_axis_type.ome.zarr/zarr.json @@ -0,0 +1,51 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "invalid", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/invalid_channels_color.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/invalid_channels_color.ome.zarr/zarr.json new file mode 100644 index 00000000..82614d3a --- /dev/null +++ b/tests/zarr/spec/invalid/image/invalid_channels_color.ome.zarr/zarr.json @@ -0,0 +1,68 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ], + "omero": { + "channels": [ + { + "active": true, + "coefficient": 1.0, + "color": 255, + "family": "linear", + "label": "1234", + "window": { + "end": 1765.0, + "max": 2555.0, + "min": 5.0, + "start": 0.0 + } + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/invalid_channels_window.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/invalid_channels_window.ome.zarr/zarr.json new file mode 100644 index 00000000..b3445ac5 --- /dev/null +++ b/tests/zarr/spec/invalid/image/invalid_channels_window.ome.zarr/zarr.json @@ -0,0 +1,68 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ], + "omero": { + "channels": [ + { + "active": true, + "coefficient": 1.0, + "color": "ff0000", + "family": "linear", + "label": "1234", + "window": { + "end": "100", + "max": 2555.0, + "min": 5.0, + "start": 0.0 + } + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/invalid_multiscales_transformations.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/invalid_multiscales_transformations.ome.zarr/zarr.json new file mode 100644 index 00000000..78c9a82f --- /dev/null +++ b/tests/zarr/spec/invalid/image/invalid_multiscales_transformations.ome.zarr/zarr.json @@ -0,0 +1,59 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ], + "coordinateTransformations": [ + { + "scale": [ + "invalid" + ], + "type": "scale" + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/invalid_path.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/invalid_path.ome.zarr/zarr.json new file mode 100644 index 00000000..1334dbe8 --- /dev/null +++ b/tests/zarr/spec/invalid/image/invalid_path.ome.zarr/zarr.json @@ -0,0 +1,51 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": 0, + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": 0, + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/invalid_transformation_type.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/invalid_transformation_type.ome.zarr/zarr.json new file mode 100644 index 00000000..4c3881d3 --- /dev/null +++ b/tests/zarr/spec/invalid/image/invalid_transformation_type.ome.zarr/zarr.json @@ -0,0 +1,51 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "translation", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/missing_axes.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/missing_axes.ome.zarr/zarr.json new file mode 100644 index 00000000..28765265 --- /dev/null +++ b/tests/zarr/spec/invalid/image/missing_axes.ome.zarr/zarr.json @@ -0,0 +1,34 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/missing_axes_name.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/missing_axes_name.ome.zarr/zarr.json new file mode 100644 index 00000000..a45f3476 --- /dev/null +++ b/tests/zarr/spec/invalid/image/missing_axes_name.ome.zarr/zarr.json @@ -0,0 +1,49 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "type": "space", + "unit": "micrometer" + }, + { + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 0.13, + 0.13 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/missing_datasets.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/missing_datasets.ome.zarr/zarr.json new file mode 100644 index 00000000..f953b07e --- /dev/null +++ b/tests/zarr/spec/invalid/image/missing_datasets.ome.zarr/zarr.json @@ -0,0 +1,35 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/missing_path.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/missing_path.ome.zarr/zarr.json new file mode 100644 index 00000000..dd891800 --- /dev/null +++ b/tests/zarr/spec/invalid/image/missing_path.ome.zarr/zarr.json @@ -0,0 +1,50 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/missing_scale.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/missing_scale.ome.zarr/zarr.json new file mode 100644 index 00000000..222c48be --- /dev/null +++ b/tests/zarr/spec/invalid/image/missing_scale.ome.zarr/zarr.json @@ -0,0 +1,51 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "translation": [ + 1, + 1 + ], + "type": "translation", + "input": "0", + "output": "intrinsice" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/missing_space_axes.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/missing_space_axes.ome.zarr/zarr.json new file mode 100644 index 00000000..69b41b79 --- /dev/null +++ b/tests/zarr/spec/invalid/image/missing_space_axes.ome.zarr/zarr.json @@ -0,0 +1,49 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "t", + "type": "time" + }, + { + "name": "c", + "type": "channel" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/missing_transformations.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/missing_transformations.ome.zarr/zarr.json new file mode 100644 index 00000000..6d00314b --- /dev/null +++ b/tests/zarr/spec/invalid/image/missing_transformations.ome.zarr/zarr.json @@ -0,0 +1,40 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0" + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/no_axes.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/no_axes.ome.zarr/zarr.json new file mode 100644 index 00000000..9b6c0487 --- /dev/null +++ b/tests/zarr/spec/invalid/image/no_axes.ome.zarr/zarr.json @@ -0,0 +1,35 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "axes": [], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/no_datasets.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/no_datasets.ome.zarr/zarr.json new file mode 100644 index 00000000..c5933e79 --- /dev/null +++ b/tests/zarr/spec/invalid/image/no_datasets.ome.zarr/zarr.json @@ -0,0 +1,36 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/no_multiscales.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/no_multiscales.ome.zarr/zarr.json new file mode 100644 index 00000000..98076bfd --- /dev/null +++ b/tests/zarr/spec/invalid/image/no_multiscales.ome.zarr/zarr.json @@ -0,0 +1,15 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/one_space_axes.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/one_space_axes.ome.zarr/zarr.json new file mode 100644 index 00000000..a001b1ad --- /dev/null +++ b/tests/zarr/spec/invalid/image/one_space_axes.ome.zarr/zarr.json @@ -0,0 +1,54 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "t", + "type": "time" + }, + { + "name": "c", + "type": "channel" + }, + { + "name": "x", + "type": "space" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/too_many_axes.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/too_many_axes.ome.zarr/zarr.json new file mode 100644 index 00000000..e4cb9d91 --- /dev/null +++ b/tests/zarr/spec/invalid/image/too_many_axes.ome.zarr/zarr.json @@ -0,0 +1,69 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "angle", + "type": "custom" + }, + { + "name": "t", + "type": "time" + }, + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space" + }, + { + "name": "y", + "type": "space" + }, + { + "name": "x", + "type": "space" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1, + 1, + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/image/too_many_space_axes.ome.zarr/zarr.json b/tests/zarr/spec/invalid/image/too_many_space_axes.ome.zarr/zarr.json new file mode 100644 index 00000000..3cb03547 --- /dev/null +++ b/tests/zarr/spec/invalid/image/too_many_space_axes.ome.zarr/zarr.json @@ -0,0 +1,59 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "X", + "type": "space" + }, + { + "name": "z", + "type": "space" + }, + { + "name": "y", + "type": "space" + }, + { + "name": "x", + "type": "space" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/label/colors_duplicate.ome.zarr/zarr.json b/tests/zarr/spec/invalid/label/colors_duplicate.ome.zarr/zarr.json new file mode 100644 index 00000000..e580c7e9 --- /dev/null +++ b/tests/zarr/spec/invalid/label/colors_duplicate.ome.zarr/zarr.json @@ -0,0 +1,37 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [ + { + "label-value": 1, + "rgba": [ + 0, + 0, + 0, + 0 + ] + }, + { + "label-value": 1, + "rgba": [ + 0, + 0, + 0, + 0 + ] + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/label/colors_no_label_value.ome.zarr/zarr.json b/tests/zarr/spec/invalid/label/colors_no_label_value.ome.zarr/zarr.json new file mode 100644 index 00000000..ac684ebc --- /dev/null +++ b/tests/zarr/spec/invalid/label/colors_no_label_value.ome.zarr/zarr.json @@ -0,0 +1,27 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [ + { + "rgba": [ + 0, + 0, + 0, + 0 + ] + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/label/colors_rgba_length.ome.zarr/zarr.json b/tests/zarr/spec/invalid/label/colors_rgba_length.ome.zarr/zarr.json new file mode 100644 index 00000000..82421adb --- /dev/null +++ b/tests/zarr/spec/invalid/label/colors_rgba_length.ome.zarr/zarr.json @@ -0,0 +1,27 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [ + { + "label-value": 1, + "rgba": [ + 0, + 0, + 0 + ] + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/label/colors_rgba_type.ome.zarr/zarr.json b/tests/zarr/spec/invalid/label/colors_rgba_type.ome.zarr/zarr.json new file mode 100644 index 00000000..6daea791 --- /dev/null +++ b/tests/zarr/spec/invalid/label/colors_rgba_type.ome.zarr/zarr.json @@ -0,0 +1,28 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [ + { + "label-value": 1, + "rgba": [ + 0, + 0, + 0, + 500 + ] + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/label/empty_colors.ome.zarr/zarr.json b/tests/zarr/spec/invalid/label/empty_colors.ome.zarr/zarr.json new file mode 100644 index 00000000..7b0f1c7c --- /dev/null +++ b/tests/zarr/spec/invalid/label/empty_colors.ome.zarr/zarr.json @@ -0,0 +1,18 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/label/empty_properties.ome.zarr/zarr.json b/tests/zarr/spec/invalid/label/empty_properties.ome.zarr/zarr.json new file mode 100644 index 00000000..c3fe5fa5 --- /dev/null +++ b/tests/zarr/spec/invalid/label/empty_properties.ome.zarr/zarr.json @@ -0,0 +1,18 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "image-label": { + "properties": [] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/label/properties_no_label_value.ome.zarr/zarr.json b/tests/zarr/spec/invalid/label/properties_no_label_value.ome.zarr/zarr.json new file mode 100644 index 00000000..c2b26f5e --- /dev/null +++ b/tests/zarr/spec/invalid/label/properties_no_label_value.ome.zarr/zarr.json @@ -0,0 +1,22 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "image-label": { + "properties": [ + { + "value": "foo" + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/acquisition_negative_starttime.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/acquisition_negative_starttime.ome.zarr/zarr.json new file mode 100644 index 00000000..68255088 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/acquisition_negative_starttime.ome.zarr/zarr.json @@ -0,0 +1,40 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "starttime": -1 + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/acquisition_noninteger_endtime.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/acquisition_noninteger_endtime.ome.zarr/zarr.json new file mode 100644 index 00000000..613686fe --- /dev/null +++ b/tests/zarr/spec/invalid/plate/acquisition_noninteger_endtime.ome.zarr/zarr.json @@ -0,0 +1,40 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "endtime": "2022-05-13T13:48:06+00:00" + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/acquisition_noninteger_starttime.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/acquisition_noninteger_starttime.ome.zarr/zarr.json new file mode 100644 index 00000000..2d7e07db --- /dev/null +++ b/tests/zarr/spec/invalid/plate/acquisition_noninteger_starttime.ome.zarr/zarr.json @@ -0,0 +1,40 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "starttime": "2022-05-13T13:48:06+00:00" + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/acquisition_zero_maximumfieldcount.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/acquisition_zero_maximumfieldcount.ome.zarr/zarr.json new file mode 100644 index 00000000..44f8a3a1 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/acquisition_zero_maximumfieldcount.ome.zarr/zarr.json @@ -0,0 +1,40 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "maximumfieldcount": 0 + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/duplicate_columns.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/duplicate_columns.ome.zarr/zarr.json new file mode 100644 index 00000000..8e9423a9 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/duplicate_columns.ome.zarr/zarr.json @@ -0,0 +1,37 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + }, + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/duplicate_rows-2.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/duplicate_rows-2.ome.zarr/zarr.json new file mode 100644 index 00000000..10e4e463 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/duplicate_rows-2.ome.zarr/zarr.json @@ -0,0 +1,42 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + }, + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + }, + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/duplicate_rows.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/duplicate_rows.ome.zarr/zarr.json new file mode 100644 index 00000000..e0cf6172 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/duplicate_rows.ome.zarr/zarr.json @@ -0,0 +1,37 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + }, + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/empty_columns.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/empty_columns.ome.zarr/zarr.json new file mode 100644 index 00000000..cffc2635 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/empty_columns.ome.zarr/zarr.json @@ -0,0 +1,30 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/empty_rows.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/empty_rows.ome.zarr/zarr.json new file mode 100644 index 00000000..541d026b --- /dev/null +++ b/tests/zarr/spec/invalid/plate/empty_rows.ome.zarr/zarr.json @@ -0,0 +1,30 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/empty_wells.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/empty_wells.ome.zarr/zarr.json new file mode 100644 index 00000000..10f18c4b --- /dev/null +++ b/tests/zarr/spec/invalid/plate/empty_wells.ome.zarr/zarr.json @@ -0,0 +1,28 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": {} + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/missing_acquisition_id.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/missing_acquisition_id.ome.zarr/zarr.json new file mode 100644 index 00000000..215ee058 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/missing_acquisition_id.ome.zarr/zarr.json @@ -0,0 +1,39 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "maximumfieldcount": 1 + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/missing_column_name.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/missing_column_name.ome.zarr/zarr.json new file mode 100644 index 00000000..4f63461d --- /dev/null +++ b/tests/zarr/spec/invalid/plate/missing_column_name.ome.zarr/zarr.json @@ -0,0 +1,34 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "concentration": 10 + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/missing_columns.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/missing_columns.ome.zarr/zarr.json new file mode 100644 index 00000000..65478951 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/missing_columns.ome.zarr/zarr.json @@ -0,0 +1,29 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/missing_row_name.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/missing_row_name.ome.zarr/zarr.json new file mode 100644 index 00000000..dfdd53c0 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/missing_row_name.ome.zarr/zarr.json @@ -0,0 +1,34 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "concentration": 10 + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/missing_rows.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/missing_rows.ome.zarr/zarr.json new file mode 100644 index 00000000..1913f1e5 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/missing_rows.ome.zarr/zarr.json @@ -0,0 +1,29 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/missing_well_columnIndex.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/missing_well_columnIndex.ome.zarr/zarr.json new file mode 100644 index 00000000..56c1e029 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/missing_well_columnIndex.ome.zarr/zarr.json @@ -0,0 +1,33 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/missing_well_path.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/missing_well_path.ome.zarr/zarr.json new file mode 100644 index 00000000..6767fd58 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/missing_well_path.ome.zarr/zarr.json @@ -0,0 +1,33 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/missing_well_rowIndex.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/missing_well_rowIndex.ome.zarr/zarr.json new file mode 100644 index 00000000..96195382 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/missing_well_rowIndex.ome.zarr/zarr.json @@ -0,0 +1,33 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/missing_wells.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/missing_wells.ome.zarr/zarr.json new file mode 100644 index 00000000..87dd5064 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/missing_wells.ome.zarr/zarr.json @@ -0,0 +1,27 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/negative_acquisition_id.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/negative_acquisition_id.ome.zarr/zarr.json new file mode 100644 index 00000000..c7ca30a6 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/negative_acquisition_id.ome.zarr/zarr.json @@ -0,0 +1,39 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": -1 + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/negative_endtime.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/negative_endtime.ome.zarr/zarr.json new file mode 100644 index 00000000..3da3c8ab --- /dev/null +++ b/tests/zarr/spec/invalid/plate/negative_endtime.ome.zarr/zarr.json @@ -0,0 +1,40 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "endtime": -1 + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/non_alphanumeric_column.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/non_alphanumeric_column.ome.zarr/zarr.json new file mode 100644 index 00000000..95b6341c --- /dev/null +++ b/tests/zarr/spec/invalid/plate/non_alphanumeric_column.ome.zarr/zarr.json @@ -0,0 +1,34 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A-1" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A-1/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/non_integer_acquisition_id.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/non_integer_acquisition_id.ome.zarr/zarr.json new file mode 100644 index 00000000..ad800b30 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/non_integer_acquisition_id.ome.zarr/zarr.json @@ -0,0 +1,39 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": "0" + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/non_integer_acquisition_maximumfieldcount.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/non_integer_acquisition_maximumfieldcount.ome.zarr/zarr.json new file mode 100644 index 00000000..f9200d08 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/non_integer_acquisition_maximumfieldcount.ome.zarr/zarr.json @@ -0,0 +1,40 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "maximumfieldcount": "0" + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/well_1group.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/well_1group.ome.zarr/zarr.json new file mode 100644 index 00000000..5006e221 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/well_1group.ome.zarr/zarr.json @@ -0,0 +1,33 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A1", + "rowIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/well_3groups.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/well_3groups.ome.zarr/zarr.json new file mode 100644 index 00000000..fda1f9e2 --- /dev/null +++ b/tests/zarr/spec/invalid/plate/well_3groups.ome.zarr/zarr.json @@ -0,0 +1,33 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "plate/A/1", + "rowIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/plate/zero_field_count.ome.zarr/zarr.json b/tests/zarr/spec/invalid/plate/zero_field_count.ome.zarr/zarr.json new file mode 100644 index 00000000..181bd03c --- /dev/null +++ b/tests/zarr/spec/invalid/plate/zero_field_count.ome.zarr/zarr.json @@ -0,0 +1,35 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "field_count": 0, + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/well/duplicate_images.ome.zarr/zarr.json b/tests/zarr/spec/invalid/well/duplicate_images.ome.zarr/zarr.json new file mode 100644 index 00000000..70740497 --- /dev/null +++ b/tests/zarr/spec/invalid/well/duplicate_images.ome.zarr/zarr.json @@ -0,0 +1,22 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "well": { + "images": [ + { + "path": "0" + }, + { + "path": "0" + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/well.schema" + }, + "description": "Tests for the well JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/well/empty_images.ome.zarr/zarr.json b/tests/zarr/spec/invalid/well/empty_images.ome.zarr/zarr.json new file mode 100644 index 00000000..9c63088e --- /dev/null +++ b/tests/zarr/spec/invalid/well/empty_images.ome.zarr/zarr.json @@ -0,0 +1,15 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "well": { + "images": [] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/well.schema" + }, + "description": "Tests for the well JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/invalid/well/non_integer_acquisition_id.ome.zarr/zarr.json b/tests/zarr/spec/invalid/well/non_integer_acquisition_id.ome.zarr/zarr.json new file mode 100644 index 00000000..e022b5af --- /dev/null +++ b/tests/zarr/spec/invalid/well/non_integer_acquisition_id.ome.zarr/zarr.json @@ -0,0 +1,20 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "well": { + "images": [ + { + "acquisition": "0", + "path": "0" + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/well.schema" + }, + "description": "Tests for the well JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/valid/image/custom_type_axes.ome.zarr/zarr.json b/tests/zarr/spec/valid/image/custom_type_axes.ome.zarr/zarr.json new file mode 100644 index 00000000..a3bcc242 --- /dev/null +++ b/tests/zarr/spec/valid/image/custom_type_axes.ome.zarr/zarr.json @@ -0,0 +1,56 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "angle", + "type": "custom" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1 + ], + "input": "0", + "output": "intrinsic", + "type": "scale" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/valid/image/invalid_axis_units.ome.zarr/zarr.json b/tests/zarr/spec/valid/image/invalid_axis_units.ome.zarr/zarr.json new file mode 100644 index 00000000..a1844c60 --- /dev/null +++ b/tests/zarr/spec/valid/image/invalid_axis_units.ome.zarr/zarr.json @@ -0,0 +1,51 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micron" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 0.13, + 0.13 + ], + "input": "0", + "output": "intrinsic", + "type": "scale" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/valid/image/mismatch_axes_units.ome.zarr/zarr.json b/tests/zarr/spec/valid/image/mismatch_axes_units.ome.zarr/zarr.json new file mode 100644 index 00000000..be93ede7 --- /dev/null +++ b/tests/zarr/spec/valid/image/mismatch_axes_units.ome.zarr/zarr.json @@ -0,0 +1,56 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "t", + "type": "time", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 0.13, + 0.13 + ], + "type": "scale", + "input": "0", + "output": "intrinsic" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/valid/image/missing_name.ome.zarr/zarr.json b/tests/zarr/spec/valid/image/missing_name.ome.zarr/zarr.json new file mode 100644 index 00000000..39213aac --- /dev/null +++ b/tests/zarr/spec/valid/image/missing_name.ome.zarr/zarr.json @@ -0,0 +1,63 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "datasets": [ + { + "path": "path/to/0", + "coordinateTransformations": [ + { + "type": "scale", + "scale": [ + 1, + 1 + ], + "input": "path/to/0", + "output": "intrinsic" + } + ] + } + ], + "type": "gaussian", + "metadata": { + "method": "skimage.transform.pyramid_gaussian", + "version": "0.16.1", + "args": [ + "true", + "false" + ], + "kwargs": { + "multichannel": true + } + }, + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/valid/image/untyped_axes.ome.zarr/zarr.json b/tests/zarr/spec/valid/image/untyped_axes.ome.zarr/zarr.json new file mode 100644 index 00000000..19992184 --- /dev/null +++ b/tests/zarr/spec/valid/image/untyped_axes.ome.zarr/zarr.json @@ -0,0 +1,55 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "intrinsic", + "axes": [ + { + "name": "angle" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1 + ], + "input": "0", + "output": "intrinsic", + "type": "scale" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/valid/label/minimal.ome.zarr/zarr.json b/tests/zarr/spec/valid/label/minimal.ome.zarr/zarr.json new file mode 100644 index 00000000..350501f1 --- /dev/null +++ b/tests/zarr/spec/valid/label/minimal.ome.zarr/zarr.json @@ -0,0 +1,28 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [ + { + "label-value": 1, + "rgba": [ + 0, + 0, + 0, + 0 + ] + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/valid/label/minimal_properties.ome.zarr/zarr.json b/tests/zarr/spec/valid/label/minimal_properties.ome.zarr/zarr.json new file mode 100644 index 00000000..a811d322 --- /dev/null +++ b/tests/zarr/spec/valid/label/minimal_properties.ome.zarr/zarr.json @@ -0,0 +1,33 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "image-label": { + "colors": [ + { + "label-value": 1, + "rgba": [ + 0, + 0, + 0, + 0 + ] + } + ], + "properties": [ + { + "label-value": 1 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/label.schema" + }, + "description": "Tests for the image-label JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/valid/plate/minimal_acquisitions.ome.zarr/zarr.json b/tests/zarr/spec/valid/plate/minimal_acquisitions.ome.zarr/zarr.json new file mode 100644 index 00000000..b94bdcbb --- /dev/null +++ b/tests/zarr/spec/valid/plate/minimal_acquisitions.ome.zarr/zarr.json @@ -0,0 +1,39 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0 + } + ], + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/valid/plate/minimal_no_acquisitions.ome.zarr/zarr.json b/tests/zarr/spec/valid/plate/minimal_no_acquisitions.ome.zarr/zarr.json new file mode 100644 index 00000000..9347dda4 --- /dev/null +++ b/tests/zarr/spec/valid/plate/minimal_no_acquisitions.ome.zarr/zarr.json @@ -0,0 +1,34 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/valid/plate/non_alphanumeric_row.ome.zarr/zarr.json b/tests/zarr/spec/valid/plate/non_alphanumeric_row.ome.zarr/zarr.json new file mode 100644 index 00000000..0b26eefd --- /dev/null +++ b/tests/zarr/spec/valid/plate/non_alphanumeric_row.ome.zarr/zarr.json @@ -0,0 +1,34 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "A1" + } + ], + "wells": [ + { + "path": "A/A1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/plate.schema" + }, + "description": "Tests for the plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/valid/well/minimal_acquisitions.ome.zarr/zarr.json b/tests/zarr/spec/valid/well/minimal_acquisitions.ome.zarr/zarr.json new file mode 100644 index 00000000..e220667d --- /dev/null +++ b/tests/zarr/spec/valid/well/minimal_acquisitions.ome.zarr/zarr.json @@ -0,0 +1,23 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "well": { + "images": [ + { + "acquisition": 1, + "path": "0" + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/well.schema" + }, + "description": "Tests for the well JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/spec/valid/well/minimal_no_acquisition.ome.zarr/zarr.json b/tests/zarr/spec/valid/well/minimal_no_acquisition.ome.zarr/zarr.json new file mode 100644 index 00000000..6c133f40 --- /dev/null +++ b/tests/zarr/spec/valid/well/minimal_no_acquisition.ome.zarr/zarr.json @@ -0,0 +1,22 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "well": { + "images": [ + { + "path": "0" + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/well.schema" + }, + "description": "Tests for the well JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/invalid/label/no_colors.ome.zarr/zarr.json b/tests/zarr/strict/invalid/label/no_colors.ome.zarr/zarr.json new file mode 100644 index 00000000..beebc703 --- /dev/null +++ b/tests/zarr/strict/invalid/label/no_colors.ome.zarr/zarr.json @@ -0,0 +1,16 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "image-label": {} + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_label.schema" + }, + "description": "Tests for the strict image-label JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/invalid/plate/missing_acquisition_maximumfieldcount.ome.zarr/zarr.json b/tests/zarr/strict/invalid/plate/missing_acquisition_maximumfieldcount.ome.zarr/zarr.json new file mode 100644 index 00000000..8e56907a --- /dev/null +++ b/tests/zarr/strict/invalid/plate/missing_acquisition_maximumfieldcount.ome.zarr/zarr.json @@ -0,0 +1,41 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "name": "0" + } + ], + "columns": [ + { + "name": "A" + } + ], + "name": "test plate", + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_plate.schema" + }, + "description": "Tests for the strict plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/invalid/plate/missing_acquisition_name.ome.zarr/zarr.json b/tests/zarr/strict/invalid/plate/missing_acquisition_name.ome.zarr/zarr.json new file mode 100644 index 00000000..476b89c4 --- /dev/null +++ b/tests/zarr/strict/invalid/plate/missing_acquisition_name.ome.zarr/zarr.json @@ -0,0 +1,41 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "maximumfieldcount": 1 + } + ], + "columns": [ + { + "name": "A" + } + ], + "name": "test plate", + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_plate.schema" + }, + "description": "Tests for the strict plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/invalid/plate/missing_name.ome.zarr/zarr.json b/tests/zarr/strict/invalid/plate/missing_name.ome.zarr/zarr.json new file mode 100644 index 00000000..bdd83997 --- /dev/null +++ b/tests/zarr/strict/invalid/plate/missing_name.ome.zarr/zarr.json @@ -0,0 +1,34 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_plate.schema" + }, + "description": "Tests for the strict plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/valid/image/image.ome.zarr/zarr.json b/tests/zarr/strict/valid/image/image.ome.zarr/zarr.json new file mode 100644 index 00000000..9e7434b2 --- /dev/null +++ b/tests/zarr/strict/valid/image/image.ome.zarr/zarr.json @@ -0,0 +1,56 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "physical", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "physical" + } + ] + } + ], + "name": "simple_image", + "type": "foo", + "metadata": { + "key": "value" + } + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/valid/image/image_metadata.ome.zarr/zarr.json b/tests/zarr/strict/valid/image/image_metadata.ome.zarr/zarr.json new file mode 100644 index 00000000..0f621b9c --- /dev/null +++ b/tests/zarr/strict/valid/image/image_metadata.ome.zarr/zarr.json @@ -0,0 +1,67 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "@id": "top", + "@type": "ngff:Image", + "multiscales": [ + { + "@id": "inner", + "name": "example", + "datasets": [ + { + "path": "path/to/0", + "coordinateTransformations": [ + { + "type": "scale", + "scale": [ + 1, + 1 + ], + "input": "path/to/0", + "output": "physical" + } + ] + } + ], + "type": "gaussian", + "metadata": { + "method": "skimage.transform.pyramid_gaussian", + "version": "0.16.1", + "args": [ + "true", + "false" + ], + "kwargs": { + "multichannel": true + } + }, + "coordinateSystems": [ + { + "name": "physical", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ] + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/valid/image/image_omero.ome.zarr/zarr.json b/tests/zarr/strict/valid/image/image_omero.ome.zarr/zarr.json new file mode 100644 index 00000000..ccc9a24e --- /dev/null +++ b/tests/zarr/strict/valid/image/image_omero.ome.zarr/zarr.json @@ -0,0 +1,170 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "world", + "axes": [ + { + "name": "t", + "type": "time" + }, + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + }, + { + "name": "physical", + "axes": [ + { + "name": "t", + "type": "time" + }, + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 0.5, + 0.13, + 0.13 + ], + "type": "scale", + "input": "0", + "output": "physical" + } + ] + }, + { + "path": "1", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1, + 1, + 0.26, + 0.26 + ], + "type": "scale", + "input": "1", + "output": "physical" + } + ] + } + ], + "coordinateTransformations": [ + { + "translation": [ + 0, + 9, + 0.5, + 25.74, + 21.58 + ], + "type": "translation", + "input": "intrinsic", + "output": "world" + } + ], + "name": "image_with_omero_metadata", + "type": "foo", + "metadata": { + "key": "value" + } + } + ], + "omero": { + "channels": [ + { + "active": true, + "coefficient": 1.0, + "color": "00FF00", + "family": "linear", + "inverted": false, + "label": "FITC", + "window": { + "end": 813.0, + "max": 870.0, + "min": 102.0, + "start": 82.0 + } + }, + { + "active": true, + "coefficient": 1.0, + "color": "FF0000", + "family": "linear", + "inverted": false, + "label": "RD-TR-PE", + "window": { + "end": 815.0, + "max": 441.0, + "min": 129.0, + "start": 78.0 + } + } + ], + "id": 1, + "rdefs": { + "defaultT": 0, + "defaultZ": 2, + "model": "color" + }, + "version": "0.6.dev2" + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/valid/image/multiscales_example.ome.zarr/zarr.json b/tests/zarr/strict/valid/image/multiscales_example.ome.zarr/zarr.json new file mode 100644 index 00000000..e0ba1ab0 --- /dev/null +++ b/tests/zarr/strict/valid/image/multiscales_example.ome.zarr/zarr.json @@ -0,0 +1,156 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "name": "example", + "coordinateSystems": [ + { + "name": "world", + "axes": [ + { + "name": "t", + "type": "time", + "unit": "millisecond" + }, + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + }, + { + "name": "intrinsic", + "axes": [ + { + "name": "t", + "type": "time", + "unit": "millisecond" + }, + { + "name": "c", + "type": "channel" + }, + { + "name": "z", + "type": "space", + "unit": "micrometer" + }, + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "type": "scale", + "scale": [ + 1.0, + 1.0, + 0.5, + 0.5, + 0.5 + ], + "input": "0", + "output": "intrinsic" + } + ] + }, + { + "path": "1", + "coordinateTransformations": [ + { + "type": "scale", + "scale": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "input": "1", + "output": "intrinsic" + } + ] + }, + { + "path": "2", + "coordinateTransformations": [ + { + "type": "scale", + "scale": [ + 1.0, + 1.0, + 2.0, + 2.0, + 2.0 + ], + "input": "2", + "output": "intrinsic" + } + ] + } + ], + "coordinateTransformations": [ + { + "type": "scale", + "scale": [ + 0.1, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "input": "world", + "output": "intrinsic" + } + ], + "type": "gaussian", + "metadata": { + "description": "the fields in metadata depend on the downscaling implementation. Here, the parameters passed to the skimage function are given", + "method": "skimage.transform.pyramid_gaussian", + "version": "0.16.1", + "args": "[true]", + "kwargs": { + "multichannel": true + } + } + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/valid/image/multiscales_transformations.ome.zarr/zarr.json b/tests/zarr/strict/valid/image/multiscales_transformations.ome.zarr/zarr.json new file mode 100644 index 00000000..77ca8c20 --- /dev/null +++ b/tests/zarr/strict/valid/image/multiscales_transformations.ome.zarr/zarr.json @@ -0,0 +1,82 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "multiscales": [ + { + "coordinateSystems": [ + { + "name": "world", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + }, + { + "name": "physical", + "axes": [ + { + "name": "y", + "type": "space", + "unit": "micrometer" + }, + { + "name": "x", + "type": "space", + "unit": "micrometer" + } + ] + } + ], + "datasets": [ + { + "path": "0", + "coordinateTransformations": [ + { + "scale": [ + 1, + 1 + ], + "type": "scale", + "input": "0", + "output": "physical" + } + ] + } + ], + "coordinateTransformations": [ + { + "scale": [ + 10, + 10 + ], + "type": "scale", + "input": "physical", + "output": "world" + } + ], + "name": "image_with_coordinateTransformations", + "type": "foo", + "metadata": { + "key": "value" + } + } + ] + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_image.schema" + } + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/valid/plate/strict_acquisitions.ome.zarr/zarr.json b/tests/zarr/strict/valid/plate/strict_acquisitions.ome.zarr/zarr.json new file mode 100644 index 00000000..2f758301 --- /dev/null +++ b/tests/zarr/strict/valid/plate/strict_acquisitions.ome.zarr/zarr.json @@ -0,0 +1,42 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "acquisitions": [ + { + "id": 0, + "name": "0", + "maximumfieldcount": 1 + } + ], + "columns": [ + { + "name": "A" + } + ], + "name": "test plate", + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_plate.schema" + }, + "description": "Tests for the strict plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/valid/plate/strict_no_acquisitions.ome.zarr/zarr.json b/tests/zarr/strict/valid/plate/strict_no_acquisitions.ome.zarr/zarr.json new file mode 100644 index 00000000..7ec27b78 --- /dev/null +++ b/tests/zarr/strict/valid/plate/strict_no_acquisitions.ome.zarr/zarr.json @@ -0,0 +1,35 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "plate": { + "columns": [ + { + "name": "A" + } + ], + "name": "test plate", + "rows": [ + { + "name": "1" + } + ], + "wells": [ + { + "path": "A/1", + "rowIndex": 0, + "columnIndex": 0 + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_plate.schema" + }, + "description": "Tests for the strict plate JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/valid/well/strict_acquisitions.ome.zarr/zarr.json b/tests/zarr/strict/valid/well/strict_acquisitions.ome.zarr/zarr.json new file mode 100644 index 00000000..2c7aac66 --- /dev/null +++ b/tests/zarr/strict/valid/well/strict_acquisitions.ome.zarr/zarr.json @@ -0,0 +1,23 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "well": { + "images": [ + { + "acquisition": 0, + "path": "0" + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_well.schema" + }, + "description": "Tests for the strict well JSON schema: " + } + } +} \ No newline at end of file diff --git a/tests/zarr/strict/valid/well/strict_no_acquisitions.ome.zarr/zarr.json b/tests/zarr/strict/valid/well/strict_no_acquisitions.ome.zarr/zarr.json new file mode 100644 index 00000000..af1742ba --- /dev/null +++ b/tests/zarr/strict/valid/well/strict_no_acquisitions.ome.zarr/zarr.json @@ -0,0 +1,22 @@ +{ + "zarr_format": 3, + "node_type": "group", + "attributes": { + "ome": { + "version": "0.6.dev2", + "well": { + "images": [ + { + "path": "0" + } + ] + } + }, + "_conformance": { + "schema": { + "id": "ngff_spec/schemas/strict_well.schema" + }, + "description": "Tests for the strict well JSON schema: " + } + } +} \ No newline at end of file