generated from w3c-ccg/markdown-to-spec
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 0.4 schemas and examples #87
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f07a613
Add 0.4 schemas and examples
will-moore 1f584b0
ensure 'time' and 'space' axes have valid units
will-moore 78b1698
Require 'scale' or 'translation' transformation(s)
will-moore e92b6ef
Add new-lines to end of json examples
will-moore a434669
Rename to coordinateTransforms
will-moore eb2d997
Add example of dataset with missing scale element
sbesson b993d8b
Add containment requirement for scale element in coordinateTransforma…
sbesson df897f1
Merge pull request #1 from sbesson/scale_mandatory
will-moore 456afea
Add additional examples of valid/invalid axes
sbesson 6199e5c
Add requirement for 2/3 space axes via contains
sbesson cecafa8
Handle custom axes
sbesson ac87d92
Set axes maxItems to 5
sbesson 8a165d7
Add maxContains to coordinateTransformations to enforce only one scale
sbesson bd1618c
Move coordinateTransformations to
will-moore 3067dd9
Move axes into
will-moore 40a15df
duplicate_axes_name.json not invalid with schema
will-moore 95c20ed
Remove strict requirement for valid axis units
will-moore 36340be
Add uniqueItems to axes
will-moore 2459b15
validate multiscales:coordinateTransformations
will-moore File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ jobs: | |
- '0.1' | ||
- '0.2' | ||
- '0.3' | ||
- '0.4' | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"multiscales": [ | ||
{ | ||
"axes": [ | ||
{ | ||
"name": "x", | ||
"type": "space", | ||
"units": "micrometer" | ||
}, | ||
{ | ||
"name": "x", | ||
"type": "space", | ||
"units": "micrometer" | ||
} | ||
], | ||
"datasets": [ | ||
{ | ||
"path": "0", | ||
"coordinateTransformations": [ | ||
{ | ||
"scale": [ | ||
1, | ||
1 | ||
], | ||
"type": "scale" | ||
} | ||
] | ||
} | ||
], | ||
"version": "0.4" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"multiscales": [ | ||
{ | ||
"axes": [ | ||
{ | ||
"name": "y", | ||
"type": "space", | ||
"units": "micrometer" | ||
}, | ||
{ | ||
"name": "x", | ||
"type": "space", | ||
"units": "micrometer" | ||
} | ||
], | ||
"datasets": [ | ||
{ | ||
"path": "0", | ||
"coordinateTransformations": [ | ||
{ | ||
"scale": [ | ||
1, | ||
1 | ||
], | ||
"type": "scale" | ||
}, | ||
{ | ||
"scale": [ | ||
1, | ||
1 | ||
], | ||
"type": "scale" | ||
} | ||
] | ||
} | ||
], | ||
"version": "0.4" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"multiscales": [ | ||
{ | ||
"axes": [ | ||
{ | ||
"name": "y", | ||
"type": "space", | ||
"units": "micrometer" | ||
}, | ||
{ | ||
"name": "x", | ||
"type": "space", | ||
"units": "micrometer" | ||
} | ||
], | ||
"datasets": [ | ||
{ | ||
"path": "0", | ||
"coordinateTransformations": [] | ||
} | ||
], | ||
"version": "0.4" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"multiscales": [ | ||
{ | ||
"axes": [ | ||
{ | ||
"name": "y", | ||
"type": "space", | ||
"units": "micrometer" | ||
} | ||
], | ||
"datasets": [ | ||
{ | ||
"path": "0", | ||
"coordinateTransformations": [ | ||
{ | ||
"scale": [ | ||
1, | ||
1 | ||
], | ||
"type": "scale" | ||
} | ||
] | ||
} | ||
], | ||
"version": "0.4" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"multiscales": [ | ||
{ | ||
"axes": [ | ||
{ | ||
"name": "y", | ||
"type": "invalid", | ||
"units": "micrometer" | ||
}, | ||
{ | ||
"name": "x", | ||
"type": "space", | ||
"units": "micrometer" | ||
} | ||
], | ||
"datasets": [ | ||
{ | ||
"path": "0", | ||
"coordinateTransformations": [ | ||
{ | ||
"scale": [ | ||
1, | ||
1 | ||
], | ||
"type": "scale" | ||
} | ||
] | ||
} | ||
], | ||
"version": "0.4" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"multiscales": [ | ||
{ | ||
"axes": [ | ||
{ | ||
"name": "y", | ||
"type": "space", | ||
"units": "micrometer" | ||
}, | ||
{ | ||
"name": "x", | ||
"type": "space", | ||
"units": "micrometer" | ||
} | ||
], | ||
"datasets": [ | ||
{ | ||
"path": "0", | ||
"coordinateTransformations": [ | ||
{ | ||
"scale": [1, 1], | ||
"type": "scale" | ||
} | ||
] | ||
} | ||
], | ||
"version": "0.4" | ||
} | ||
], | ||
"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 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"multiscales": [ | ||
{ | ||
"axes": [ | ||
{ | ||
"name": "y", | ||
"type": "space", | ||
"units": "micrometer" | ||
}, | ||
{ | ||
"name": "x", | ||
"type": "space", | ||
"units": "micrometer" | ||
} | ||
], | ||
"datasets": [ | ||
{ | ||
"path": "0", | ||
"coordinateTransformations": [ | ||
{ | ||
"scale": [ | ||
1, | ||
1 | ||
], | ||
"type": "scale" | ||
} | ||
] | ||
} | ||
], | ||
"version": "0.4" | ||
} | ||
], | ||
"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 | ||
} | ||
} | ||
] | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
0.4/examples/invalid/invalid_multiscales_transformations.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"multiscales": [ | ||
{ | ||
"axes": [ | ||
{ | ||
"name": "y", | ||
"type": "space", | ||
"units": "micrometer" | ||
}, | ||
{ | ||
"name": "x", | ||
"type": "space", | ||
"units": "micrometer" | ||
} | ||
], | ||
"datasets": [ | ||
{ | ||
"path": "0", | ||
"coordinateTransformations": [ | ||
{ | ||
"scale": [ | ||
1, | ||
1 | ||
], | ||
"type": "scale" | ||
} | ||
] | ||
} | ||
], | ||
"coordinateTransformations": [ | ||
{ | ||
"scale": ["invalid"], | ||
"type": "scale" | ||
} | ||
], | ||
"version": "0.4" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"multiscales": [ | ||
{ | ||
"axes": [ | ||
{ | ||
"name": "y", | ||
"type": "space", | ||
"units": "micrometer" | ||
}, | ||
{ | ||
"name": "x", | ||
"type": "space", | ||
"units": "micrometer" | ||
} | ||
], | ||
"datasets": [ | ||
{ | ||
"path": 0, | ||
"coordinateTransformations": [ | ||
{ | ||
"scale": [ | ||
1, | ||
1 | ||
], | ||
"type": "scale" | ||
} | ||
] | ||
} | ||
], | ||
"version": "0.4" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"multiscales": [ | ||
{ | ||
"axes": [ | ||
{ | ||
"name": "y", | ||
"type": "space", | ||
"units": "micrometer" | ||
}, | ||
{ | ||
"name": "x", | ||
"type": "space", | ||
"units": "micrometer" | ||
} | ||
], | ||
"datasets": [ | ||
{ | ||
"path": "0", | ||
"coordinateTransformations": [ | ||
{ | ||
"scale": [ | ||
1, | ||
1 | ||
], | ||
"type": "translation" | ||
} | ||
] | ||
} | ||
], | ||
"version": "0.4" | ||
} | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently a SHOULD, see https://github.com/ome/ngff/blob/main/latest/index.bs#L217. Not sure how exactly we want to tackle this. I will leave a more general comment once I went through everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, this should not fail validation but probably be flagged by the stricter schema. I propose to open a follow-up PR with the infrastructure to differentiate the two of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, re-reading this example, this should remain invalid.
As you rightfully mentioned
type
is a SHOULD and that is not sufficient ground to fail the strict schema. However there is only onespace
axe within themultiscales
dictionaryThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, you're right. But the name of this example is a bit misleading then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And in fact it is failing because
type
is notspace, channel or time
rather than only-1-space-axis.So the schema should allow 1 'invalid' axis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what you mean by this @will-moore. But I agree that this one should fail the strict spec because it has only 1 spatial axis, as @sbesson points out. But I would maybe rename the example to make that clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nods, that's probably more tests worth injecting but my understanding of the
type
restrictions is the following formultiscales.axes
:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with 3 spatial axes this would fail because we would have > 5 dim. Same for some of the other examples you bring up.
But otherwise I agree with your list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh the
or
in between 1 channel and 1 time was meant to capture that but I certainly failed to write the different combinations in a concise way. Expanding a bit, all the following set of axes types should be valid according to the minimal schema but should fail the strict schema: