Skip to content

Commit

Permalink
remove validation, add some additional quirks
Browse files Browse the repository at this point in the history
  • Loading branch information
Laura-Danielle committed Dec 12, 2024
1 parent 81b8278 commit 98b8d8d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 40 deletions.
1 change: 0 additions & 1 deletion api/src/opentrons/protocol_api/core/engine/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ def load_labware(
)
)
# FIXME(jbl, 2023-08-14) validating after loading the object issue
validation.ensure_labware_is_loadable(load_result.definition, load_location)
validation.ensure_definition_is_labware(load_result.definition)

# FIXME(mm, 2023-02-21):
Expand Down
27 changes: 0 additions & 27 deletions api/src/opentrons/protocol_api/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
from opentrons_shared_data.labware.labware_definition import LabwareRole
from opentrons_shared_data.pipette.types import PipetteNameType
from opentrons_shared_data.robot.types import RobotType
from opentrons.protocol_engine.types import (
LabwareLocation,
DeckSlotLocation,
AddressableAreaLocation,
ModuleLocation,
)
from opentrons.protocols.api_support.types import APIVersion, ThermocyclerStep
from opentrons.protocols.api_support.util import APIVersionError
from opentrons.protocols.models import LabwareDefinition
Expand Down Expand Up @@ -372,27 +366,6 @@ def ensure_definition_is_labware(definition: LabwareDefinition) -> None:
)


def ensure_labware_is_loadable(
definition: LabwareDefinition, location: LabwareLocation
) -> None:
"""Ensure that one of the definition's allowed roles is `stackableOnly` and that the location is a `NonStackedLocation`."""
if (
definition.allowedRoles
and LabwareRole.stackableOnly in definition.allowedRoles
and isinstance(
location,
(
DeckSlotLocation,
AddressableAreaLocation,
ModuleLocation,
),
)
):
raise LabwareDefinitionIsNotLoadableOnPosition(
f"Labware {definition.parameters.loadName} cannot be loaded on {location}."
)


_MODULE_ALIASES: Dict[str, ModuleModel] = {
"magdeck": MagneticModuleModel.MAGNETIC_V1,
"magnetic module": MagneticModuleModel.MAGNETIC_V1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"parameters": {
"format": "96Standard",
"quirks": ["tiprackAdapterFor96Channel"],
"quirks": ["tiprackAdapterFor96Channel", "stackingMaxFive"],
"isTiprack": false,
"isMagneticModuleCompatible": false,
"loadName": "evotips_flex_96_tiprack_adapter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1001,13 +1001,13 @@
],
"parameters": {
"format": "96Standard",
"quirks": ["stackingMaxFive"],
"quirks": ["stackingMaxFive", "stackableOnly"],
"isTiprack": false,
"isMagneticModuleCompatible": false,
"loadName": "evotips_opentrons_96_labware"
},
"namespace": "opentrons",
"allowedRoles": ["stackableOnly"],
"allowedRoles": ["labware"],
"version": 1,
"schemaVersion": 2,
"cornerOffsetFromSlot": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@
],
"parameters": {
"format": "96Standard",
"quirks": [],
"quirks": ["stackingMaxFive"],
"isTiprack": false,
"isMagneticModuleCompatible": true,
"loadName": "nest_96_wellplate_2ml_deep",
Expand Down
9 changes: 1 addition & 8 deletions shared-data/labware/schemas/2.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,7 @@
"description": "Allowed behaviors and usage of a labware in a protocol.",
"items": {
"type": "string",
"enum": [
"labware",
"adapter",
"fixture",
"maintenance",
"lid",
"stackableOnly"
]
"enum": ["labware", "adapter", "fixture", "maintenance", "lid"]
}
},
"stackingOffsetWithLabware": {
Expand Down

0 comments on commit 98b8d8d

Please sign in to comment.