opentrons 8.7.0a9__py3-none-any.whl → 8.8.0a8__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/_version.py +2 -2
- opentrons/cli/analyze.py +4 -1
- opentrons/config/__init__.py +7 -0
- opentrons/drivers/asyncio/communication/serial_connection.py +126 -49
- opentrons/drivers/heater_shaker/abstract.py +5 -0
- opentrons/drivers/heater_shaker/driver.py +10 -0
- opentrons/drivers/heater_shaker/simulator.py +4 -0
- opentrons/drivers/thermocycler/abstract.py +6 -0
- opentrons/drivers/thermocycler/driver.py +61 -10
- opentrons/drivers/thermocycler/simulator.py +6 -0
- opentrons/drivers/vacuum_module/__init__.py +5 -0
- opentrons/drivers/vacuum_module/abstract.py +93 -0
- opentrons/drivers/vacuum_module/driver.py +208 -0
- opentrons/drivers/vacuum_module/errors.py +39 -0
- opentrons/drivers/vacuum_module/simulator.py +85 -0
- opentrons/drivers/vacuum_module/types.py +79 -0
- opentrons/execute.py +3 -0
- opentrons/hardware_control/api.py +24 -5
- opentrons/hardware_control/backends/controller.py +8 -2
- opentrons/hardware_control/backends/flex_protocol.py +1 -0
- opentrons/hardware_control/backends/ot3controller.py +35 -2
- opentrons/hardware_control/backends/ot3simulator.py +3 -1
- opentrons/hardware_control/backends/ot3utils.py +37 -0
- opentrons/hardware_control/backends/simulator.py +2 -1
- opentrons/hardware_control/backends/subsystem_manager.py +5 -2
- opentrons/hardware_control/emulation/abstract_emulator.py +6 -4
- opentrons/hardware_control/emulation/connection_handler.py +8 -5
- opentrons/hardware_control/emulation/heater_shaker.py +12 -3
- opentrons/hardware_control/emulation/settings.py +1 -1
- opentrons/hardware_control/emulation/thermocycler.py +67 -15
- opentrons/hardware_control/module_control.py +105 -10
- opentrons/hardware_control/modules/__init__.py +3 -0
- opentrons/hardware_control/modules/absorbance_reader.py +11 -4
- opentrons/hardware_control/modules/flex_stacker.py +38 -9
- opentrons/hardware_control/modules/heater_shaker.py +42 -5
- opentrons/hardware_control/modules/magdeck.py +8 -4
- opentrons/hardware_control/modules/mod_abc.py +14 -6
- opentrons/hardware_control/modules/tempdeck.py +25 -5
- opentrons/hardware_control/modules/thermocycler.py +68 -11
- opentrons/hardware_control/modules/types.py +20 -1
- opentrons/hardware_control/modules/utils.py +11 -4
- opentrons/hardware_control/motion_utilities.py +6 -6
- opentrons/hardware_control/nozzle_manager.py +3 -0
- opentrons/hardware_control/ot3api.py +92 -17
- opentrons/hardware_control/poller.py +22 -8
- opentrons/hardware_control/protocols/liquid_handler.py +12 -4
- opentrons/hardware_control/scripts/update_module_fw.py +5 -0
- opentrons/hardware_control/types.py +43 -2
- opentrons/legacy_commands/commands.py +58 -5
- opentrons/legacy_commands/module_commands.py +52 -0
- opentrons/legacy_commands/protocol_commands.py +53 -1
- opentrons/legacy_commands/types.py +155 -1
- opentrons/motion_planning/deck_conflict.py +17 -12
- opentrons/motion_planning/waypoints.py +15 -29
- opentrons/protocol_api/__init__.py +5 -1
- opentrons/protocol_api/_transfer_liquid_validation.py +17 -2
- opentrons/protocol_api/_types.py +8 -1
- opentrons/protocol_api/core/common.py +3 -1
- opentrons/protocol_api/core/engine/_default_labware_versions.py +33 -11
- opentrons/protocol_api/core/engine/deck_conflict.py +3 -1
- opentrons/protocol_api/core/engine/instrument.py +109 -26
- opentrons/protocol_api/core/engine/labware.py +8 -1
- opentrons/protocol_api/core/engine/module_core.py +95 -4
- opentrons/protocol_api/core/engine/pipette_movement_conflict.py +4 -18
- opentrons/protocol_api/core/engine/protocol.py +51 -2
- opentrons/protocol_api/core/engine/stringify.py +2 -0
- opentrons/protocol_api/core/engine/tasks.py +48 -0
- opentrons/protocol_api/core/engine/well.py +8 -0
- opentrons/protocol_api/core/instrument.py +19 -2
- opentrons/protocol_api/core/legacy/legacy_instrument_core.py +19 -2
- opentrons/protocol_api/core/legacy/legacy_module_core.py +33 -2
- opentrons/protocol_api/core/legacy/legacy_protocol_core.py +23 -1
- opentrons/protocol_api/core/legacy/legacy_well_core.py +4 -0
- opentrons/protocol_api/core/legacy/tasks.py +19 -0
- opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py +19 -2
- opentrons/protocol_api/core/legacy_simulator/legacy_protocol_core.py +14 -2
- opentrons/protocol_api/core/legacy_simulator/tasks.py +19 -0
- opentrons/protocol_api/core/module.py +58 -2
- opentrons/protocol_api/core/protocol.py +23 -2
- opentrons/protocol_api/core/tasks.py +31 -0
- opentrons/protocol_api/core/well.py +4 -0
- opentrons/protocol_api/instrument_context.py +388 -2
- opentrons/protocol_api/labware.py +10 -2
- opentrons/protocol_api/module_contexts.py +170 -6
- opentrons/protocol_api/protocol_context.py +87 -21
- opentrons/protocol_api/robot_context.py +41 -25
- opentrons/protocol_api/tasks.py +48 -0
- opentrons/protocol_api/validation.py +49 -3
- opentrons/protocol_engine/__init__.py +4 -0
- opentrons/protocol_engine/actions/__init__.py +6 -2
- opentrons/protocol_engine/actions/actions.py +31 -9
- opentrons/protocol_engine/clients/sync_client.py +42 -7
- opentrons/protocol_engine/commands/__init__.py +56 -0
- opentrons/protocol_engine/commands/absorbance_reader/close_lid.py +2 -15
- opentrons/protocol_engine/commands/absorbance_reader/open_lid.py +2 -15
- opentrons/protocol_engine/commands/absorbance_reader/read.py +22 -23
- opentrons/protocol_engine/commands/aspirate.py +1 -0
- opentrons/protocol_engine/commands/aspirate_while_tracking.py +52 -19
- opentrons/protocol_engine/commands/capture_image.py +302 -0
- opentrons/protocol_engine/commands/command.py +2 -0
- opentrons/protocol_engine/commands/command_unions.py +62 -0
- opentrons/protocol_engine/commands/create_timer.py +83 -0
- opentrons/protocol_engine/commands/dispense.py +1 -0
- opentrons/protocol_engine/commands/dispense_while_tracking.py +56 -19
- opentrons/protocol_engine/commands/drop_tip.py +32 -8
- opentrons/protocol_engine/commands/flex_stacker/common.py +35 -0
- opentrons/protocol_engine/commands/flex_stacker/set_stored_labware.py +7 -0
- opentrons/protocol_engine/commands/heater_shaker/__init__.py +14 -0
- opentrons/protocol_engine/commands/heater_shaker/common.py +20 -0
- opentrons/protocol_engine/commands/heater_shaker/set_and_wait_for_shake_speed.py +5 -4
- opentrons/protocol_engine/commands/heater_shaker/set_shake_speed.py +136 -0
- opentrons/protocol_engine/commands/heater_shaker/set_target_temperature.py +31 -5
- opentrons/protocol_engine/commands/move_labware.py +3 -4
- opentrons/protocol_engine/commands/move_to_addressable_area_for_drop_tip.py +1 -1
- opentrons/protocol_engine/commands/movement_common.py +31 -2
- opentrons/protocol_engine/commands/pick_up_tip.py +21 -11
- opentrons/protocol_engine/commands/pipetting_common.py +48 -3
- opentrons/protocol_engine/commands/set_tip_state.py +97 -0
- opentrons/protocol_engine/commands/temperature_module/set_target_temperature.py +38 -7
- opentrons/protocol_engine/commands/thermocycler/__init__.py +16 -0
- opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py +6 -0
- opentrons/protocol_engine/commands/thermocycler/run_profile.py +8 -0
- opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py +44 -7
- opentrons/protocol_engine/commands/thermocycler/set_target_lid_temperature.py +43 -14
- opentrons/protocol_engine/commands/thermocycler/start_run_extended_profile.py +191 -0
- opentrons/protocol_engine/commands/touch_tip.py +1 -1
- opentrons/protocol_engine/commands/unsafe/unsafe_place_labware.py +6 -22
- opentrons/protocol_engine/commands/wait_for_tasks.py +98 -0
- opentrons/protocol_engine/create_protocol_engine.py +12 -0
- opentrons/protocol_engine/engine_support.py +3 -0
- opentrons/protocol_engine/errors/__init__.py +12 -0
- opentrons/protocol_engine/errors/exceptions.py +119 -0
- opentrons/protocol_engine/execution/__init__.py +4 -0
- opentrons/protocol_engine/execution/command_executor.py +62 -1
- opentrons/protocol_engine/execution/create_queue_worker.py +9 -2
- opentrons/protocol_engine/execution/labware_movement.py +13 -15
- opentrons/protocol_engine/execution/movement.py +2 -0
- opentrons/protocol_engine/execution/pipetting.py +26 -25
- opentrons/protocol_engine/execution/queue_worker.py +4 -0
- opentrons/protocol_engine/execution/run_control.py +8 -0
- opentrons/protocol_engine/execution/task_handler.py +157 -0
- opentrons/protocol_engine/protocol_engine.py +137 -36
- opentrons/protocol_engine/resources/__init__.py +4 -0
- opentrons/protocol_engine/resources/camera_provider.py +110 -0
- opentrons/protocol_engine/resources/concurrency_provider.py +27 -0
- opentrons/protocol_engine/resources/deck_configuration_provider.py +7 -0
- opentrons/protocol_engine/resources/file_provider.py +133 -58
- opentrons/protocol_engine/resources/labware_validation.py +10 -6
- opentrons/protocol_engine/slot_standardization.py +2 -0
- opentrons/protocol_engine/state/_well_math.py +60 -18
- opentrons/protocol_engine/state/addressable_areas.py +2 -0
- opentrons/protocol_engine/state/camera.py +54 -0
- opentrons/protocol_engine/state/commands.py +37 -14
- opentrons/protocol_engine/state/geometry.py +276 -379
- opentrons/protocol_engine/state/labware.py +62 -108
- opentrons/protocol_engine/state/labware_origin_math/errors.py +94 -0
- opentrons/protocol_engine/state/labware_origin_math/stackup_origin_to_labware_origin.py +1336 -0
- opentrons/protocol_engine/state/module_substates/thermocycler_module_substate.py +37 -0
- opentrons/protocol_engine/state/modules.py +30 -8
- opentrons/protocol_engine/state/motion.py +60 -18
- opentrons/protocol_engine/state/preconditions.py +59 -0
- opentrons/protocol_engine/state/state.py +44 -0
- opentrons/protocol_engine/state/state_summary.py +4 -0
- opentrons/protocol_engine/state/tasks.py +139 -0
- opentrons/protocol_engine/state/tips.py +177 -258
- opentrons/protocol_engine/state/update_types.py +26 -9
- opentrons/protocol_engine/types/__init__.py +23 -4
- opentrons/protocol_engine/types/command_preconditions.py +18 -0
- opentrons/protocol_engine/types/deck_configuration.py +5 -1
- opentrons/protocol_engine/types/instrument.py +8 -1
- opentrons/protocol_engine/types/labware.py +1 -13
- opentrons/protocol_engine/types/location.py +26 -2
- opentrons/protocol_engine/types/module.py +11 -1
- opentrons/protocol_engine/types/tasks.py +38 -0
- opentrons/protocol_engine/types/tip.py +9 -0
- opentrons/protocol_runner/create_simulating_orchestrator.py +29 -2
- opentrons/protocol_runner/protocol_runner.py +14 -1
- opentrons/protocol_runner/run_orchestrator.py +49 -2
- opentrons/protocols/advanced_control/transfers/transfer_liquid_utils.py +2 -2
- opentrons/protocols/api_support/definitions.py +1 -1
- opentrons/protocols/api_support/types.py +2 -1
- opentrons/simulate.py +51 -15
- opentrons/system/camera.py +334 -4
- opentrons/system/ffmpeg.py +110 -0
- {opentrons-8.7.0a9.dist-info → opentrons-8.8.0a8.dist-info}/METADATA +4 -4
- {opentrons-8.7.0a9.dist-info → opentrons-8.8.0a8.dist-info}/RECORD +189 -161
- opentrons/protocol_engine/state/_labware_origin_math.py +0 -636
- {opentrons-8.7.0a9.dist-info → opentrons-8.8.0a8.dist-info}/WHEEL +0 -0
- {opentrons-8.7.0a9.dist-info → opentrons-8.8.0a8.dist-info}/entry_points.txt +0 -0
- {opentrons-8.7.0a9.dist-info → opentrons-8.8.0a8.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
from typing_extensions import Literal, Final, TypedDict
|
|
4
|
-
from typing import Optional, List, Sequence, TYPE_CHECKING, Union
|
|
4
|
+
from typing import Optional, List, Sequence, TYPE_CHECKING, Union, Tuple
|
|
5
5
|
from opentrons.hardware_control.modules import ThermocyclerStep
|
|
6
6
|
|
|
7
7
|
if TYPE_CHECKING:
|
|
@@ -25,6 +25,7 @@ PAUSE: Final = "command.PAUSE"
|
|
|
25
25
|
RESUME: Final = "command.RESUME"
|
|
26
26
|
COMMENT: Final = "command.COMMENT"
|
|
27
27
|
MOVE_LABWARE: Final = "command.MOVE_LABWARE"
|
|
28
|
+
CAPTURE_IMAGE: Final = "command.CAPTURE_IMAGE"
|
|
28
29
|
|
|
29
30
|
# Pipette #
|
|
30
31
|
|
|
@@ -64,6 +65,7 @@ HEATER_SHAKER_WAIT_FOR_TEMPERATURE: Final = "command.HEATER_SHAKER_WAIT_FOR_TEMP
|
|
|
64
65
|
HEATER_SHAKER_SET_AND_WAIT_FOR_SHAKE_SPEED: Final = (
|
|
65
66
|
"command.HEATER_SHAKER_SET_AND_WAIT_FOR_SHAKE_SPEED"
|
|
66
67
|
)
|
|
68
|
+
HEATER_SHAKER_SET_SHAKE_SPEED: Final = "command.HEATER_SHAKER_SET_SHAKE_SPEED"
|
|
67
69
|
HEATER_SHAKER_OPEN_LABWARE_LATCH: Final = "command.HEATER_SHAKER_OPEN_LABWARE_LATCH"
|
|
68
70
|
HEATER_SHAKER_CLOSE_LABWARE_LATCH: Final = "command.HEATER_SHAKER_CLOSE_LABWARE_LATCH"
|
|
69
71
|
HEATER_SHAKER_DEACTIVATE_SHAKER: Final = "command.HEATER_SHAKER_DEACTIVATE_SHAKER"
|
|
@@ -80,12 +82,15 @@ TEMPDECK_AWAIT_TEMP: Final = "command.TEMPDECK_AWAIT_TEMP"
|
|
|
80
82
|
THERMOCYCLER_OPEN: Final = "command.THERMOCYCLER_OPEN"
|
|
81
83
|
THERMOCYCLER_CLOSE: Final = "command.THERMOCYCLER_CLOSE"
|
|
82
84
|
THERMOCYCLER_SET_BLOCK_TEMP: Final = "command.THERMOCYCLER_SET_BLOCK_TEMP"
|
|
85
|
+
THERMOCYCLER_START_SET_BLOCK_TEMP: Final = "command.THERMOCYCLER_START_SET_BLOCK_TEMP"
|
|
83
86
|
THERMOCYCLER_EXECUTE_PROFILE: Final = "command.THERMOCYCLER_EXECUTE_PROFILE"
|
|
87
|
+
THERMOCYCLER_START_EXECUTE_PROFILE: Final = "command.THERMOCYCLER_START_EXECUTE_PROFILE"
|
|
84
88
|
THERMOCYCLER_DEACTIVATE: Final = "command.THERMOCYCLER_DEACTIVATE"
|
|
85
89
|
THERMOCYCLER_WAIT_FOR_HOLD: Final = "command.THERMOCYCLER_WAIT_FOR_HOLD"
|
|
86
90
|
THERMOCYCLER_WAIT_FOR_TEMP: Final = "command.THERMOCYCLER_WAIT_FOR_TEMP"
|
|
87
91
|
THERMOCYCLER_WAIT_FOR_LID_TEMP: Final = "command.THERMOCYCLER_WAIT_FOR_LID_TEMP"
|
|
88
92
|
THERMOCYCLER_SET_LID_TEMP: Final = "command.THERMOCYCLER_SET_LID_TEMP"
|
|
93
|
+
THERMOCYCLER_START_SET_LID_TEMP: Final = "command.THERMOCYCLER_START_SET_LID_TEMP"
|
|
89
94
|
THERMOCYCLER_DEACTIVATE_LID: Final = "command.THERMOCYCLER_DEACTIVATE_LID"
|
|
90
95
|
THERMOCYCLER_DEACTIVATE_BLOCK: Final = "command.THERMOCYCLER_DEACTIVATE_BLOCK"
|
|
91
96
|
|
|
@@ -102,6 +107,10 @@ ROBOT_MOVE_RELATIVE_TO: Final = "command.ROBOT_MOVE_RELATIVE_TO"
|
|
|
102
107
|
ROBOT_OPEN_GRIPPER_JAW: Final = "command.ROBOT_OPEN_GRIPPER_JAW"
|
|
103
108
|
ROBOT_CLOSE_GRIPPER_JAW: Final = "command.ROBOT_CLOSE_GRIPPER_JAW"
|
|
104
109
|
|
|
110
|
+
# Tasks #
|
|
111
|
+
WAIT_FOR_TASKS: Final = "command.WAIT_FOR_TASKS"
|
|
112
|
+
CREATE_TIMER: Final = "command.CREATE_TIMER"
|
|
113
|
+
|
|
105
114
|
|
|
106
115
|
class TextOnlyPayload(TypedDict):
|
|
107
116
|
text: str
|
|
@@ -190,6 +199,15 @@ class HeaterShakerSetAndWaitForShakeSpeedCommand(TypedDict):
|
|
|
190
199
|
payload: HeaterShakerSetAndWaitForShakeSpeedPayload
|
|
191
200
|
|
|
192
201
|
|
|
202
|
+
class HeaterShakerSetShakeSpeedPayload(TextOnlyPayload):
|
|
203
|
+
pass
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
class HeaterShakerSetShakeSpeedCommand(TypedDict):
|
|
207
|
+
name: Literal["command.HEATER_SHAKER_SET_SHAKE_SPEED"]
|
|
208
|
+
payload: HeaterShakerSetShakeSpeedPayload
|
|
209
|
+
|
|
210
|
+
|
|
193
211
|
class HeaterShakerOpenLabwareLatchPayload(TextOnlyPayload):
|
|
194
212
|
pass
|
|
195
213
|
|
|
@@ -299,6 +317,15 @@ class ThermocyclerSetBlockTempCommand(TypedDict):
|
|
|
299
317
|
payload: ThermocyclerSetBlockTempCommandPayload
|
|
300
318
|
|
|
301
319
|
|
|
320
|
+
class ThermocyclerStartSetBlockTempCommandPayload(TextOnlyPayload):
|
|
321
|
+
temperature: float
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
class ThermocyclerStartSetBlockTempCommand(TypedDict):
|
|
325
|
+
name: Literal["command.THERMOCYCLER_START_SET_BLOCK_TEMP"]
|
|
326
|
+
payload: ThermocyclerStartSetBlockTempCommandPayload
|
|
327
|
+
|
|
328
|
+
|
|
302
329
|
class ThermocyclerExecuteProfileCommandPayload(TextOnlyPayload):
|
|
303
330
|
steps: List[ThermocyclerStep]
|
|
304
331
|
|
|
@@ -308,6 +335,15 @@ class ThermocyclerExecuteProfileCommand(TypedDict):
|
|
|
308
335
|
payload: ThermocyclerExecuteProfileCommandPayload
|
|
309
336
|
|
|
310
337
|
|
|
338
|
+
class ThermocyclerStartExecuteProfileCommandPayload(TextOnlyPayload):
|
|
339
|
+
steps: List[ThermocyclerStep]
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
class ThermocyclerStartExecuteProfileCommand(TypedDict):
|
|
343
|
+
name: Literal["command.THERMOCYCLER_START_EXECUTE_PROFILE"]
|
|
344
|
+
payload: ThermocyclerStartExecuteProfileCommandPayload
|
|
345
|
+
|
|
346
|
+
|
|
311
347
|
class ThermocyclerWaitForHoldCommandPayload(TextOnlyPayload):
|
|
312
348
|
pass
|
|
313
349
|
|
|
@@ -335,6 +371,15 @@ class ThermocyclerSetLidTempCommand(TypedDict):
|
|
|
335
371
|
payload: ThermocyclerSetLidTempCommandPayload
|
|
336
372
|
|
|
337
373
|
|
|
374
|
+
class ThermocyclerStartSetLidTempCommandPayload(TextOnlyPayload):
|
|
375
|
+
pass
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
class ThermocyclerStartSetLidTempCommand(TypedDict):
|
|
379
|
+
name: Literal["command.THERMOCYCLER_START_SET_LID_TEMP"]
|
|
380
|
+
payload: ThermocyclerStartSetLidTempCommandPayload
|
|
381
|
+
|
|
382
|
+
|
|
338
383
|
class ThermocyclerDeactivateLidCommandPayload(TextOnlyPayload):
|
|
339
384
|
pass
|
|
340
385
|
|
|
@@ -421,6 +466,7 @@ class AspirateDispenseCommandPayload(TextOnlyPayload, SingleInstrumentPayload):
|
|
|
421
466
|
location: Location
|
|
422
467
|
volume: float
|
|
423
468
|
rate: float
|
|
469
|
+
end_location: Optional[Location]
|
|
424
470
|
|
|
425
471
|
|
|
426
472
|
class AspirateCommand(TypedDict):
|
|
@@ -496,6 +542,21 @@ class MixCommand(TypedDict):
|
|
|
496
542
|
payload: MixCommandPayload
|
|
497
543
|
|
|
498
544
|
|
|
545
|
+
class DynamicMixCommandPayload(TextOnlyPayload, SingleInstrumentPayload):
|
|
546
|
+
aspirate_start_location: Location
|
|
547
|
+
dispense_start_location: Location
|
|
548
|
+
aspirate_end_location: Union[None, Location]
|
|
549
|
+
dispense_end_location: Union[None, Location]
|
|
550
|
+
volume: float
|
|
551
|
+
repetitions: int
|
|
552
|
+
movement_delay: float
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
class DynamicMixCommand(TypedDict):
|
|
556
|
+
name: Literal["command.MIX"]
|
|
557
|
+
payload: DynamicMixCommandPayload
|
|
558
|
+
|
|
559
|
+
|
|
499
560
|
class BlowOutCommandPayload(TextOnlyPayload, SingleInstrumentPayload):
|
|
500
561
|
location: Optional[Location]
|
|
501
562
|
|
|
@@ -591,6 +652,14 @@ class MoveLabwareCommandPayload(TextOnlyPayload):
|
|
|
591
652
|
pass
|
|
592
653
|
|
|
593
654
|
|
|
655
|
+
class CaptureImageCommandPayload(TextOnlyPayload):
|
|
656
|
+
resolution: Optional[Tuple[int, int]]
|
|
657
|
+
zoom: Optional[float]
|
|
658
|
+
contrast: Optional[float]
|
|
659
|
+
brightness: Optional[float]
|
|
660
|
+
saturation: Optional[float]
|
|
661
|
+
|
|
662
|
+
|
|
594
663
|
class LiquidClassCommandPayload(TextOnlyPayload, SingleInstrumentPayload):
|
|
595
664
|
liquid_class: LiquidClass
|
|
596
665
|
volume: float
|
|
@@ -646,6 +715,11 @@ class MoveLabwareCommand(TypedDict):
|
|
|
646
715
|
payload: MoveLabwareCommandPayload
|
|
647
716
|
|
|
648
717
|
|
|
718
|
+
class CaptureImageCommand(TypedDict):
|
|
719
|
+
name: Literal["command.CAPTURE_IMAGE"]
|
|
720
|
+
payload: CaptureImageCommandPayload
|
|
721
|
+
|
|
722
|
+
|
|
649
723
|
class SealCommand(TypedDict):
|
|
650
724
|
name: Literal["command.SEAL"]
|
|
651
725
|
payload: SealCommandPayload
|
|
@@ -714,6 +788,27 @@ class RobotCloseGripperJawCommand(TypedDict):
|
|
|
714
788
|
payload: GripperCommandPayload
|
|
715
789
|
|
|
716
790
|
|
|
791
|
+
# Task Commands and Payloads
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
class WaitForTasksPayload(TextOnlyPayload):
|
|
795
|
+
pass
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
class CreateTimerPayload(TextOnlyPayload):
|
|
799
|
+
time: float
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
class WaitForTasksCommand(TypedDict):
|
|
803
|
+
name: Literal["command.WAIT_FOR_TASKS"]
|
|
804
|
+
payload: WaitForTasksPayload
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
class CreateTimerCommand(TypedDict):
|
|
808
|
+
name: Literal["command.CREATE_TIMER"]
|
|
809
|
+
payload: CreateTimerPayload
|
|
810
|
+
|
|
811
|
+
|
|
717
812
|
Command = Union[
|
|
718
813
|
DropTipCommand,
|
|
719
814
|
DropTipInDisposalLocationCommand,
|
|
@@ -724,6 +819,7 @@ Command = Union[
|
|
|
724
819
|
BlowOutCommand,
|
|
725
820
|
BlowOutInDisposalLocationCommand,
|
|
726
821
|
MixCommand,
|
|
822
|
+
DynamicMixCommand,
|
|
727
823
|
TransferCommand,
|
|
728
824
|
DistributeCommand,
|
|
729
825
|
ConsolidateCommand,
|
|
@@ -734,6 +830,7 @@ Command = Union[
|
|
|
734
830
|
HeaterShakerSetTargetTemperatureCommand,
|
|
735
831
|
HeaterShakerWaitForTemperatureCommand,
|
|
736
832
|
HeaterShakerSetAndWaitForShakeSpeedCommand,
|
|
833
|
+
HeaterShakerSetShakeSpeedCommand,
|
|
737
834
|
HeaterShakerOpenLabwareLatchCommand,
|
|
738
835
|
HeaterShakerCloseLabwareLatchCommand,
|
|
739
836
|
HeaterShakerDeactivateShakerCommand,
|
|
@@ -744,10 +841,13 @@ Command = Union[
|
|
|
744
841
|
ThermocyclerDeactivateBlockCommand,
|
|
745
842
|
ThermocyclerDeactivateLidCommand,
|
|
746
843
|
ThermocyclerSetLidTempCommand,
|
|
844
|
+
ThermocyclerStartSetLidTempCommand,
|
|
747
845
|
ThermocyclerWaitForTempCommand,
|
|
748
846
|
ThermocyclerWaitForHoldCommand,
|
|
749
847
|
ThermocyclerExecuteProfileCommand,
|
|
848
|
+
ThermocyclerStartExecuteProfileCommand,
|
|
750
849
|
ThermocyclerSetBlockTempCommand,
|
|
850
|
+
ThermocyclerStartSetBlockTempCommand,
|
|
751
851
|
ThermocyclerOpenCommand,
|
|
752
852
|
TempdeckDeactivateCommand,
|
|
753
853
|
TempdeckAwaitTempCommand,
|
|
@@ -770,6 +870,7 @@ Command = Union[
|
|
|
770
870
|
PressurizeCommand,
|
|
771
871
|
ConfigureForVolumeCommand,
|
|
772
872
|
ConfigureNozzleLayoutCommand,
|
|
873
|
+
CaptureImageCommand,
|
|
773
874
|
# Robot commands
|
|
774
875
|
RobotMoveToCommand,
|
|
775
876
|
RobotMoveAxisToCommand,
|
|
@@ -782,6 +883,9 @@ Command = Union[
|
|
|
782
883
|
FlexStackerStoreCommand,
|
|
783
884
|
FlexStackerEmptyCommand,
|
|
784
885
|
FlexStackerFillCommand,
|
|
886
|
+
# Task commands
|
|
887
|
+
WaitForTasksCommand,
|
|
888
|
+
CreateTimerCommand,
|
|
785
889
|
]
|
|
786
890
|
|
|
787
891
|
|
|
@@ -791,6 +895,7 @@ CommandPayload = Union[
|
|
|
791
895
|
HeaterShakerSetTargetTemperaturePayload,
|
|
792
896
|
HeaterShakerWaitForTemperaturePayload,
|
|
793
897
|
HeaterShakerSetAndWaitForShakeSpeedPayload,
|
|
898
|
+
HeaterShakerSetShakeSpeedPayload,
|
|
794
899
|
HeaterShakerOpenLabwareLatchPayload,
|
|
795
900
|
HeaterShakerCloseLabwareLatchPayload,
|
|
796
901
|
HeaterShakerDeactivateShakerPayload,
|
|
@@ -802,6 +907,7 @@ CommandPayload = Union[
|
|
|
802
907
|
ThermocyclerWaitForHoldCommandPayload,
|
|
803
908
|
ThermocyclerWaitForTempCommandPayload,
|
|
804
909
|
ThermocyclerSetLidTempCommandPayload,
|
|
910
|
+
ThermocyclerStartSetLidTempCommandPayload,
|
|
805
911
|
ThermocyclerDeactivateLidCommandPayload,
|
|
806
912
|
ThermocyclerDeactivateBlockCommandPayload,
|
|
807
913
|
ThermocyclerDeactivateCommandPayload,
|
|
@@ -816,6 +922,7 @@ CommandPayload = Union[
|
|
|
816
922
|
BlowOutCommandPayload,
|
|
817
923
|
BlowOutInDisposalLocationCommandPayload,
|
|
818
924
|
MixCommandPayload,
|
|
925
|
+
DynamicMixCommandPayload,
|
|
819
926
|
TransferCommandPayload,
|
|
820
927
|
DistributeCommandPayload,
|
|
821
928
|
ConsolidateCommandPayload,
|
|
@@ -823,7 +930,9 @@ CommandPayload = Union[
|
|
|
823
930
|
DispenseInDisposalLocationCommandPayload,
|
|
824
931
|
HomeCommandPayload,
|
|
825
932
|
ThermocyclerExecuteProfileCommandPayload,
|
|
933
|
+
ThermocyclerStartExecuteProfileCommandPayload,
|
|
826
934
|
ThermocyclerSetBlockTempCommandPayload,
|
|
935
|
+
ThermocyclerStartSetBlockTempCommandPayload,
|
|
827
936
|
TempdeckAwaitTempCommandPayload,
|
|
828
937
|
TempdeckSetTempCommandPayload,
|
|
829
938
|
PauseCommandPayload,
|
|
@@ -837,11 +946,15 @@ CommandPayload = Union[
|
|
|
837
946
|
PressurizeCommandPayload,
|
|
838
947
|
ConfigureForVolumePayload,
|
|
839
948
|
ConfigureNozzleLayoutPayload,
|
|
949
|
+
CaptureImageCommandPayload,
|
|
840
950
|
# Robot payloads
|
|
841
951
|
RobotMoveToCommandPayload,
|
|
842
952
|
RobotMoveAxisRelativeCommandPayload,
|
|
843
953
|
RobotMoveAxisToCommandPayload,
|
|
844
954
|
GripperCommandPayload,
|
|
955
|
+
# Task payloads
|
|
956
|
+
WaitForTasksPayload,
|
|
957
|
+
CreateTimerPayload,
|
|
845
958
|
]
|
|
846
959
|
|
|
847
960
|
|
|
@@ -904,6 +1017,10 @@ class MixMessage(CommandMessageFields, MixCommand):
|
|
|
904
1017
|
pass
|
|
905
1018
|
|
|
906
1019
|
|
|
1020
|
+
class DynamicMixMessage(CommandMessageFields, DynamicMixCommand):
|
|
1021
|
+
pass
|
|
1022
|
+
|
|
1023
|
+
|
|
907
1024
|
class TransferMessage(CommandMessageFields, TransferCommand):
|
|
908
1025
|
pass
|
|
909
1026
|
|
|
@@ -952,6 +1069,12 @@ class HeaterShakerSetAndWaitForShakeSpeedMessage(
|
|
|
952
1069
|
pass
|
|
953
1070
|
|
|
954
1071
|
|
|
1072
|
+
class HeaterShakerSetShakeSpeedMessage(
|
|
1073
|
+
CommandMessageFields, HeaterShakerSetShakeSpeedCommand
|
|
1074
|
+
):
|
|
1075
|
+
pass
|
|
1076
|
+
|
|
1077
|
+
|
|
955
1078
|
class HeaterShakerOpenLabwareLatchMessage(
|
|
956
1079
|
CommandMessageFields, HeaterShakerOpenLabwareLatchCommand
|
|
957
1080
|
):
|
|
@@ -1010,6 +1133,18 @@ class ThermocyclerSetLidTempMessage(
|
|
|
1010
1133
|
pass
|
|
1011
1134
|
|
|
1012
1135
|
|
|
1136
|
+
class ThermocyclerStartSetLidTempMessage(
|
|
1137
|
+
CommandMessageFields, ThermocyclerStartSetLidTempCommand
|
|
1138
|
+
):
|
|
1139
|
+
pass
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
class ThermocyclerStartSetBlockTempMessage(
|
|
1143
|
+
CommandMessageFields, ThermocyclerStartSetBlockTempCommand
|
|
1144
|
+
):
|
|
1145
|
+
pass
|
|
1146
|
+
|
|
1147
|
+
|
|
1013
1148
|
class ThermocyclerWaitForTempMessage(
|
|
1014
1149
|
CommandMessageFields, ThermocyclerWaitForTempCommand
|
|
1015
1150
|
):
|
|
@@ -1028,6 +1163,12 @@ class ThermocyclerExecuteProfileMessage(
|
|
|
1028
1163
|
pass
|
|
1029
1164
|
|
|
1030
1165
|
|
|
1166
|
+
class ThermocyclerStartExecuteProfileMessage(
|
|
1167
|
+
CommandMessageFields, ThermocyclerStartExecuteProfileCommand
|
|
1168
|
+
):
|
|
1169
|
+
pass
|
|
1170
|
+
|
|
1171
|
+
|
|
1031
1172
|
class ThermocyclerSetBlockTempMessage(
|
|
1032
1173
|
CommandMessageFields, ThermocyclerSetBlockTempCommand
|
|
1033
1174
|
):
|
|
@@ -1124,6 +1265,14 @@ class RobotCloseGripperJawMessage(CommandMessageFields, RobotCloseGripperJawComm
|
|
|
1124
1265
|
pass
|
|
1125
1266
|
|
|
1126
1267
|
|
|
1268
|
+
class WaitForTasksMessage(CommandMessageFields, WaitForTasksCommand):
|
|
1269
|
+
pass
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
class CreateTimerMessage(CommandMessageFields, CreateTimerCommand):
|
|
1273
|
+
pass
|
|
1274
|
+
|
|
1275
|
+
|
|
1127
1276
|
CommandMessage = Union[
|
|
1128
1277
|
DropTipMessage,
|
|
1129
1278
|
DropTipInDisposalLocationMessage,
|
|
@@ -1144,6 +1293,7 @@ CommandMessage = Union[
|
|
|
1144
1293
|
HeaterShakerSetTargetTemperatureMessage,
|
|
1145
1294
|
HeaterShakerWaitForTemperatureMessage,
|
|
1146
1295
|
HeaterShakerSetAndWaitForShakeSpeedMessage,
|
|
1296
|
+
HeaterShakerSetShakeSpeedMessage,
|
|
1147
1297
|
HeaterShakerOpenLabwareLatchMessage,
|
|
1148
1298
|
HeaterShakerCloseLabwareLatchMessage,
|
|
1149
1299
|
HeaterShakerDeactivateShakerMessage,
|
|
@@ -1157,6 +1307,7 @@ CommandMessage = Union[
|
|
|
1157
1307
|
ThermocyclerWaitForTempMessage,
|
|
1158
1308
|
ThermocyclerWaitForHoldMessage,
|
|
1159
1309
|
ThermocyclerExecuteProfileMessage,
|
|
1310
|
+
ThermocyclerStartExecuteProfileMessage,
|
|
1160
1311
|
ThermocyclerSetBlockTempMessage,
|
|
1161
1312
|
ThermocyclerOpenMessage,
|
|
1162
1313
|
TempdeckSetTempMessage,
|
|
@@ -1183,4 +1334,7 @@ CommandMessage = Union[
|
|
|
1183
1334
|
FlexStackerStoreMessage,
|
|
1184
1335
|
FlexStackerEmptyMessage,
|
|
1185
1336
|
FlexStackerFillMessage,
|
|
1337
|
+
# Task Messages
|
|
1338
|
+
WaitForTasksMessage,
|
|
1339
|
+
CreateTimerMessage,
|
|
1186
1340
|
]
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from collections.abc import Container
|
|
5
6
|
from dataclasses import dataclass
|
|
6
7
|
from typing import List, Mapping, NamedTuple, Optional, Set, Union
|
|
7
8
|
from typing_extensions import Final
|
|
@@ -15,6 +16,7 @@ from opentrons.motion_planning.adjacent_slots_getters import (
|
|
|
15
16
|
get_adjacent_staging_slot,
|
|
16
17
|
)
|
|
17
18
|
|
|
19
|
+
from opentrons.protocols.api_support.constants import OPENTRONS_NAMESPACE
|
|
18
20
|
from opentrons.types import DeckSlotName, StagingSlotName
|
|
19
21
|
|
|
20
22
|
_FIXED_TRASH_SLOT: Final[Set[DeckSlotName]] = {
|
|
@@ -37,14 +39,14 @@ HS_MAX_X_ADJACENT_ITEM_HEIGHT = 53.0
|
|
|
37
39
|
# For background, see: https://github.com/Opentrons/opentrons/issues/10316
|
|
38
40
|
#
|
|
39
41
|
# TODO(mc, 2022-06-16): move this constant to the module definition
|
|
40
|
-
HS_ALLOWED_ADJACENT_TALL_LABWARE =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
HS_ALLOWED_ADJACENT_TALL_LABWARE = {
|
|
43
|
+
"opentrons_96_filtertiprack_10ul",
|
|
44
|
+
"opentrons_96_filtertiprack_200ul",
|
|
45
|
+
"opentrons_96_filtertiprack_20ul",
|
|
46
|
+
"opentrons_96_tiprack_10ul",
|
|
47
|
+
"opentrons_96_tiprack_20ul",
|
|
48
|
+
"opentrons_96_tiprack_300ul",
|
|
49
|
+
}
|
|
48
50
|
|
|
49
51
|
|
|
50
52
|
@dataclass
|
|
@@ -156,11 +158,15 @@ class _MaxHeight(NamedTuple):
|
|
|
156
158
|
source_item: DeckItem
|
|
157
159
|
source_location: DeckSlotName
|
|
158
160
|
max_height: float
|
|
159
|
-
|
|
161
|
+
allowed_labware_load_names: Container[str]
|
|
160
162
|
|
|
161
163
|
def is_allowed(self, item: DeckItem) -> bool:
|
|
162
164
|
if isinstance(item, Labware):
|
|
163
|
-
|
|
165
|
+
namespace, load_name, _version = item.uri.split("/")
|
|
166
|
+
if (
|
|
167
|
+
namespace == OPENTRONS_NAMESPACE
|
|
168
|
+
and load_name in self.allowed_labware_load_names
|
|
169
|
+
):
|
|
164
170
|
return True
|
|
165
171
|
else:
|
|
166
172
|
return item.highest_z < self.max_height
|
|
@@ -315,7 +321,7 @@ def _create_ot2_restrictions( # noqa: C901
|
|
|
315
321
|
source_item=item,
|
|
316
322
|
source_location=location,
|
|
317
323
|
max_height=HS_MAX_X_ADJACENT_ITEM_HEIGHT,
|
|
318
|
-
|
|
324
|
+
allowed_labware_load_names=HS_ALLOWED_ADJACENT_TALL_LABWARE,
|
|
319
325
|
)
|
|
320
326
|
)
|
|
321
327
|
|
|
@@ -434,7 +440,6 @@ def _create_flex_restrictions( # noqa: C901
|
|
|
434
440
|
def _create_restrictions(
|
|
435
441
|
item: DeckItem, location: Union[DeckSlotName, StagingSlotName], robot_type: str
|
|
436
442
|
) -> List[_DeckRestriction]:
|
|
437
|
-
|
|
438
443
|
if robot_type == "OT-2 Standard":
|
|
439
444
|
return _create_ot2_restrictions(item, location)
|
|
440
445
|
else:
|
|
@@ -7,7 +7,6 @@ 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
|
|
11
10
|
|
|
12
11
|
DEFAULT_GENERAL_ARC_Z_MARGIN: Final[float] = 10.0
|
|
13
12
|
DEFAULT_IN_LABWARE_ARC_Z_MARGIN: Final[float] = 5.0
|
|
@@ -125,47 +124,41 @@ def get_gripper_labware_movement_waypoints(
|
|
|
125
124
|
from_labware_center: Point,
|
|
126
125
|
to_labware_center: Point,
|
|
127
126
|
gripper_home_z: float,
|
|
128
|
-
offset_data: LabwareMovementOffsetData,
|
|
129
127
|
post_drop_slide_offset: Optional[Point],
|
|
130
128
|
gripper_home_z_offset: Optional[float] = None,
|
|
131
129
|
) -> List[GripperMovementWaypointsWithJawStatus]:
|
|
132
130
|
"""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
|
-
|
|
143
131
|
gripper_max_z_home = gripper_home_z - (gripper_home_z_offset or 0)
|
|
144
|
-
|
|
145
|
-
post_drop_home_pos = Point(drop_location.x, drop_location.y, gripper_home_z)
|
|
132
|
+
post_drop_home_pos = Point(to_labware_center.x, to_labware_center.y, gripper_home_z)
|
|
146
133
|
|
|
147
134
|
waypoints_with_jaw_status = [
|
|
148
135
|
GripperMovementWaypointsWithJawStatus(
|
|
149
|
-
position=Point(
|
|
136
|
+
position=Point(
|
|
137
|
+
from_labware_center.x, from_labware_center.y, gripper_home_z
|
|
138
|
+
),
|
|
150
139
|
jaw_open=False,
|
|
151
140
|
dropping=False,
|
|
152
141
|
),
|
|
153
142
|
GripperMovementWaypointsWithJawStatus(
|
|
154
|
-
position=
|
|
143
|
+
position=from_labware_center, jaw_open=True, dropping=False
|
|
155
144
|
),
|
|
156
145
|
# Gripper grips the labware here
|
|
157
146
|
GripperMovementWaypointsWithJawStatus(
|
|
158
|
-
position=Point(
|
|
147
|
+
position=Point(
|
|
148
|
+
from_labware_center.x, from_labware_center.y, gripper_max_z_home
|
|
149
|
+
),
|
|
159
150
|
jaw_open=False,
|
|
160
151
|
dropping=False,
|
|
161
152
|
),
|
|
162
153
|
GripperMovementWaypointsWithJawStatus(
|
|
163
|
-
position=Point(
|
|
154
|
+
position=Point(
|
|
155
|
+
to_labware_center.x, to_labware_center.y, gripper_max_z_home
|
|
156
|
+
),
|
|
164
157
|
jaw_open=False,
|
|
165
158
|
dropping=False,
|
|
166
159
|
),
|
|
167
160
|
GripperMovementWaypointsWithJawStatus(
|
|
168
|
-
position=
|
|
161
|
+
position=to_labware_center, jaw_open=False, dropping=False
|
|
169
162
|
),
|
|
170
163
|
# Gripper ungrips here
|
|
171
164
|
GripperMovementWaypointsWithJawStatus(
|
|
@@ -189,25 +182,18 @@ def get_gripper_labware_movement_waypoints(
|
|
|
189
182
|
def get_gripper_labware_placement_waypoints(
|
|
190
183
|
to_labware_center: Point,
|
|
191
184
|
gripper_home_z: float,
|
|
192
|
-
drop_offset: Optional[Point],
|
|
193
185
|
) -> List[GripperMovementWaypointsWithJawStatus]:
|
|
194
186
|
"""Get waypoints for placing labware using a gripper."""
|
|
195
|
-
|
|
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)
|
|
187
|
+
post_drop_home_pos = Point(to_labware_center.x, to_labware_center.y, gripper_home_z)
|
|
202
188
|
|
|
203
189
|
return [
|
|
204
190
|
GripperMovementWaypointsWithJawStatus(
|
|
205
|
-
position=Point(
|
|
191
|
+
position=Point(to_labware_center.x, to_labware_center.y, gripper_home_z),
|
|
206
192
|
jaw_open=False,
|
|
207
193
|
dropping=False,
|
|
208
194
|
),
|
|
209
195
|
GripperMovementWaypointsWithJawStatus(
|
|
210
|
-
position=
|
|
196
|
+
position=to_labware_center, jaw_open=False, dropping=False
|
|
211
197
|
),
|
|
212
198
|
# Gripper ungrips here
|
|
213
199
|
GripperMovementWaypointsWithJawStatus(
|
|
@@ -14,7 +14,7 @@ from opentrons.protocols.parameters.exceptions import (
|
|
|
14
14
|
RuntimeParameterRequired as RuntimeParameterRequiredError,
|
|
15
15
|
)
|
|
16
16
|
from opentrons.protocols.parameters.csv_parameter_interface import CSVParameter
|
|
17
|
-
|
|
17
|
+
from .tasks import Task
|
|
18
18
|
from .protocol_context import ProtocolContext
|
|
19
19
|
from .deck import Deck
|
|
20
20
|
from .robot_context import RobotContext
|
|
@@ -33,6 +33,7 @@ from .module_contexts import (
|
|
|
33
33
|
from .disposal_locations import TrashBin, WasteChute
|
|
34
34
|
from ._liquid import Liquid, LiquidClass
|
|
35
35
|
from ._types import (
|
|
36
|
+
OffDeckType,
|
|
36
37
|
OFF_DECK,
|
|
37
38
|
PLUNGER_BLOWOUT,
|
|
38
39
|
PLUNGER_TOP,
|
|
@@ -88,6 +89,7 @@ __all__ = [
|
|
|
88
89
|
"ROW",
|
|
89
90
|
"ALL",
|
|
90
91
|
# Deck location types
|
|
92
|
+
"OffDeckType",
|
|
91
93
|
"OFF_DECK",
|
|
92
94
|
# Pipette plunger types
|
|
93
95
|
"PLUNGER_BLOWOUT",
|
|
@@ -99,6 +101,8 @@ __all__ = [
|
|
|
99
101
|
"BLOWOUT_ACTION",
|
|
100
102
|
"RuntimeParameterRequiredError",
|
|
101
103
|
"CSVParameter",
|
|
104
|
+
# Concurrent task types
|
|
105
|
+
"Task",
|
|
102
106
|
# For internal Opentrons use only:
|
|
103
107
|
"create_protocol_context",
|
|
104
108
|
"ProtocolEngineCoreRequiredError",
|
|
@@ -24,9 +24,10 @@ class TransferInfo:
|
|
|
24
24
|
tip_policy: TransferTipPolicyV2
|
|
25
25
|
tip_racks: List[Labware]
|
|
26
26
|
trash_location: Union[Location, TrashBin, WasteChute]
|
|
27
|
+
tips: Optional[List[Well]]
|
|
27
28
|
|
|
28
29
|
|
|
29
|
-
def verify_and_normalize_transfer_args(
|
|
30
|
+
def verify_and_normalize_transfer_args( # noqa: C901
|
|
30
31
|
source: Union[Well, Sequence[Well], Sequence[Sequence[Well]]],
|
|
31
32
|
dest: Union[Well, Sequence[Well], Sequence[Sequence[Well]], TrashBin, WasteChute],
|
|
32
33
|
tip_policy: TransferTipPolicyV2Type,
|
|
@@ -36,6 +37,7 @@ def verify_and_normalize_transfer_args(
|
|
|
36
37
|
group_wells_for_multi_channel: bool,
|
|
37
38
|
current_volume: float,
|
|
38
39
|
trash_location: Union[Location, Well, Labware, TrashBin, WasteChute],
|
|
40
|
+
tips: Optional[Union[Sequence[Well], Sequence[Sequence[Well]]]],
|
|
39
41
|
) -> TransferInfo:
|
|
40
42
|
flat_sources_list = validation.ensure_valid_flat_wells_list_for_transfer_v2(source)
|
|
41
43
|
if not isinstance(dest, (TrashBin, WasteChute)):
|
|
@@ -57,8 +59,20 @@ def verify_and_normalize_transfer_args(
|
|
|
57
59
|
reject_adapter=True,
|
|
58
60
|
)
|
|
59
61
|
|
|
62
|
+
valid_tips: Optional[List[Well]] = None
|
|
63
|
+
if tips:
|
|
64
|
+
flat_tips_list = validation.ensure_valid_flat_wells_list_for_transfer_v2(tips)
|
|
65
|
+
if group_wells_for_multi_channel and nozzle_map.tip_count > 1:
|
|
66
|
+
valid_tips = tx_liquid_utils.group_wells_for_multi_channel_transfer(
|
|
67
|
+
flat_tips_list, nozzle_map, "tip"
|
|
68
|
+
)
|
|
69
|
+
else:
|
|
70
|
+
valid_tips = flat_tips_list
|
|
71
|
+
|
|
60
72
|
valid_new_tip = validation.ensure_new_tip_policy(tip_policy)
|
|
61
|
-
if
|
|
73
|
+
if valid_tips is not None:
|
|
74
|
+
valid_tip_racks = [tip.parent for tip in valid_tips]
|
|
75
|
+
elif valid_new_tip == TransferTipPolicyV2.NEVER:
|
|
62
76
|
if last_tip_well is None:
|
|
63
77
|
raise RuntimeError(
|
|
64
78
|
"Pipette has no tip attached to perform transfer."
|
|
@@ -92,6 +106,7 @@ def verify_and_normalize_transfer_args(
|
|
|
92
106
|
tip_policy=valid_new_tip,
|
|
93
107
|
tip_racks=valid_tip_racks,
|
|
94
108
|
trash_location=valid_trash_location,
|
|
109
|
+
tips=valid_tips,
|
|
95
110
|
)
|
|
96
111
|
|
|
97
112
|
|
opentrons/protocol_api/_types.py
CHANGED
|
@@ -3,12 +3,19 @@ from typing_extensions import Final
|
|
|
3
3
|
import enum
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Implemented with an enum to support type narrowing via `== OFF_DECK`.
|
|
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
|
+
|
|
8
13
|
OFF_DECK = "off-deck"
|
|
14
|
+
WASTE_CHUTE = "waste-chute"
|
|
9
15
|
|
|
10
16
|
|
|
11
17
|
OFF_DECK: Final = OffDeckType.OFF_DECK
|
|
18
|
+
WASTE_CHUTE: Final = OffDeckType.WASTE_CHUTE
|
|
12
19
|
|
|
13
20
|
# Set __doc__ manually as a workaround. When this docstring is written the normal way, right after
|
|
14
21
|
# the constant definition, Sphinx has trouble picking it up.
|
|
@@ -16,6 +16,7 @@ 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
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
WellCore = AbstractWellCore
|
|
@@ -30,4 +31,5 @@ MagneticBlockCore = AbstractMagneticBlockCore[LabwareCore]
|
|
|
30
31
|
AbsorbanceReaderCore = AbstractAbsorbanceReaderCore[LabwareCore]
|
|
31
32
|
FlexStackerCore = AbstractFlexStackerCore[LabwareCore]
|
|
32
33
|
RobotCore = AbstractRobot
|
|
33
|
-
|
|
34
|
+
TaskCore = AbstractTaskCore
|
|
35
|
+
ProtocolCore = AbstractProtocol[InstrumentCore, LabwareCore, ModuleCore, TaskCore]
|