Skip to content

Commit

Permalink
Merge pull request #186 from will-moore/version_required
Browse files Browse the repository at this point in the history
Version required
  • Loading branch information
will-moore committed May 23, 2023
2 parents c46fe63 + f07f037 commit b7359aa
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 7 deletions.
4 changes: 2 additions & 2 deletions latest/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ Each "multiscales" dictionary MAY contain the field "coordinateTransformations",
The transformations MUST follow the same rules about allowed types, order, etc. as in "datasets:coordinateTransformations" and are applied after them.
They can for example be used to specify the `scale` for a dimension that is the same for all resolutions.

Each "multiscales" dictionary SHOULD contain the field "name". It SHOULD contain the field "version", which indicates the version of the multiscale metadata of this image (current version is [NGFFVERSION]).
Each "multiscales" dictionary SHOULD contain the field "name". It MUST contain the field "version", which indicates the version of the multiscale metadata of this image (current version is [NGFFVERSION]).

Each "multiscales" dictionary SHOULD contain the field "type", which gives the type of downscaling method used to generate the multiscale image pyramid.
It SHOULD contain the field "metadata", which contains a dictionary with additional information about the downscaling method.
Expand Down Expand Up @@ -492,7 +492,7 @@ contain only alphanumeric characters, MUST be case-sensitive, and MUST NOT be a
other `name` in the `rows` list. Care SHOULD be taken to avoid collisions on
case-insensitive filesystems (e.g. avoid using both `Aa` and `aA`).

The `plate` dictionary SHOULD contain a `version` key whose value MUST be a string specifying the
The `plate` dictionary MUST contain a `version` key whose value MUST be a string specifying the
version of the plate specification.

