Skip to content

Commit

Permalink
schema updates and test corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyBatten committed Jan 14, 2025
1 parent c1a17c0 commit 65ed2ec
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/tests/opentrons/protocol_api/test_protocol_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ def test_load_labware_with_lid(
load_name="lowercase_lid",
location=mock_labware_core,
namespace="some_namespace",
version=None,
version=1337,
)
).then_return(mock_lid_core)

Expand All @@ -796,7 +796,7 @@ def test_load_labware_with_lid(
label="some_display_name",
namespace="some_namespace",
version=1337,
lid="UPPERCASE_LID",
lid="lowercase_lid",
)

assert isinstance(result, Labware)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,8 @@ def test_raise_if_labware_cannot_be_stacked_on_labware_on_adapter() -> None:
},
definitions_by_uri={
"def-uri-1": LabwareDefinition.model_construct( # type: ignore[call-arg]
allowedRoles=[LabwareRole.labware]
allowedRoles=[LabwareRole.labware],
parameters=Parameters.model_construct(loadName="test"), # type: ignore[call-arg]
),
"def-uri-2": LabwareDefinition.model_construct( # type: ignore[call-arg]
allowedRoles=[LabwareRole.adapter]
Expand Down
107 changes: 107 additions & 0 deletions shared-data/command/schemas/11.json
Original file line number Diff line number Diff line change
Expand Up @@ -2058,6 +2058,11 @@
"enum": ["offDeck"],
"type": "string"
},
{
"const": "invalidated",
"enum": ["invalidated"],
"type": "string"
},
{
"$ref": "#/$defs/AddressableAreaLocation"
}
Expand Down Expand Up @@ -2132,6 +2137,11 @@
"enum": ["offDeck"],
"type": "string"
},
{
"const": "invalidated",
"enum": ["invalidated"],
"type": "string"
},
{
"$ref": "#/$defs/AddressableAreaLocation"
}
Expand Down Expand Up @@ -2206,6 +2216,11 @@
"enum": ["offDeck"],
"type": "string"
},
{
"const": "invalidated",
"enum": ["invalidated"],
"type": "string"
},
{
"$ref": "#/$defs/AddressableAreaLocation"
}
Expand Down Expand Up @@ -2712,6 +2727,11 @@
"enum": ["offDeck"],
"type": "string"
},
{
"const": "invalidated",
"enum": ["invalidated"],
"type": "string"
},
{
"$ref": "#/$defs/AddressableAreaLocation"
}
Expand All @@ -2733,6 +2753,89 @@
"title": "MoveLabwareParams",
"type": "object"
},
"MoveLidCreate": {
"description": "A request to create a ``moveLid`` command.",
"properties": {
"commandType": {
"const": "moveLid",
"default": "moveLid",
"enum": ["moveLid"],
"title": "Commandtype",
"type": "string"
},
"intent": {
"$ref": "#/$defs/CommandIntent",
"description": "The reason the command was added. If not specified or `protocol`, the command will be treated as part of the protocol run itself, and added to the end of the existing command queue.\n\nIf `setup`, the command will be treated as part of run setup. A setup command may only be enqueued if the run has not started.\n\nUse setup commands for activities like pre-run calibration checks and module setup, like pre-heating.",
"title": "Intent"
},
"key": {
"description": "A key value, unique in this run, that can be used to track the same logical command across multiple runs of the same protocol. If a value is not provided, one will be generated.",
"title": "Key",
"type": "string"
},
"params": {
"$ref": "#/$defs/MoveLidParams"
}
},
"required": ["params"],
"title": "MoveLidCreate",
"type": "object"
},
"MoveLidParams": {
"description": "Input parameters for a ``moveLid`` command.",
"properties": {
"dropOffset": {
"$ref": "#/$defs/LabwareOffsetVector",
"description": "Offset to use when dropping off labware. Experimental param, subject to change",
"title": "Dropoffset"
},
"labwareId": {
"description": "The ID of the labware to move.",
"title": "Labwareid",
"type": "string"
},
"newLocation": {
"anyOf": [
{
"$ref": "#/$defs/DeckSlotLocation"
},
{
"$ref": "#/$defs/ModuleLocation"
},
{
"$ref": "#/$defs/OnLabwareLocation"
},
{
"const": "offDeck",
"enum": ["offDeck"],
"type": "string"
},
{
"const": "invalidated",
"enum": ["invalidated"],
"type": "string"
},
{
"$ref": "#/$defs/AddressableAreaLocation"
}
],
"description": "Where to move the labware.",
"title": "Newlocation"
},
"pickUpOffset": {
"$ref": "#/$defs/LabwareOffsetVector",
"description": "Offset to use when picking up labware. Experimental param, subject to change",
"title": "Pickupoffset"
},
"strategy": {
"$ref": "#/$defs/LabwareMovementStrategy",
"description": "Whether to use the gripper to perform the labware movement or to perform a manual movement with an option to pause."
}
},
"required": ["labwareId", "newLocation", "strategy"],
"title": "MoveLidParams",
"type": "object"
},
"MoveRelativeCreate": {
"description": "Data to create a MoveRelative command.",
"properties": {
Expand Down Expand Up @@ -5742,6 +5845,7 @@
"magneticModule/disengage": "#/$defs/DisengageCreate",
"magneticModule/engage": "#/$defs/EngageCreate",
"moveLabware": "#/$defs/MoveLabwareCreate",
"moveLid": "#/$defs/MoveLidCreate",
"moveRelative": "#/$defs/MoveRelativeCreate",
"moveToAddressableArea": "#/$defs/MoveToAddressableAreaCreate",
"moveToAddressableAreaForDropTip": "#/$defs/MoveToAddressableAreaForDropTipCreate",
Expand Down Expand Up @@ -5860,6 +5964,9 @@
{
"$ref": "#/$defs/MoveLabwareCreate"
},
{
"$ref": "#/$defs/MoveLidCreate"
},
{
"$ref": "#/$defs/MoveRelativeCreate"
},
Expand Down

0 comments on commit 65ed2ec

Please sign in to comment.