Skip to content

Proposal: relax regex for well.images[].path to allow underscores? #433

@tlambert03

Description

@tlambert03

I can open a small RFC for this if there is no objection, but just wanted to ask around first.

Would there be immediate opposition to allowing underscores in the well.images[].path? (the name of a field of view in a well)

"pattern": "^[A-Za-z0-9_]+$" 

The well metadata spec currently reads:

The well dictionary MUST contain an images key whose value MUST be a list of JSON objects specifying all fields of views for a given well. Each image object MUST contain a path key whose value MUST be a string specifying the path to the field of view. The path MUST contain only alphanumeric characters, MUST be case-sensitive, and MUST NOT be a duplicate of any other path in the images list.

and in the schema here:

ngff/schemas/well.schema

Lines 25 to 28 in 8cbba21

"path": {
"description": "The path for this field of view subgroup",
"type": "string",
"pattern": "^[A-Za-z0-9]+$"

Dataset paths, by contrast, have no such restriction (though they too refer to a node in the zarr hierarchy):

"datasets": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"path": {
"type": "string"
},

Plate row/column names also have a similar restriction, though there it makes plenty of sense: one almost never encounters a row column that doesn't fall into the conventional "A", "1" ... type name.

But the name of an individual field of view in a well is a much more open-ended concept, and underscores are extremely commonly used in that sort of context, and universally filesyste-safe, url safe, S3/GCS/Azure safe.

thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions