Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,8 @@ ngff-zarr upgrade src.zarr -o dst.zarr --to 0.5

The target version is selected with `--to` (alias `--version`), one of `0.4`,
`0.5`, `0.6`, or `0.9.dev1` (default `0.6`). `0.9.dev1` is the development
version that adopts RFC-3; OME publishes no JSON Schema for it yet, so
`--validate` cannot check a store at that version. Add `--validate` to validate
the source metadata against the NGFF schema while reading. For the write-to-new-store mode,
version that adopts RFC-3. Add `--validate` to validate the source metadata
against the NGFF schema while reading. For the write-to-new-store mode,
`--overwrite` (the default) replaces any pre-existing data at the output store,
while `--no-overwrite` refuses to; both flags are ignored for an in-place
upgrade, which never overwrites array data.
Expand Down
6 changes: 3 additions & 3 deletions docs/spec_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ supported by `ngff-zarr`.
and transformations.
- **OME-Zarr 0.9.dev1**: Reads and writes the development version that adopts
RFC-3, which extends support for the number, names, types and order
of axes. It is opt-in: pass `version="0.9.dev1"` explicitly. The default
target is unchanged, and OME publishes no JSON Schema for it yet, so schema
validation is unavailable at that version.
of axes. It is opt-in: pass `version="0.9.dev1"` explicitly, the default
target is unchanged. The schemas of the `0.9.dev1` release are bundled, so
`validate=True` checks a store at that version as it does at any other.

## High Content Screening (HCS)

Expand Down
7 changes: 4 additions & 3 deletions docs/validation/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ from ngff_zarr import (
`validate_structural(metadata, options=None, version=None)` runs the
image/multiscales rules. When `options` is `None` it uses `ValidateOptions()`,
i.e. `ValidationLevel.STRICT`. `version` is the OME-Zarr version the metadata
declares; the axis rules are inert for the versions that adopt the RFC-3 axis
model (see [[parity]]), so omitting it holds every store to the v0.4 axis
caps. A `ValidationError` carries `.rule` (a `SpecRule`),
declares; the axis count, type and order rules are inert for the versions that
adopt the RFC-3 axis model (see [[parity]]), so omitting it holds every store to
the v0.4 axis caps. `axis-names-unique` is never inert: RFC-3 states it and no
released schema carries it. A `ValidationError` carries `.rule` (a `SpecRule`),
`.message` (str), and `.location` (`str | None`); `str(exc)` is
`Spec rule [<rule>] violated: <message>`.

Expand Down
10 changes: 10 additions & 0 deletions py/ngff_zarr/spec/0.9/schemas/_version.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ngff.openmicroscopy.org/0.9.dev1/schemas/_version.schema",
"title": "OME-Zarr version",
"description": "OME-Zarr version.",
"type": "string",
"enum": [
"0.9.dev1"
]
}
46 changes: 46 additions & 0 deletions py/ngff_zarr/spec/0.9/schemas/axes.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ngff.openmicroscopy.org/0.9.dev1/schemas/axes.schema",
"title": "Axes",
"description": "OME-Zarr Axes.",
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"$ref": "#/$defs/axis"
},
"$defs": {
"axis": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Name of the axis. Must be unique within the coordinate system."
},
"longName": {
"type": "string",
"description": "Longer name or description of the axis."
},
"type": {
"type": "string",
"description": "Type of the axis. Can be a predefined type or custom type."
},
"discrete": {
"type": "boolean",
"description": "Whether the dimension is discrete"
},
"unit": {
"type": "string",
"description": "Unit for the axis"
},
"orientation": {
"$ref": "axis_orientation.schema"
}
},
"required": [
"name"
]
}
}
}
41 changes: 41 additions & 0 deletions py/ngff_zarr/spec/0.9/schemas/axis_orientation.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ngff.openmicroscopy.org/0.9.dev1/schemas/axis_orientation.schema",
"title": "Axis Orientation",
"description": "Controlled vocabulary for orientation of each spatial axis according to subject or subject-global reference.",
"type": "object",
"properties": {
"type": {
"enum": ["anatomical"]
},
"value": {
"enum": [
"left-to-right",
"right-to-left",
"anterior-to-posterior",
"posterior-to-anterior",
"inferior-to-superior",
"superior-to-inferior",
"dorsal-to-ventral",
"ventral-to-dorsal",
"dorsal-to-palmar",
"palmar-to-dorsal",
"dorsal-to-plantar",
"plantar-to-dorsal",
"rostral-to-caudal",
"caudal-to-rostral",
"cranial-to-caudal",
"caudal-to-cranial",
"proximal-to-distal",
"distal-to-proximal",
"superficial-to-deep",
"deep-to-superficial",
"apical-to-basal",
"basal-to-apical",
"apex-to-base",
"base-to-apex"
]
}
},
"required": ["type", "value"]
}
32 changes: 32 additions & 0 deletions py/ngff_zarr/spec/0.9/schemas/bf2raw.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ngff.openmicroscopy.org/0.9.dev1/schemas/bf2raw.schema",
"title": "bioformats2raw",
"description": "OME-Zarr bioformats2raw metadata.",
"type": "object",
"properties": {
"ome": {
"description": "The versioned OME-Zarr Metadata namespace",
"type": "object",
"properties": {
"bioformats2raw.layout": {
"description": "The top-level identifier metadata added by bioformats2raw",
"type": "number",
"enum": [
3
]
},
"version": {
"$ref": "https://ngff.openmicroscopy.org/0.9.dev1/schemas/_version.schema"
}
},
"required": [
"bioformats2raw.layout",
"version"
]
}
},
"required": [
"ome"
]
}
31 changes: 31 additions & 0 deletions py/ngff_zarr/spec/0.9/schemas/coordinate_systems.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ngff.openmicroscopy.org/0.9.dev1/schemas/coordinate_systems.schema",
"title": "Coordinate systems",
"description": "OME-Zarr coordinate system.",
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/$defs/coordinateSystem"
},
"$defs": {
"coordinateSystem": {
"description": "Coordinate Systems for OME-NGFF",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Name of coordinate system. Must be unique among all coordinate systems."
},
"axes": {
"$ref": "axes.schema"
}
},
"required": [
"name",
"axes"
]
}
}
}
Loading
Loading