opentrons 8.4.1a2__py2.py3-none-any.whl → 8.5.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- opentrons/config/defaults_ot3.py +1 -1
- opentrons/hardware_control/backends/flex_protocol.py +25 -0
- opentrons/hardware_control/backends/ot3controller.py +76 -1
- opentrons/hardware_control/backends/ot3simulator.py +27 -0
- opentrons/hardware_control/instruments/ot3/pipette_handler.py +1 -0
- opentrons/hardware_control/ot3api.py +32 -0
- opentrons/legacy_commands/commands.py +16 -4
- opentrons/legacy_commands/robot_commands.py +51 -0
- opentrons/legacy_commands/types.py +91 -2
- opentrons/protocol_api/_liquid.py +60 -15
- opentrons/protocol_api/_liquid_properties.py +149 -90
- opentrons/protocol_api/_transfer_liquid_validation.py +43 -14
- opentrons/protocol_api/core/engine/instrument.py +367 -221
- opentrons/protocol_api/core/engine/protocol.py +14 -15
- opentrons/protocol_api/core/engine/robot.py +2 -2
- opentrons/protocol_api/core/engine/transfer_components_executor.py +275 -163
- opentrons/protocol_api/core/engine/well.py +16 -0
- opentrons/protocol_api/core/instrument.py +11 -5
- opentrons/protocol_api/core/legacy/legacy_instrument_core.py +11 -5
- opentrons/protocol_api/core/legacy/legacy_protocol_core.py +2 -2
- opentrons/protocol_api/core/legacy/legacy_well_core.py +8 -0
- opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py +11 -5
- opentrons/protocol_api/core/protocol.py +3 -3
- opentrons/protocol_api/core/well.py +8 -0
- opentrons/protocol_api/instrument_context.py +478 -111
- opentrons/protocol_api/labware.py +10 -0
- opentrons/protocol_api/module_contexts.py +5 -2
- opentrons/protocol_api/protocol_context.py +76 -11
- opentrons/protocol_api/robot_context.py +48 -6
- opentrons/protocol_api/validation.py +15 -8
- opentrons/protocol_engine/commands/command_unions.py +10 -10
- opentrons/protocol_engine/commands/generate_command_schema.py +1 -1
- opentrons/protocol_engine/commands/get_next_tip.py +2 -2
- opentrons/protocol_engine/commands/load_labware.py +0 -19
- opentrons/protocol_engine/commands/pick_up_tip.py +9 -3
- opentrons/protocol_engine/commands/robot/__init__.py +20 -20
- opentrons/protocol_engine/commands/robot/close_gripper_jaw.py +34 -24
- opentrons/protocol_engine/commands/robot/open_gripper_jaw.py +29 -20
- opentrons/protocol_engine/commands/seal_pipette_to_tip.py +1 -1
- opentrons/protocol_engine/commands/unsafe/__init__.py +17 -1
- opentrons/protocol_engine/commands/unsafe/unsafe_drop_tip_in_place.py +1 -2
- opentrons/protocol_engine/execution/labware_movement.py +9 -2
- opentrons/protocol_engine/execution/movement.py +12 -9
- opentrons/protocol_engine/execution/queue_worker.py +8 -1
- opentrons/protocol_engine/execution/thermocycler_movement_flagger.py +52 -19
- opentrons/protocol_engine/resources/labware_validation.py +7 -1
- opentrons/protocol_engine/state/_well_math.py +2 -2
- opentrons/protocol_engine/state/commands.py +14 -28
- opentrons/protocol_engine/state/frustum_helpers.py +11 -7
- opentrons/protocol_engine/state/labware.py +12 -0
- opentrons/protocol_engine/state/modules.py +1 -1
- opentrons/protocol_engine/state/pipettes.py +8 -0
- opentrons/protocol_engine/state/tips.py +46 -83
- opentrons/protocol_engine/state/update_types.py +8 -23
- opentrons/protocol_engine/types/liquid_level_detection.py +68 -8
- opentrons/protocol_runner/legacy_command_mapper.py +12 -6
- opentrons/protocol_runner/run_orchestrator.py +1 -1
- opentrons/protocols/advanced_control/transfers/common.py +54 -11
- opentrons/protocols/advanced_control/transfers/transfer_liquid_utils.py +55 -28
- opentrons/protocols/api_support/definitions.py +1 -1
- opentrons/types.py +6 -6
- {opentrons-8.4.1a2.dist-info → opentrons-8.5.0.dist-info}/METADATA +4 -4
- {opentrons-8.4.1a2.dist-info → opentrons-8.5.0.dist-info}/RECORD +67 -66
- {opentrons-8.4.1a2.dist-info → opentrons-8.5.0.dist-info}/LICENSE +0 -0
- {opentrons-8.4.1a2.dist-info → opentrons-8.5.0.dist-info}/WHEEL +0 -0
- {opentrons-8.4.1a2.dist-info → opentrons-8.5.0.dist-info}/entry_points.txt +0 -0
- {opentrons-8.4.1a2.dist-info → opentrons-8.5.0.dist-info}/top_level.txt +0 -0
|
@@ -4,10 +4,6 @@ from __future__ import annotations
|
|
|
4
4
|
from typing import Dict, Optional, Type, Union, List, Tuple, TYPE_CHECKING
|
|
5
5
|
|
|
6
6
|
from opentrons_shared_data.liquid_classes import LiquidClassDefinitionDoesNotExist
|
|
7
|
-
|
|
8
|
-
from opentrons.protocol_engine import commands as cmd
|
|
9
|
-
from opentrons.protocol_engine.commands import LoadModuleResult
|
|
10
|
-
|
|
11
7
|
from opentrons_shared_data.deck.types import DeckDefinitionV5, SlotDefV3
|
|
12
8
|
from opentrons_shared_data.labware.labware_definition import (
|
|
13
9
|
labware_definition_type_adapter,
|
|
@@ -35,7 +31,8 @@ from opentrons.hardware_control.types import DoorState
|
|
|
35
31
|
from opentrons.protocols.api_support.util import AxisMaxSpeeds
|
|
36
32
|
from opentrons.protocols.api_support.types import APIVersion
|
|
37
33
|
|
|
38
|
-
|
|
34
|
+
from opentrons.protocol_engine import commands as cmd
|
|
35
|
+
from opentrons.protocol_engine.commands import LoadModuleResult
|
|
39
36
|
from opentrons.protocol_engine import (
|
|
40
37
|
DeckSlotLocation,
|
|
41
38
|
AddressableAreaLocation,
|
|
@@ -112,14 +109,14 @@ class ProtocolCore(
|
|
|
112
109
|
self._engine_client = engine_client
|
|
113
110
|
self._api_version = api_version
|
|
114
111
|
self._sync_hardware = sync_hardware
|
|
115
|
-
self._last_location: Optional[Location] = None
|
|
112
|
+
self._last_location: Optional[Union[Location, TrashBin, WasteChute]] = None
|
|
116
113
|
self._last_mount: Optional[Mount] = None
|
|
117
114
|
self._labware_cores_by_id: Dict[str, LabwareCore] = {}
|
|
118
115
|
self._module_cores_by_id: Dict[
|
|
119
116
|
str, Union[ModuleCore, NonConnectedModuleCore]
|
|
120
117
|
] = {}
|
|
121
118
|
self._disposal_locations: List[Union[Labware, TrashBin, WasteChute]] = []
|
|
122
|
-
self.
|
|
119
|
+
self._liquid_class_def_cache: Dict[Tuple[str, int], LiquidClassSchemaV1] = {}
|
|
123
120
|
self._load_fixed_trash()
|
|
124
121
|
|
|
125
122
|
@property
|
|
@@ -918,7 +915,7 @@ class ProtocolCore(
|
|
|
918
915
|
def get_last_location(
|
|
919
916
|
self,
|
|
920
917
|
mount: Optional[Mount] = None,
|
|
921
|
-
) -> Optional[Location]:
|
|
918
|
+
) -> Optional[Union[Location, TrashBin, WasteChute]]:
|
|
922
919
|
"""Get the last accessed location."""
|
|
923
920
|
if mount is None or mount == self._last_mount:
|
|
924
921
|
return self._last_location
|
|
@@ -927,7 +924,7 @@ class ProtocolCore(
|
|
|
927
924
|
|
|
928
925
|
def set_last_location(
|
|
929
926
|
self,
|
|
930
|
-
location: Optional[Location],
|
|
927
|
+
location: Optional[Union[Location, TrashBin, WasteChute]],
|
|
931
928
|
mount: Optional[Mount] = None,
|
|
932
929
|
) -> None:
|
|
933
930
|
"""Set the last accessed location."""
|
|
@@ -1097,20 +1094,22 @@ class ProtocolCore(
|
|
|
1097
1094
|
display_color=(liquid.displayColor.root if liquid.displayColor else None),
|
|
1098
1095
|
)
|
|
1099
1096
|
|
|
1100
|
-
def
|
|
1101
|
-
"""
|
|
1097
|
+
def get_liquid_class(self, name: str, version: int) -> LiquidClass:
|
|
1098
|
+
"""Get an instance of a built-in liquid class."""
|
|
1102
1099
|
try:
|
|
1103
1100
|
# Check if we have already loaded this liquid class' definition
|
|
1104
|
-
liquid_class_def = self.
|
|
1101
|
+
liquid_class_def = self._liquid_class_def_cache[(name, version)]
|
|
1105
1102
|
except KeyError:
|
|
1106
1103
|
try:
|
|
1107
1104
|
# Fetching the liquid class data from file and parsing it
|
|
1108
1105
|
# is an expensive operation and should be avoided.
|
|
1109
1106
|
# Calling this often will degrade protocol execution performance.
|
|
1110
|
-
liquid_class_def = liquid_classes.load_definition(name)
|
|
1111
|
-
self.
|
|
1107
|
+
liquid_class_def = liquid_classes.load_definition(name, version=version)
|
|
1108
|
+
self._liquid_class_def_cache[(name, version)] = liquid_class_def
|
|
1112
1109
|
except LiquidClassDefinitionDoesNotExist:
|
|
1113
|
-
raise ValueError(
|
|
1110
|
+
raise ValueError(
|
|
1111
|
+
f"Liquid class definition not found for '{name}' version {version}."
|
|
1112
|
+
)
|
|
1114
1113
|
|
|
1115
1114
|
return LiquidClass.create(liquid_class_def)
|
|
1116
1115
|
|
|
@@ -131,9 +131,9 @@ class RobotCore(AbstractRobot):
|
|
|
131
131
|
)
|
|
132
132
|
|
|
133
133
|
def release_grip(self) -> None:
|
|
134
|
-
self._engine_client.execute_command(cmd.robot.
|
|
134
|
+
self._engine_client.execute_command(cmd.robot.OpenGripperJawParams())
|
|
135
135
|
|
|
136
136
|
def close_gripper(self, force: Optional[float] = None) -> None:
|
|
137
137
|
self._engine_client.execute_command(
|
|
138
|
-
cmd.robot.
|
|
138
|
+
cmd.robot.CloseGripperJawParams(force=force)
|
|
139
139
|
)
|