Skip to content

Commit 126bb66

Browse files
authored
Merge pull request ome#71 from jluethi/380_alphanumeric_well_images
Relax the allowed names of images in wells
2 parents ea5a6d8 + 95fe750 commit 126bb66

8 files changed

Lines changed: 97 additions & 2 deletions

File tree

index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,11 @@ The `well` object MUST contain an `images` key
15471547
whose value MUST be an array of JSON objects specifying all fields of views for a given well.
15481548
Each image object MUST contain a `path` key
15491549
whose value MUST be a string specifying the path to the field of view.
1550-
The `path` MUST contain only alphanumeric characters, MUST be case-sensitive, and MUST NOT be a duplicate of any other `path` in the `images` array.
1550+
The `path` MUST be case-sensitive, and MUST NOT be a duplicate of any other `path` in the `images` list.
1551+
The `path` MUST follow [Zarr node name naming conventions](https://github.com/zarr-developers/zarr-specs/blob/main/docs/v3/core/index.rst#node-names) including the recommended limitations of characters to ensure consistency across different storage systems and programming languages.
1552+
Specifically: The `path` MUST NOT consist only of periods (like `.` or `..`) or start with the reserved prefix `__`;
1553+
The `path` MUST NOT be an empty string and MUST NOT contain `/` characters;
1554+
The `path` MUST only use characters in the sets `a-z`, `A-Z`, `0-9`, `-`, `_`, `.`.
15511555
If multiple acquisitions were performed in the plate,
15521556
it MUST contain an `acquisition` key whose value MUST be an integer identifying the acquisition
15531557
which MUST match one of the acquisition JSON objects defined in the [plate metadata](#plate-md).

schemas/well.schema

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@
2525
"path": {
2626
"description": "The path for this field of view subgroup",
2727
"type": "string",
28-
"pattern": "^[A-Za-z0-9]+$"
28+
"minLength": 1,
29+
"pattern": "^[A-Za-z0-9_.-]+$",
30+
"not": {
31+
"anyOf": [
32+
{ "pattern": "^\\.+$" },
33+
{ "pattern": "^__" }
34+
]
35+
}
2936
}
3037
},
3138
"required": [
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"well": {
3+
"images": [
4+
{
5+
"path": "."
6+
}
7+
]
8+
},
9+
"_conformance": {
10+
"schema": {
11+
"id": "schemas/well.schema"
12+
},
13+
"description": "Tests for the well JSON schema: "
14+
}
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"well": {
3+
"images": [
4+
{
5+
"path": ".."
6+
}
7+
]
8+
},
9+
"_conformance": {
10+
"schema": {
11+
"id": "schemas/well.schema"
12+
},
13+
"description": "Tests for the well JSON schema: "
14+
}
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"well": {
3+
"images": [
4+
{
5+
"path": "__something"
6+
}
7+
]
8+
},
9+
"_conformance": {
10+
"schema": {
11+
"id": "schemas/well.schema"
12+
},
13+
"description": "Tests for the well JSON schema: "
14+
}
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"well": {
3+
"images": [
4+
{
5+
"path": "!@#$%^&*()+={}[]"
6+
}
7+
]
8+
},
9+
"_conformance": {
10+
"schema": {
11+
"id": "schemas/well.schema"
12+
},
13+
"description": "Tests for the well JSON schema: "
14+
}
15+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"ome": {
3+
"version": "0.6.dev2",
4+
"well": {
5+
"images": [
6+
{
7+
"path": "0_a-b.image"
8+
}
9+
]
10+
}
11+
},
12+
"_conformance": {
13+
"schema": {
14+
"id": "schemas/well.schema"
15+
},
16+
"description": "Tests for the well JSON schema: "
17+
}
18+
}

version_history.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ All notable changes to this project will be documented in this file.
88

99
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1010

11+
## [Unreleased]
12+
13+
### Changed
14+
15+
- Changed the constraints for valid `path` values in `wells` for HCS plates to allow some non-alphanumeric characters.
16+
1117
## [0.6.dev3] - 2025-01-27
1218

1319
### Changed

0 commit comments

Comments
 (0)