Add JSON schemas for plate and well specification#120
Merged
Conversation
At the moment, each test suite is creating its own internal schema store with a single schema. This prevents the testing combined schemas like the strict schemas either when the parent schema is unpublished or simply offline. This commit migrates the logic to create a single global schema store
melissalinkert
approved these changes
May 17, 2022
Member
melissalinkert
left a comment
There was a problem hiding this comment.
Minor comments aside, this all looks fine to me.
Member
Author
joshmoore
approved these changes
May 17, 2022
Member
joshmoore
left a comment
There was a problem hiding this comment.
LGTM.
I assume you want to capture any changes/clarifications to the text in follow ups, no?
Member
Author
|
If we are all fine with the current state, next todos were: 1- update the text of the Doing this as separate follow-up PRs has the benefit of iterating quicker. |
This was referenced May 23, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Similarly to what has been done for
multiscales, this PR introduced four new JSON schemas to the 0.4 specification:plate.schemawhich should enforce the mandatory properties (MUST) of theplatespecificationstrict_plate.schemawhich extendsplate.schemaand enforces the recommended properties (SHOULD).well.schemawhich should enforce the mandatory properties (MUST) of thewellspecificationstrict_well.schemawhich extendswell.schemaand enforces the recommended properties (SHOULD).Tests formatted using the JSON schema test suite layout are added and the example snippets are extracted under
examplesusing the similar logic as #118.Two modifications of the validation tests were required. e49f126 ensures only the examples located in the same folder as
.config.jsonare tested against a given schema. 949a352 creates a shared schema store. Since the strict schemas are referencing other schemas via$ref, this store is required to allow the test the local versions under/schemas. Otherwise, the tests will try to resolve remote schemas which would fail either if working offline or when working with unpublished schemas.The specification of the JSON schema required a few assumptions that are currently underspecified:
rows,columnsandwellsare the only mandatory properties ofplatenameandversionare recommended properties ofplateplateproperties are optionalidof each element of theacquisitionsarray is an integerstarttimeandendtimeof each element of theacquisitionsarray is an integer-
versionis a recommended property ofwellProbably the biggest inconsistency identified by this schema work is about the type of
acquisition.starttimeandacquisition.endtimewhich is marked as "epoch string" in the specification text while the JSON examples use integers.