The `plate` dictionary MUST contain a `wells` key whose value MUST be a list of JSON objects
Expand Down
2 changes: 1 addition & 1 deletion latest/schemas/image.schema
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}
},
"required": [
"datasets", "axes"
"datasets", "axes", "version"
]
},
"minItems": 1,
Expand Down
2 changes: 1 addition & 1 deletion latest/schemas/plate.schema
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
}
},
"required": [
"columns", "rows", "wells"
"columns", "rows", "wells", "version"
]
}
}
Expand Down
41 changes: 39 additions & 2 deletions latest/tests/image_suite.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"valid": true
},
{
"formerly": "valid/missing_version.json",
"formerly": "invalid/missing_version.json",
"description": "TBD",
"data": {
"@type": "ngff:Image",
Expand Down Expand Up @@ -126,7 +126,7 @@
}
]
},
"valid": true
"valid": false
},
{
"formerly": "valid/invalid_axis_units.json",
Expand Down Expand Up @@ -857,6 +857,43 @@
},
"valid": false
},
{
"formerly": "invalid/missing_version.json",
"description": "TBD",
"data": {
"multiscales": [
{
"axes": [
{
"name": "y",
"type": "space",
"unit": "micrometer"
},
{
"name": "x",
"type": "space",
"unit": "micrometer"
}
],
"datasets": [
{
"path": "0",
"coordinateTransformations": [
{
"scale": [
1,
1
],
"type": "scale"
}
]
}
]
}
]
},
"valid": false
},
{
"formerly": "invalid/invalid_axis_type.json",
"description": "TBD",
Expand Down
57 changes: 56 additions & 1 deletion latest/tests/plate_suite.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"formerly": "plate/minimal_no_acquisitions",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand All @@ -33,6 +34,7 @@
"formerly": "plate/minimal_acquisitions",
"data": {
"plate": {
"version": "0.5-dev",
"acquisitions": [
{
"id": 0
Expand Down Expand Up @@ -63,6 +65,7 @@
"formerly": "plate/missing_rows",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand All @@ -83,6 +86,7 @@
"formerly": "plate/empty_rows",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand All @@ -104,6 +108,7 @@
"formerly": "plate/duplicate_rows",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand Down Expand Up @@ -131,6 +136,7 @@
{
"formerly": "plate/missing_columns",
"data": {
"version": "0.5-dev",
"plate": {
"rows": [
{
Expand All @@ -152,6 +158,7 @@
"formerly": "plate/empty_columns",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [],
"rows": [
{
Expand All @@ -173,6 +180,7 @@
"formerly": "plate/duplicate_columns",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand Down Expand Up @@ -201,6 +209,7 @@
"formerly": "plate/missing_wells",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand All @@ -219,6 +228,7 @@
"formerly": "plate/empty_wells",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand All @@ -238,6 +248,7 @@
"formerly": "plate/duplicate_rows",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand Down Expand Up @@ -271,6 +282,7 @@
"formerly": "plate/missing_column_name",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"concentration": 10
Expand All @@ -296,6 +308,7 @@
"formerly": "plate/missing_row_name",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand All @@ -321,6 +334,7 @@
"formerly": "plate/missing_well_path",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand All @@ -345,6 +359,7 @@
"formerly": "plate/missing_well_rowIndex",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand All @@ -369,6 +384,7 @@
"formerly": "plate/missing_well_columnIndex",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand All @@ -393,6 +409,7 @@
"formerly": "plate/well_1group",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand All @@ -417,6 +434,7 @@
"formerly": "plate/well_3groups",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand All @@ -441,6 +459,7 @@
"formerly": "plate/invalid_version",
"data": {
"plate": {
"version": "foo",
"columns": [
{
"name": "A"
Expand All @@ -457,8 +476,32 @@
"rowIndex": 0,
"columnIndex": 0
}
]
}
},
"valid": false
},
{
"formerly": "plate/missing_version",
"data": {
"plate": {
"columns": [
{
"name": "A"
}
],
"version": "foo"
"rows": [
{
"name": "1"
}
],
"wells": [
{
"path": "A/1",
"rowIndex": 0,
"columnIndex": 0
}
]
}
},
"valid": false
Expand All @@ -467,6 +510,7 @@
"formerly": "plate/non_alphanumeric_column",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A-1"
Expand All @@ -492,6 +536,7 @@
"formerly": "plate/non_alphanumeric_row",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand All @@ -517,6 +562,7 @@
"formerly": "plate/missing_acquisition_id",
"data": {
"plate": {
"version": "0.5-dev",
"acquisitions": [
{
"maximumfieldcount": 1
Expand Down Expand Up @@ -547,6 +593,7 @@
"formerly": "plate/non_integer_acquisition_id",
"data": {
"plate": {
"version": "0.5-dev",
"acquisitions": [
{
"id": "0"
Expand Down Expand Up @@ -577,6 +624,7 @@
"formerly": "plate/negative_acquisition_id",
"data": {
"plate": {
"version": "0.5-dev",
"acquisitions": [
{
"id": -1
Expand Down Expand Up @@ -607,6 +655,7 @@
"formerly": "plate/non_integer_acquisition_maximumfieldcount",
"data": {
"plate": {
"version": "0.5-dev",
"acquisitions": [
{
"id": 0,
Expand Down Expand Up @@ -638,6 +687,7 @@
"formerly": "plate/acquisition_zero_maximumfieldcount",
"data": {
"plate": {
"version": "0.5-dev",
"acquisitions": [
{
"id": 0,
Expand Down Expand Up @@ -669,6 +719,7 @@
"formerly": "plate/acquisition_noninteger_starttime",
"data": {
"plate": {
"version": "0.5-dev",
"acquisitions": [
{
"id": 0,
Expand Down Expand Up @@ -700,6 +751,7 @@
"formerly": "plate/acquisition_negative_starttime",
"data": {
"plate": {
"version": "0.5-dev",
"acquisitions": [
{
"id": 0,
Expand Down Expand Up @@ -731,6 +783,7 @@
"formerly": "plate/acquisition_noninteger_endtime",
"data": {
"plate": {
"version": "0.5-dev",
"acquisitions": [
{
"id": 0,
Expand Down Expand Up @@ -762,6 +815,7 @@
"formerly": "plate/negative_endtime",
"data": {
"plate": {
"version": "0.5-dev",
"acquisitions": [
{
"id": 0,
Expand Down Expand Up @@ -793,6 +847,7 @@
"formerly": "plate/zero_field_count",
"data": {
"plate": {
"version": "0.5-dev",
"columns": [
{
"name": "A"
Expand Down

0 comments on commit b7359aa

Please sign in to comment.