opentrons 8.7.0a2__py3-none-any.whl → 8.7.0a3__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.
Potentially problematic release.
This version of opentrons might be problematic. Click here for more details.
- opentrons/_version.py +2 -2
- opentrons/drivers/thermocycler/abstract.py +0 -1
- opentrons/drivers/thermocycler/driver.py +4 -33
- opentrons/drivers/thermocycler/simulator.py +0 -2
- opentrons/hardware_control/api.py +5 -24
- opentrons/hardware_control/backends/controller.py +2 -8
- opentrons/hardware_control/backends/ot3controller.py +0 -3
- opentrons/hardware_control/backends/ot3simulator.py +1 -2
- opentrons/hardware_control/backends/simulator.py +1 -2
- opentrons/hardware_control/backends/subsystem_manager.py +2 -5
- opentrons/hardware_control/module_control.py +8 -82
- opentrons/hardware_control/modules/__init__.py +0 -3
- opentrons/hardware_control/modules/absorbance_reader.py +4 -11
- opentrons/hardware_control/modules/flex_stacker.py +9 -38
- opentrons/hardware_control/modules/heater_shaker.py +5 -30
- opentrons/hardware_control/modules/magdeck.py +4 -8
- opentrons/hardware_control/modules/mod_abc.py +5 -13
- opentrons/hardware_control/modules/tempdeck.py +5 -25
- opentrons/hardware_control/modules/thermocycler.py +10 -56
- opentrons/hardware_control/modules/types.py +1 -20
- opentrons/hardware_control/modules/utils.py +4 -11
- opentrons/hardware_control/nozzle_manager.py +0 -3
- opentrons/hardware_control/ot3api.py +5 -26
- opentrons/hardware_control/scripts/update_module_fw.py +0 -5
- opentrons/hardware_control/types.py +2 -31
- opentrons/legacy_commands/protocol_commands.py +0 -20
- opentrons/legacy_commands/types.py +0 -42
- opentrons/motion_planning/waypoints.py +29 -15
- opentrons/protocol_api/__init__.py +0 -5
- opentrons/protocol_api/_types.py +1 -6
- opentrons/protocol_api/core/common.py +1 -3
- opentrons/protocol_api/core/engine/_default_labware_versions.py +11 -32
- opentrons/protocol_api/core/engine/labware.py +1 -8
- opentrons/protocol_api/core/engine/module_core.py +0 -4
- opentrons/protocol_api/core/engine/protocol.py +43 -23
- opentrons/protocol_api/core/legacy/legacy_module_core.py +0 -2
- opentrons/protocol_api/core/legacy/legacy_protocol_core.py +1 -11
- opentrons/protocol_api/core/legacy_simulator/legacy_protocol_core.py +2 -14
- opentrons/protocol_api/core/module.py +0 -1
- opentrons/protocol_api/core/protocol.py +2 -11
- opentrons/protocol_api/module_contexts.py +0 -1
- opentrons/protocol_api/protocol_context.py +4 -26
- opentrons/protocol_api/robot_context.py +21 -38
- opentrons/protocol_api/validation.py +1 -6
- opentrons/protocol_engine/actions/__init__.py +2 -4
- opentrons/protocol_engine/actions/actions.py +9 -22
- opentrons/protocol_engine/clients/sync_client.py +7 -6
- opentrons/protocol_engine/commands/__init__.py +0 -42
- opentrons/protocol_engine/commands/absorbance_reader/close_lid.py +15 -2
- opentrons/protocol_engine/commands/absorbance_reader/open_lid.py +15 -2
- opentrons/protocol_engine/commands/aspirate.py +0 -1
- opentrons/protocol_engine/commands/command.py +0 -1
- opentrons/protocol_engine/commands/command_unions.py +0 -39
- opentrons/protocol_engine/commands/dispense.py +0 -1
- opentrons/protocol_engine/commands/drop_tip.py +8 -32
- opentrons/protocol_engine/commands/movement_common.py +0 -2
- opentrons/protocol_engine/commands/pick_up_tip.py +11 -21
- opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py +0 -6
- opentrons/protocol_engine/commands/thermocycler/run_profile.py +0 -8
- opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py +1 -17
- opentrons/protocol_engine/commands/touch_tip.py +1 -1
- opentrons/protocol_engine/commands/unsafe/unsafe_place_labware.py +22 -6
- opentrons/protocol_engine/errors/__init__.py +0 -4
- opentrons/protocol_engine/errors/exceptions.py +0 -55
- opentrons/protocol_engine/execution/__init__.py +0 -2
- opentrons/protocol_engine/execution/command_executor.py +0 -8
- opentrons/protocol_engine/execution/create_queue_worker.py +1 -5
- opentrons/protocol_engine/execution/labware_movement.py +12 -9
- opentrons/protocol_engine/execution/movement.py +0 -2
- opentrons/protocol_engine/execution/queue_worker.py +0 -4
- opentrons/protocol_engine/execution/run_control.py +0 -8
- opentrons/protocol_engine/protocol_engine.py +33 -67
- opentrons/protocol_engine/resources/__init__.py +0 -2
- opentrons/protocol_engine/resources/deck_configuration_provider.py +0 -7
- opentrons/protocol_engine/resources/labware_validation.py +6 -10
- opentrons/protocol_engine/state/_labware_origin_math.py +636 -0
- opentrons/protocol_engine/state/_well_math.py +18 -60
- opentrons/protocol_engine/state/addressable_areas.py +0 -2
- opentrons/protocol_engine/state/commands.py +7 -7
- opentrons/protocol_engine/state/geometry.py +374 -204
- opentrons/protocol_engine/state/labware.py +102 -52
- opentrons/protocol_engine/state/module_substates/thermocycler_module_substate.py +0 -37
- opentrons/protocol_engine/state/modules.py +8 -21
- opentrons/protocol_engine/state/motion.py +0 -44
- opentrons/protocol_engine/state/state.py +0 -14
- opentrons/protocol_engine/state/state_summary.py +0 -2
- opentrons/protocol_engine/state/tips.py +258 -177
- opentrons/protocol_engine/state/update_types.py +9 -16
- opentrons/protocol_engine/types/__init__.py +3 -9
- opentrons/protocol_engine/types/deck_configuration.py +1 -5
- opentrons/protocol_engine/types/instrument.py +1 -8
- opentrons/protocol_engine/types/labware.py +13 -1
- opentrons/protocol_engine/types/module.py +0 -10
- opentrons/protocol_engine/types/tip.py +0 -9
- opentrons/protocol_runner/create_simulating_orchestrator.py +2 -29
- opentrons/protocol_runner/run_orchestrator.py +2 -18
- opentrons/protocols/api_support/definitions.py +1 -1
- opentrons/protocols/api_support/types.py +1 -2
- opentrons/simulate.py +15 -48
- opentrons/system/camera.py +1 -1
- {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a3.dist-info}/METADATA +4 -4
- {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a3.dist-info}/RECORD +105 -118
- opentrons/protocol_api/core/engine/tasks.py +0 -35
- opentrons/protocol_api/core/legacy/tasks.py +0 -19
- opentrons/protocol_api/core/legacy_simulator/tasks.py +0 -19
- opentrons/protocol_api/core/tasks.py +0 -31
- opentrons/protocol_api/tasks.py +0 -48
- opentrons/protocol_engine/commands/create_timer.py +0 -83
- opentrons/protocol_engine/commands/set_tip_state.py +0 -97
- opentrons/protocol_engine/commands/wait_for_tasks.py +0 -98
- opentrons/protocol_engine/execution/task_handler.py +0 -157
- opentrons/protocol_engine/resources/concurrency_provider.py +0 -27
- opentrons/protocol_engine/state/labware_origin_math/errors.py +0 -94
- opentrons/protocol_engine/state/labware_origin_math/stackup_origin_to_labware_origin.py +0 -1331
- opentrons/protocol_engine/state/tasks.py +0 -139
- opentrons/protocol_engine/types/tasks.py +0 -38
- {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a3.dist-info}/WHEEL +0 -0
- {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a3.dist-info}/entry_points.txt +0 -0
- {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a3.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,26 +2,12 @@ from asyncio import Queue
|
|
|
2
2
|
import enum
|
|
3
3
|
import logging
|
|
4
4
|
from dataclasses import dataclass
|
|
5
|
-
from typing import
|
|
6
|
-
cast,
|
|
7
|
-
Tuple,
|
|
8
|
-
Union,
|
|
9
|
-
List,
|
|
10
|
-
Callable,
|
|
11
|
-
Dict,
|
|
12
|
-
TypeVar,
|
|
13
|
-
Type,
|
|
14
|
-
TYPE_CHECKING,
|
|
15
|
-
)
|
|
5
|
+
from typing import cast, Tuple, Union, List, Callable, Dict, TypeVar, Type
|
|
16
6
|
from typing_extensions import Literal
|
|
17
7
|
from opentrons import types as top_types
|
|
18
8
|
from opentrons_shared_data.pipette.types import PipetteChannelType
|
|
19
|
-
from opentrons_shared_data.errors.exceptions import EnumeratedError
|
|
20
9
|
from opentrons.config import feature_flags
|
|
21
10
|
|
|
22
|
-
if TYPE_CHECKING:
|
|
23
|
-
from .modules.types import ModuleModel
|
|
24
|
-
|
|
25
11
|
MODULE_LOG = logging.getLogger(__name__)
|
|
26
12
|
|
|
27
13
|
|
|
@@ -398,7 +384,6 @@ class HardwareEventType(enum.Enum):
|
|
|
398
384
|
DOOR_SWITCH_CHANGE = enum.auto()
|
|
399
385
|
ERROR_MESSAGE = enum.auto()
|
|
400
386
|
ESTOP_CHANGE = enum.auto()
|
|
401
|
-
ASYNCHRONOUS_MODULE_ERROR = enum.auto()
|
|
402
387
|
|
|
403
388
|
|
|
404
389
|
@dataclass
|
|
@@ -443,24 +428,10 @@ class ErrorMessageNotification:
|
|
|
443
428
|
event: Literal[HardwareEventType.ERROR_MESSAGE] = HardwareEventType.ERROR_MESSAGE
|
|
444
429
|
|
|
445
430
|
|
|
446
|
-
@dataclass(frozen=True)
|
|
447
|
-
class AsynchronousModuleErrorNotification:
|
|
448
|
-
exception: EnumeratedError
|
|
449
|
-
module_serial: str | None
|
|
450
|
-
module_model: "ModuleModel"
|
|
451
|
-
port: str
|
|
452
|
-
event: Literal[
|
|
453
|
-
HardwareEventType.ASYNCHRONOUS_MODULE_ERROR
|
|
454
|
-
] = HardwareEventType.ASYNCHRONOUS_MODULE_ERROR
|
|
455
|
-
|
|
456
|
-
|
|
457
431
|
# new event types get new dataclasses
|
|
458
432
|
# when we add more event types we add them here
|
|
459
433
|
HardwareEvent = Union[
|
|
460
|
-
DoorStateNotification,
|
|
461
|
-
ErrorMessageNotification,
|
|
462
|
-
EstopStateNotification,
|
|
463
|
-
AsynchronousModuleErrorNotification,
|
|
434
|
+
DoorStateNotification, ErrorMessageNotification, EstopStateNotification
|
|
464
435
|
]
|
|
465
436
|
|
|
466
437
|
HardwareEventHandler = Callable[[HardwareEvent], None]
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from datetime import timedelta
|
|
2
2
|
from typing import Optional
|
|
3
3
|
from . import types as command_types
|
|
4
|
-
from opentrons.protocol_api.tasks import Task
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
def comment(msg: str) -> command_types.CommentCommand:
|
|
@@ -53,22 +52,3 @@ def move_labware(text: str) -> command_types.MoveLabwareCommand:
|
|
|
53
52
|
"name": command_types.MOVE_LABWARE,
|
|
54
53
|
"payload": {"text": text},
|
|
55
54
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
def wait_for_tasks(tasks: list[Task]) -> command_types.WaitForTasksCommand:
|
|
59
|
-
task_ids = [task.created_at.strftime("%Y-%m-%d %H:%M:%S") for task in tasks]
|
|
60
|
-
msg = f"Waiting for tasks that started at: {task_ids}."
|
|
61
|
-
return {
|
|
62
|
-
"name": command_types.WAIT_FOR_TASKS,
|
|
63
|
-
"payload": {"text": msg},
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
def create_timer(seconds: float) -> command_types.CreateTimerCommand:
|
|
68
|
-
return {
|
|
69
|
-
"name": command_types.CREATE_TIMER,
|
|
70
|
-
"payload": {
|
|
71
|
-
"text": f"Creating background timer for {seconds} seconds.",
|
|
72
|
-
"time": seconds,
|
|
73
|
-
},
|
|
74
|
-
}
|
|
@@ -102,10 +102,6 @@ ROBOT_MOVE_RELATIVE_TO: Final = "command.ROBOT_MOVE_RELATIVE_TO"
|
|
|
102
102
|
ROBOT_OPEN_GRIPPER_JAW: Final = "command.ROBOT_OPEN_GRIPPER_JAW"
|
|
103
103
|
ROBOT_CLOSE_GRIPPER_JAW: Final = "command.ROBOT_CLOSE_GRIPPER_JAW"
|
|
104
104
|
|
|
105
|
-
# Tasks #
|
|
106
|
-
WAIT_FOR_TASKS: Final = "command.WAIT_FOR_TASKS"
|
|
107
|
-
CREATE_TIMER: Final = "command.CREATE_TIMER"
|
|
108
|
-
|
|
109
105
|
|
|
110
106
|
class TextOnlyPayload(TypedDict):
|
|
111
107
|
text: str
|
|
@@ -718,27 +714,6 @@ class RobotCloseGripperJawCommand(TypedDict):
|
|
|
718
714
|
payload: GripperCommandPayload
|
|
719
715
|
|
|
720
716
|
|
|
721
|
-
# Task Commands and Payloads
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
class WaitForTasksPayload(TextOnlyPayload):
|
|
725
|
-
pass
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
class CreateTimerPayload(TextOnlyPayload):
|
|
729
|
-
time: float
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
class WaitForTasksCommand(TypedDict):
|
|
733
|
-
name: Literal["command.WAIT_FOR_TASKS"]
|
|
734
|
-
payload: WaitForTasksPayload
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
class CreateTimerCommand(TypedDict):
|
|
738
|
-
name: Literal["command.CREATE_TIMER"]
|
|
739
|
-
payload: CreateTimerPayload
|
|
740
|
-
|
|
741
|
-
|
|
742
717
|
Command = Union[
|
|
743
718
|
DropTipCommand,
|
|
744
719
|
DropTipInDisposalLocationCommand,
|
|
@@ -807,9 +782,6 @@ Command = Union[
|
|
|
807
782
|
FlexStackerStoreCommand,
|
|
808
783
|
FlexStackerEmptyCommand,
|
|
809
784
|
FlexStackerFillCommand,
|
|
810
|
-
# Task commands
|
|
811
|
-
WaitForTasksCommand,
|
|
812
|
-
CreateTimerCommand,
|
|
813
785
|
]
|
|
814
786
|
|
|
815
787
|
|
|
@@ -870,9 +842,6 @@ CommandPayload = Union[
|
|
|
870
842
|
RobotMoveAxisRelativeCommandPayload,
|
|
871
843
|
RobotMoveAxisToCommandPayload,
|
|
872
844
|
GripperCommandPayload,
|
|
873
|
-
# Task payloads
|
|
874
|
-
WaitForTasksPayload,
|
|
875
|
-
CreateTimerPayload,
|
|
876
845
|
]
|
|
877
846
|
|
|
878
847
|
|
|
@@ -1155,14 +1124,6 @@ class RobotCloseGripperJawMessage(CommandMessageFields, RobotCloseGripperJawComm
|
|
|
1155
1124
|
pass
|
|
1156
1125
|
|
|
1157
1126
|
|
|
1158
|
-
class WaitForTasksMessage(CommandMessageFields, WaitForTasksCommand):
|
|
1159
|
-
pass
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
class CreateTimerMessage(CommandMessageFields, CreateTimerCommand):
|
|
1163
|
-
pass
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
1127
|
CommandMessage = Union[
|
|
1167
1128
|
DropTipMessage,
|
|
1168
1129
|
DropTipInDisposalLocationMessage,
|
|
@@ -1222,7 +1183,4 @@ CommandMessage = Union[
|
|
|
1222
1183
|
FlexStackerStoreMessage,
|
|
1223
1184
|
FlexStackerEmptyMessage,
|
|
1224
1185
|
FlexStackerFillMessage,
|
|
1225
|
-
# Task Messages
|
|
1226
|
-
WaitForTasksMessage,
|
|
1227
|
-
CreateTimerMessage,
|
|
1228
1186
|
]
|
|
@@ -7,6 +7,7 @@ from opentrons.hardware_control.types import CriticalPoint
|
|
|
7
7
|
|
|
8
8
|
from .types import Waypoint, MoveType, GripperMovementWaypointsWithJawStatus
|
|
9
9
|
from .errors import DestinationOutOfBoundsError, ArcOutOfBoundsError
|
|
10
|
+
from ..protocol_engine.types import LabwareMovementOffsetData
|
|
10
11
|
|
|
11
12
|
DEFAULT_GENERAL_ARC_Z_MARGIN: Final[float] = 10.0
|
|
12
13
|
DEFAULT_IN_LABWARE_ARC_Z_MARGIN: Final[float] = 5.0
|
|
@@ -124,41 +125,47 @@ def get_gripper_labware_movement_waypoints(
|
|
|
124
125
|
from_labware_center: Point,
|
|
125
126
|
to_labware_center: Point,
|
|
126
127
|
gripper_home_z: float,
|
|
128
|
+
offset_data: LabwareMovementOffsetData,
|
|
127
129
|
post_drop_slide_offset: Optional[Point],
|
|
128
130
|
gripper_home_z_offset: Optional[float] = None,
|
|
129
131
|
) -> List[GripperMovementWaypointsWithJawStatus]:
|
|
130
132
|
"""Get waypoints for moving labware using a gripper."""
|
|
133
|
+
pick_up_offset = offset_data.pickUpOffset
|
|
134
|
+
drop_offset = offset_data.dropOffset
|
|
135
|
+
|
|
136
|
+
pick_up_location = from_labware_center + Point(
|
|
137
|
+
pick_up_offset.x, pick_up_offset.y, pick_up_offset.z
|
|
138
|
+
)
|
|
139
|
+
drop_location = to_labware_center + Point(
|
|
140
|
+
drop_offset.x, drop_offset.y, drop_offset.z
|
|
141
|
+
)
|
|
142
|
+
|
|
131
143
|
gripper_max_z_home = gripper_home_z - (gripper_home_z_offset or 0)
|
|
132
|
-
|
|
144
|
+
|
|
145
|
+
post_drop_home_pos = Point(drop_location.x, drop_location.y, gripper_home_z)
|
|
133
146
|
|
|
134
147
|
waypoints_with_jaw_status = [
|
|
135
148
|
GripperMovementWaypointsWithJawStatus(
|
|
136
|
-
position=Point(
|
|
137
|
-
from_labware_center.x, from_labware_center.y, gripper_home_z
|
|
138
|
-
),
|
|
149
|
+
position=Point(pick_up_location.x, pick_up_location.y, gripper_home_z),
|
|
139
150
|
jaw_open=False,
|
|
140
151
|
dropping=False,
|
|
141
152
|
),
|
|
142
153
|
GripperMovementWaypointsWithJawStatus(
|
|
143
|
-
position=
|
|
154
|
+
position=pick_up_location, jaw_open=True, dropping=False
|
|
144
155
|
),
|
|
145
156
|
# Gripper grips the labware here
|
|
146
157
|
GripperMovementWaypointsWithJawStatus(
|
|
147
|
-
position=Point(
|
|
148
|
-
from_labware_center.x, from_labware_center.y, gripper_max_z_home
|
|
149
|
-
),
|
|
158
|
+
position=Point(pick_up_location.x, pick_up_location.y, gripper_max_z_home),
|
|
150
159
|
jaw_open=False,
|
|
151
160
|
dropping=False,
|
|
152
161
|
),
|
|
153
162
|
GripperMovementWaypointsWithJawStatus(
|
|
154
|
-
position=Point(
|
|
155
|
-
to_labware_center.x, to_labware_center.y, gripper_max_z_home
|
|
156
|
-
),
|
|
163
|
+
position=Point(drop_location.x, drop_location.y, gripper_max_z_home),
|
|
157
164
|
jaw_open=False,
|
|
158
165
|
dropping=False,
|
|
159
166
|
),
|
|
160
167
|
GripperMovementWaypointsWithJawStatus(
|
|
161
|
-
position=
|
|
168
|
+
position=drop_location, jaw_open=False, dropping=False
|
|
162
169
|
),
|
|
163
170
|
# Gripper ungrips here
|
|
164
171
|
GripperMovementWaypointsWithJawStatus(
|
|
@@ -182,18 +189,25 @@ def get_gripper_labware_movement_waypoints(
|
|
|
182
189
|
def get_gripper_labware_placement_waypoints(
|
|
183
190
|
to_labware_center: Point,
|
|
184
191
|
gripper_home_z: float,
|
|
192
|
+
drop_offset: Optional[Point],
|
|
185
193
|
) -> List[GripperMovementWaypointsWithJawStatus]:
|
|
186
194
|
"""Get waypoints for placing labware using a gripper."""
|
|
187
|
-
|
|
195
|
+
drop_offset = drop_offset or Point()
|
|
196
|
+
|
|
197
|
+
drop_location = to_labware_center + Point(
|
|
198
|
+
drop_offset.x, drop_offset.y, drop_offset.z
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
post_drop_home_pos = Point(drop_location.x, drop_location.y, gripper_home_z)
|
|
188
202
|
|
|
189
203
|
return [
|
|
190
204
|
GripperMovementWaypointsWithJawStatus(
|
|
191
|
-
position=Point(
|
|
205
|
+
position=Point(drop_location.x, drop_location.y, gripper_home_z),
|
|
192
206
|
jaw_open=False,
|
|
193
207
|
dropping=False,
|
|
194
208
|
),
|
|
195
209
|
GripperMovementWaypointsWithJawStatus(
|
|
196
|
-
position=
|
|
210
|
+
position=drop_location, jaw_open=False, dropping=False
|
|
197
211
|
),
|
|
198
212
|
# Gripper ungrips here
|
|
199
213
|
GripperMovementWaypointsWithJawStatus(
|
|
@@ -30,11 +30,9 @@ from .module_contexts import (
|
|
|
30
30
|
AbsorbanceReaderContext,
|
|
31
31
|
FlexStackerContext,
|
|
32
32
|
)
|
|
33
|
-
from .tasks import Task
|
|
34
33
|
from .disposal_locations import TrashBin, WasteChute
|
|
35
34
|
from ._liquid import Liquid, LiquidClass
|
|
36
35
|
from ._types import (
|
|
37
|
-
OffDeckType,
|
|
38
36
|
OFF_DECK,
|
|
39
37
|
PLUNGER_BLOWOUT,
|
|
40
38
|
PLUNGER_TOP,
|
|
@@ -90,7 +88,6 @@ __all__ = [
|
|
|
90
88
|
"ROW",
|
|
91
89
|
"ALL",
|
|
92
90
|
# Deck location types
|
|
93
|
-
"OffDeckType",
|
|
94
91
|
"OFF_DECK",
|
|
95
92
|
# Pipette plunger types
|
|
96
93
|
"PLUNGER_BLOWOUT",
|
|
@@ -102,8 +99,6 @@ __all__ = [
|
|
|
102
99
|
"BLOWOUT_ACTION",
|
|
103
100
|
"RuntimeParameterRequiredError",
|
|
104
101
|
"CSVParameter",
|
|
105
|
-
# Concurrent task types
|
|
106
|
-
"Task",
|
|
107
102
|
# For internal Opentrons use only:
|
|
108
103
|
"create_protocol_context",
|
|
109
104
|
"ProtocolEngineCoreRequiredError",
|
opentrons/protocol_api/_types.py
CHANGED
|
@@ -3,13 +3,8 @@ from typing_extensions import Final
|
|
|
3
3
|
import enum
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# TODO (tz, 5-18-23): think about a better name for it that would also work when we include staging area slots in the type.
|
|
7
7
|
class OffDeckType(enum.Enum):
|
|
8
|
-
"""The type of the :py:obj:`OFF_DECK` constant.
|
|
9
|
-
|
|
10
|
-
Do not use directly, except in type annotations and ``isinstance`` calls.
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
8
|
OFF_DECK = "off-deck"
|
|
14
9
|
|
|
15
10
|
|
|
@@ -16,7 +16,6 @@ from .module import (
|
|
|
16
16
|
from .protocol import AbstractProtocol
|
|
17
17
|
from .well import AbstractWellCore
|
|
18
18
|
from .robot import AbstractRobot
|
|
19
|
-
from .tasks import AbstractTaskCore
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
WellCore = AbstractWellCore
|
|
@@ -31,5 +30,4 @@ MagneticBlockCore = AbstractMagneticBlockCore[LabwareCore]
|
|
|
31
30
|
AbsorbanceReaderCore = AbstractAbsorbanceReaderCore[LabwareCore]
|
|
32
31
|
FlexStackerCore = AbstractFlexStackerCore[LabwareCore]
|
|
33
32
|
RobotCore = AbstractRobot
|
|
34
|
-
|
|
35
|
-
ProtocolCore = AbstractProtocol[InstrumentCore, LabwareCore, ModuleCore, TaskCore]
|
|
33
|
+
ProtocolCore = AbstractProtocol[InstrumentCore, LabwareCore, ModuleCore]
|
|
@@ -112,37 +112,6 @@ DEFAULT_LABWARE_VERSIONS: DefaultLabwareVersions = {
|
|
|
112
112
|
"thermoscientificnunc_96_wellplate_2000ul": 3,
|
|
113
113
|
"usascientific_96_wellplate_2.4ml_deep": 3,
|
|
114
114
|
},
|
|
115
|
-
APIVersion(2, 27): {
|
|
116
|
-
"agilent_1_reservoir_290ml": 4,
|
|
117
|
-
"axygen_1_reservoir_90ml": 3,
|
|
118
|
-
"biorad_96_wellplate_200ul_pcr": 5,
|
|
119
|
-
"corning_12_wellplate_6.9ml_flat": 5,
|
|
120
|
-
"corning_24_wellplate_3.4ml_flat": 5,
|
|
121
|
-
"corning_384_wellplate_112ul_flat": 5,
|
|
122
|
-
"corning_48_wellplate_1.6ml_flat": 6,
|
|
123
|
-
"corning_6_wellplate_16.8ml_flat": 5,
|
|
124
|
-
"corning_96_wellplate_360ul_flat": 5,
|
|
125
|
-
"nest_12_reservoir_15ml": 3,
|
|
126
|
-
"nest_1_reservoir_195ml": 4,
|
|
127
|
-
"nest_1_reservoir_290ml": 4,
|
|
128
|
-
"nest_96_wellplate_100ul_pcr_full_skirt": 5,
|
|
129
|
-
"nest_96_wellplate_200ul_flat": 5,
|
|
130
|
-
"nest_96_wellplate_2ml_deep": 5,
|
|
131
|
-
"opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical": 3,
|
|
132
|
-
"opentrons_15_tuberack_falcon_15ml_conical": 3,
|
|
133
|
-
"opentrons_24_aluminumblock_nest_0.5ml_screwcap": 4,
|
|
134
|
-
"opentrons_24_aluminumblock_nest_1.5ml_screwcap": 3,
|
|
135
|
-
"opentrons_24_aluminumblock_nest_1.5ml_snapcap": 3,
|
|
136
|
-
"opentrons_24_aluminumblock_nest_2ml_screwcap": 3,
|
|
137
|
-
"opentrons_24_aluminumblock_nest_2ml_snapcap": 3,
|
|
138
|
-
"opentrons_24_tuberack_eppendorf_1.5ml_safelock_snapcap": 3,
|
|
139
|
-
"opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap": 3,
|
|
140
|
-
"opentrons_24_tuberack_nest_0.5ml_screwcap": 4,
|
|
141
|
-
"opentrons_6_tuberack_nest_50ml_conical": 3,
|
|
142
|
-
"opentrons_96_aluminumblock_generic_pcr_strip_200ul": 4,
|
|
143
|
-
"usascientific_12_reservoir_22ml": 4,
|
|
144
|
-
"usascientific_96_wellplate_2.4ml_deep": 4,
|
|
145
|
-
},
|
|
146
115
|
}
|
|
147
116
|
|
|
148
117
|
|
|
@@ -170,7 +139,17 @@ KNOWN_EXCEPTIONS_FOR_TESTS: set[str] = {
|
|
|
170
139
|
"schema3test_flex_tiprack_lid",
|
|
171
140
|
"schema3test_tough_pcr_auto_sealing_lid",
|
|
172
141
|
"schema3test_universal_flat_adapter",
|
|
173
|
-
|
|
142
|
+
# These were supposed to be short-lived drafts as part of of a one-two punch of
|
|
143
|
+
# https://github.com/Opentrons/opentrons/pull/18266 + https://github.com/Opentrons/opentrons/pull/18284,
|
|
144
|
+
# but the second punch took a while. We should merge the second punch after v8.6.0
|
|
145
|
+
# and remove these exceptions as part of that.
|
|
146
|
+
"agilent_1_reservoir_290ml",
|
|
147
|
+
"corning_384_wellplate_112ul_flat",
|
|
148
|
+
"nest_1_reservoir_290ml",
|
|
149
|
+
"opentrons_24_aluminumblock_nest_0.5ml_screwcap",
|
|
150
|
+
"opentrons_24_tuberack_nest_0.5ml_screwcap",
|
|
151
|
+
"opentrons_96_aluminumblock_generic_pcr_strip_200ul",
|
|
152
|
+
"usascientific_12_reservoir_22ml",
|
|
174
153
|
}
|
|
175
154
|
|
|
176
155
|
|
|
@@ -23,7 +23,6 @@ from opentrons.protocol_engine.clients import SyncClient as ProtocolEngineClient
|
|
|
23
23
|
from opentrons.protocol_engine.types import (
|
|
24
24
|
LabwareOffsetCreate,
|
|
25
25
|
LabwareOffsetVector,
|
|
26
|
-
TipRackWellState,
|
|
27
26
|
)
|
|
28
27
|
from opentrons.types import DeckSlotName, NozzleMapInterface, Point, StagingSlotName
|
|
29
28
|
|
|
@@ -166,13 +165,7 @@ class LabwareCore(AbstractLabware[WellCore]):
|
|
|
166
165
|
|
|
167
166
|
def reset_tips(self) -> None:
|
|
168
167
|
if self.is_tip_rack():
|
|
169
|
-
self._engine_client.
|
|
170
|
-
cmd.SetTipStateParams(
|
|
171
|
-
labwareId=self._labware_id,
|
|
172
|
-
wellNames=list(self._definition.wells),
|
|
173
|
-
tipWellState=TipRackWellState.CLEAN,
|
|
174
|
-
)
|
|
175
|
-
)
|
|
168
|
+
self._engine_client.reset_tips(labware_id=self.labware_id)
|
|
176
169
|
else:
|
|
177
170
|
raise TypeError(f"{self.get_display_name()} is not a tip rack.")
|
|
178
171
|
|
|
@@ -317,7 +317,6 @@ class ThermocyclerModuleCore(ModuleCore, AbstractThermocyclerCore[LabwareCore]):
|
|
|
317
317
|
def set_target_block_temperature(
|
|
318
318
|
self,
|
|
319
319
|
celsius: float,
|
|
320
|
-
ramp_rate: Optional[float],
|
|
321
320
|
hold_time_seconds: Optional[float] = None,
|
|
322
321
|
block_max_volume: Optional[float] = None,
|
|
323
322
|
) -> None:
|
|
@@ -328,7 +327,6 @@ class ThermocyclerModuleCore(ModuleCore, AbstractThermocyclerCore[LabwareCore]):
|
|
|
328
327
|
celsius=celsius,
|
|
329
328
|
blockMaxVolumeUl=block_max_volume,
|
|
330
329
|
holdTimeSeconds=hold_time_seconds,
|
|
331
|
-
ramp_rate=ramp_rate,
|
|
332
330
|
)
|
|
333
331
|
)
|
|
334
332
|
|
|
@@ -363,7 +361,6 @@ class ThermocyclerModuleCore(ModuleCore, AbstractThermocyclerCore[LabwareCore]):
|
|
|
363
361
|
cmd.thermocycler.RunProfileStepParams(
|
|
364
362
|
celsius=step["temperature"],
|
|
365
363
|
holdSeconds=step["hold_time_seconds"],
|
|
366
|
-
rampRate=step["ramp_rate"],
|
|
367
364
|
)
|
|
368
365
|
for step in steps
|
|
369
366
|
]
|
|
@@ -392,7 +389,6 @@ class ThermocyclerModuleCore(ModuleCore, AbstractThermocyclerCore[LabwareCore]):
|
|
|
392
389
|
cmd.thermocycler.ProfileStep(
|
|
393
390
|
celsius=step["temperature"],
|
|
394
391
|
holdSeconds=step["hold_time_seconds"],
|
|
395
|
-
rampRate=step["ramp_rate"],
|
|
396
392
|
)
|
|
397
393
|
for step in steps
|
|
398
394
|
],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""ProtocolEngine-based Protocol API core implementation."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from typing import Dict, Optional, Type, Union, List, Tuple, TYPE_CHECKING
|
|
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
7
|
from opentrons_shared_data.deck.types import DeckDefinitionV5, SlotDefV3
|
|
@@ -64,7 +64,6 @@ from ...disposal_locations import TrashBin, WasteChute
|
|
|
64
64
|
from ..protocol import AbstractProtocol
|
|
65
65
|
from ..labware import LabwareLoadParams
|
|
66
66
|
from .labware import LabwareCore
|
|
67
|
-
from .tasks import EngineTaskCore
|
|
68
67
|
from .instrument import InstrumentCore
|
|
69
68
|
from .robot import RobotCore
|
|
70
69
|
from .module_core import (
|
|
@@ -96,7 +95,6 @@ class ProtocolCore(
|
|
|
96
95
|
InstrumentCore,
|
|
97
96
|
LabwareCore,
|
|
98
97
|
Union[ModuleCore, NonConnectedModuleCore],
|
|
99
|
-
EngineTaskCore,
|
|
100
98
|
]
|
|
101
99
|
):
|
|
102
100
|
"""Protocol API core using a ProtocolEngine.
|
|
@@ -499,13 +497,28 @@ class ProtocolCore(
|
|
|
499
497
|
)
|
|
500
498
|
# if this is a labware with a lid, we just need to find its lid_id
|
|
501
499
|
else:
|
|
502
|
-
|
|
503
|
-
|
|
500
|
+
# we need to check to see if this labware is hosting a lid stack
|
|
501
|
+
potential_lid_stack = (
|
|
502
|
+
self._engine_client.state.labware.get_next_child_labware(
|
|
503
|
+
labware.labware_id
|
|
504
|
+
)
|
|
504
505
|
)
|
|
505
|
-
if
|
|
506
|
-
|
|
506
|
+
if potential_lid_stack and labware_validation.is_lid_stack(
|
|
507
|
+
self._engine_client.state.labware.get_load_name(potential_lid_stack)
|
|
508
|
+
):
|
|
509
|
+
lid_id = self._engine_client.state.labware.get_highest_child_labware(
|
|
510
|
+
labware.labware_id
|
|
511
|
+
)
|
|
507
512
|
else:
|
|
508
|
-
|
|
513
|
+
lid = self._engine_client.state.labware.get_lid_by_labware_id(
|
|
514
|
+
labware.labware_id
|
|
515
|
+
)
|
|
516
|
+
if lid is not None:
|
|
517
|
+
lid_id = lid.id
|
|
518
|
+
else:
|
|
519
|
+
raise ValueError(
|
|
520
|
+
f"Cannot move a lid off of {labware.get_display_name()} because it has no lid."
|
|
521
|
+
)
|
|
509
522
|
|
|
510
523
|
_pick_up_offset = (
|
|
511
524
|
LabwareOffsetVector(
|
|
@@ -609,6 +622,9 @@ class ProtocolCore(
|
|
|
609
622
|
)
|
|
610
623
|
|
|
611
624
|
# Handle leftover empty lid stack if there is one
|
|
625
|
+
potential_lid_stack = self._engine_client.state.labware.get_next_child_labware(
|
|
626
|
+
labware.labware_id
|
|
627
|
+
)
|
|
612
628
|
if (
|
|
613
629
|
labware_validation.is_lid_stack(labware.load_name)
|
|
614
630
|
and self._engine_client.state.labware.get_highest_child_labware(
|
|
@@ -626,6 +642,25 @@ class ProtocolCore(
|
|
|
626
642
|
dropOffset=None,
|
|
627
643
|
)
|
|
628
644
|
)
|
|
645
|
+
elif (
|
|
646
|
+
potential_lid_stack
|
|
647
|
+
and labware_validation.is_lid_stack(
|
|
648
|
+
self._engine_client.state.labware.get_load_name(potential_lid_stack)
|
|
649
|
+
)
|
|
650
|
+
and self._engine_client.state.labware.get_highest_child_labware(
|
|
651
|
+
potential_lid_stack
|
|
652
|
+
)
|
|
653
|
+
== potential_lid_stack
|
|
654
|
+
):
|
|
655
|
+
self._engine_client.execute_command(
|
|
656
|
+
cmd.MoveLabwareParams(
|
|
657
|
+
labwareId=potential_lid_stack,
|
|
658
|
+
newLocation=SYSTEM_LOCATION,
|
|
659
|
+
strategy=LabwareMovementStrategy.MANUAL_MOVE_WITHOUT_PAUSE,
|
|
660
|
+
pickUpOffset=None,
|
|
661
|
+
dropOffset=None,
|
|
662
|
+
)
|
|
663
|
+
)
|
|
629
664
|
|
|
630
665
|
if strategy == LabwareMovementStrategy.USING_GRIPPER:
|
|
631
666
|
# Clear out last location since it is not relevant to pipetting
|
|
@@ -877,21 +912,6 @@ class ProtocolCore(
|
|
|
877
912
|
cmd.WaitForDurationParams(seconds=seconds, message=msg)
|
|
878
913
|
)
|
|
879
914
|
|
|
880
|
-
def wait_for_tasks(self, task_cores: Sequence[EngineTaskCore]) -> None:
|
|
881
|
-
"""Wait for specified tasks to complete."""
|
|
882
|
-
task_ids = [task._id for task in task_cores]
|
|
883
|
-
self._engine_client.execute_command(cmd.WaitForTasksParams(task_ids=task_ids))
|
|
884
|
-
|
|
885
|
-
def create_timer(self, seconds: float) -> EngineTaskCore:
|
|
886
|
-
"""Create a timer task that runs in the background."""
|
|
887
|
-
result = self._engine_client.execute_command_without_recovery(
|
|
888
|
-
cmd.CreateTimerParams(time=seconds)
|
|
889
|
-
)
|
|
890
|
-
timer_task = EngineTaskCore(
|
|
891
|
-
engine_client=self._engine_client, task_id=result.task_id
|
|
892
|
-
)
|
|
893
|
-
return timer_task
|
|
894
|
-
|
|
895
915
|
def home(self) -> None:
|
|
896
916
|
"""Move all axes to their home positions."""
|
|
897
917
|
self._engine_client.execute_command(cmd.HomeParams(axes=None))
|
|
@@ -263,7 +263,6 @@ class LegacyThermocyclerCore(
|
|
|
263
263
|
def set_target_block_temperature(
|
|
264
264
|
self,
|
|
265
265
|
celsius: float,
|
|
266
|
-
ramp_rate: Optional[float],
|
|
267
266
|
hold_time_seconds: Optional[float] = None,
|
|
268
267
|
block_max_volume: Optional[float] = None,
|
|
269
268
|
) -> None:
|
|
@@ -272,7 +271,6 @@ class LegacyThermocyclerCore(
|
|
|
272
271
|
celsius=celsius,
|
|
273
272
|
hold_time_seconds=hold_time_seconds,
|
|
274
273
|
volume=block_max_volume,
|
|
275
|
-
ramp_rate=ramp_rate,
|
|
276
274
|
)
|
|
277
275
|
|
|
278
276
|
def wait_for_block_temperature(self) -> None:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Dict, List, Optional, Set, Union, cast, Tuple
|
|
2
|
+
from typing import Dict, List, Optional, Set, Union, cast, Tuple
|
|
3
3
|
|
|
4
4
|
from opentrons_shared_data.deck.types import DeckDefinitionV5, SlotDefV3
|
|
5
5
|
from opentrons_shared_data.labware.types import LabwareDefinition
|
|
@@ -34,7 +34,6 @@ from .legacy_instrument_core import LegacyInstrumentCore
|
|
|
34
34
|
from .labware_offset_provider import AbstractLabwareOffsetProvider
|
|
35
35
|
from .legacy_labware_core import LegacyLabwareCore
|
|
36
36
|
from .load_info import LoadInfo, InstrumentLoadInfo, LabwareLoadInfo, ModuleLoadInfo
|
|
37
|
-
from .tasks import LegacyTaskCore
|
|
38
37
|
|
|
39
38
|
logger = logging.getLogger(__name__)
|
|
40
39
|
|
|
@@ -44,7 +43,6 @@ class LegacyProtocolCore(
|
|
|
44
43
|
LegacyInstrumentCore,
|
|
45
44
|
LegacyLabwareCore,
|
|
46
45
|
legacy_module_core.LegacyModuleCore,
|
|
47
|
-
LegacyTaskCore,
|
|
48
46
|
]
|
|
49
47
|
):
|
|
50
48
|
def __init__(
|
|
@@ -612,11 +610,3 @@ class LegacyProtocolCore(
|
|
|
612
610
|
]:
|
|
613
611
|
"""Get labware parent location."""
|
|
614
612
|
assert False, "get_labware_location only supported on engine core"
|
|
615
|
-
|
|
616
|
-
def wait_for_tasks(self, task: Sequence[LegacyTaskCore]) -> None:
|
|
617
|
-
"""Wait for list of tasks to complete before executing subsequent commands."""
|
|
618
|
-
assert False, "wait_for_tasks only supported on engine core"
|
|
619
|
-
|
|
620
|
-
def create_timer(self, seconds: float) -> LegacyTaskCore:
|
|
621
|
-
"""Create a timer task that runs in the background."""
|
|
622
|
-
assert False, "create_timer only supported on engine core"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Dict, Optional
|
|
2
|
+
from typing import Dict, Optional
|
|
3
3
|
|
|
4
4
|
from opentrons_shared_data.pipette.types import PipetteNameType
|
|
5
5
|
from opentrons_shared_data.pipette.pipette_load_name_conversions import (
|
|
@@ -16,7 +16,6 @@ from ..legacy.legacy_module_core import LegacyModuleCore
|
|
|
16
16
|
from ..legacy.load_info import InstrumentLoadInfo
|
|
17
17
|
|
|
18
18
|
from .legacy_instrument_core import LegacyInstrumentCoreSimulator
|
|
19
|
-
from .tasks import LegacyTaskCore
|
|
20
19
|
|
|
21
20
|
logger = logging.getLogger(__name__)
|
|
22
21
|
|
|
@@ -24,10 +23,7 @@ logger = logging.getLogger(__name__)
|
|
|
24
23
|
class LegacyProtocolCoreSimulator(
|
|
25
24
|
LegacyProtocolCore,
|
|
26
25
|
AbstractProtocol[
|
|
27
|
-
LegacyInstrumentCoreSimulator,
|
|
28
|
-
LegacyLabwareCore,
|
|
29
|
-
LegacyModuleCore,
|
|
30
|
-
LegacyTaskCore,
|
|
26
|
+
LegacyInstrumentCoreSimulator, LegacyLabwareCore, LegacyModuleCore
|
|
31
27
|
],
|
|
32
28
|
):
|
|
33
29
|
_instruments: Dict[Mount, Optional[LegacyInstrumentCoreSimulator]] # type: ignore[assignment]
|
|
@@ -87,11 +83,3 @@ class LegacyProtocolCoreSimulator(
|
|
|
87
83
|
)
|
|
88
84
|
|
|
89
85
|
return new_instr
|
|
90
|
-
|
|
91
|
-
def wait_for_tasks(self, task: Sequence[LegacyTaskCore]) -> None:
|
|
92
|
-
"""Wait for list of tasks to complete before executing subsequent commands."""
|
|
93
|
-
assert False, "wait_for_tasks only supported on engine core"
|
|
94
|
-
|
|
95
|
-
def create_timer(self, seconds: float) -> LegacyTaskCore:
|
|
96
|
-
"""Create a timer task that runs in the background."""
|
|
97
|
-
assert False, "create_timer only supported on engine core"
|