-
Notifications
You must be signed in to change notification settings - Fork 178
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
feat(shared-data): create v3 JSON protocol schema def #3307
Conversation
Codecov Report
@@ Coverage Diff @@
## edge #3307 +/- ##
=========================================
- Coverage 53.63% 53.53% -0.1%
=========================================
Files 716 716
Lines 20907 20959 +52
=========================================
+ Hits 11213 11221 +8
- Misses 9694 9738 +44
Continue to review full report at Codecov.
|
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.
It looks good 🏋️. Hard to see the changes without a diff. I'll diff the files locally.
"slot": { | ||
"description": "Slot on the deck of an OT-2 robot", | ||
"type": "string", | ||
"enum": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"] |
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.
Out of curiosity, how hard would it be to have this reference the deck schema? This might be a nice change to start moving towards minimizing the sources of truth for slots.
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.
Hmmm... the deckSchema.json
schema doesn't have a slot enum, that info isn't in the deck schema itself. I don't know if JSON Schema has a way to extract these strings from an ordinary data JSON (eg shared-data/robot-data/decks/ot2Standard.json
), I think it can only reference other JSON schemas.
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.
Aha that makes sense, good point.
"type": "string" | ||
}, | ||
"data": { | ||
"description": "Any data used by the application that created this protocol)", |
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.
is that an extra closing paren?
Closed in favor of #3312 which introduces additional changes to v3 |
overview
Closes #3110 - see this ticket for list of changes from v2
changelog
review requests
exampleV3Protocols.zip
npm install -g ajv-cli
then you can use theajv
CLI to validate v3 JSON protocols with the new schema:ajv validate -s shared-data/protocol-json-schema/protocolSchemaV3.json -r shared-data/labware-json-schema/labware-schema.json -d path/to/exampleProtocol.json
(the-r
pulls in the v2 labware schema so it resolve the reference toopentronsLabwareSchemaV2
in the definitions section)