opentrons 8.7.0a9__py3-none-any.whl → 8.8.0a7__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.
Files changed (189) hide show
  1. opentrons/_version.py +2 -2
  2. opentrons/cli/analyze.py +4 -1
  3. opentrons/config/__init__.py +7 -0
  4. opentrons/drivers/asyncio/communication/serial_connection.py +126 -49
  5. opentrons/drivers/heater_shaker/abstract.py +5 -0
  6. opentrons/drivers/heater_shaker/driver.py +10 -0
  7. opentrons/drivers/heater_shaker/simulator.py +4 -0
  8. opentrons/drivers/thermocycler/abstract.py +6 -0
  9. opentrons/drivers/thermocycler/driver.py +61 -10
  10. opentrons/drivers/thermocycler/simulator.py +6 -0
  11. opentrons/drivers/vacuum_module/__init__.py +5 -0
  12. opentrons/drivers/vacuum_module/abstract.py +93 -0
  13. opentrons/drivers/vacuum_module/driver.py +208 -0
  14. opentrons/drivers/vacuum_module/errors.py +39 -0
  15. opentrons/drivers/vacuum_module/simulator.py +85 -0
  16. opentrons/drivers/vacuum_module/types.py +79 -0
  17. opentrons/execute.py +3 -0
  18. opentrons/hardware_control/api.py +24 -5
  19. opentrons/hardware_control/backends/controller.py +8 -2
  20. opentrons/hardware_control/backends/flex_protocol.py +1 -0
  21. opentrons/hardware_control/backends/ot3controller.py +35 -2
  22. opentrons/hardware_control/backends/ot3simulator.py +3 -1
  23. opentrons/hardware_control/backends/ot3utils.py +37 -0
  24. opentrons/hardware_control/backends/simulator.py +2 -1
  25. opentrons/hardware_control/backends/subsystem_manager.py +5 -2
  26. opentrons/hardware_control/emulation/abstract_emulator.py +6 -4
  27. opentrons/hardware_control/emulation/connection_handler.py +8 -5
  28. opentrons/hardware_control/emulation/heater_shaker.py +12 -3
  29. opentrons/hardware_control/emulation/settings.py +1 -1
  30. opentrons/hardware_control/emulation/thermocycler.py +67 -15
  31. opentrons/hardware_control/module_control.py +105 -10
  32. opentrons/hardware_control/modules/__init__.py +3 -0
  33. opentrons/hardware_control/modules/absorbance_reader.py +11 -4
  34. opentrons/hardware_control/modules/flex_stacker.py +38 -9
  35. opentrons/hardware_control/modules/heater_shaker.py +42 -5
  36. opentrons/hardware_control/modules/magdeck.py +8 -4
  37. opentrons/hardware_control/modules/mod_abc.py +14 -6
  38. opentrons/hardware_control/modules/tempdeck.py +25 -5
  39. opentrons/hardware_control/modules/thermocycler.py +68 -11
  40. opentrons/hardware_control/modules/types.py +20 -1
  41. opentrons/hardware_control/modules/utils.py +11 -4
  42. opentrons/hardware_control/motion_utilities.py +6 -6
  43. opentrons/hardware_control/nozzle_manager.py +3 -0
  44. opentrons/hardware_control/ot3api.py +85 -17
  45. opentrons/hardware_control/poller.py +22 -8
  46. opentrons/hardware_control/protocols/liquid_handler.py +6 -2
  47. opentrons/hardware_control/scripts/update_module_fw.py +5 -0
  48. opentrons/hardware_control/types.py +43 -2
  49. opentrons/legacy_commands/commands.py +58 -5
  50. opentrons/legacy_commands/module_commands.py +52 -0
  51. opentrons/legacy_commands/protocol_commands.py +53 -1
  52. opentrons/legacy_commands/types.py +155 -1
  53. opentrons/motion_planning/deck_conflict.py +17 -12
  54. opentrons/motion_planning/waypoints.py +15 -29
  55. opentrons/protocol_api/__init__.py +5 -1
  56. opentrons/protocol_api/_transfer_liquid_validation.py +17 -2
  57. opentrons/protocol_api/_types.py +8 -1
  58. opentrons/protocol_api/core/common.py +3 -1
  59. opentrons/protocol_api/core/engine/_default_labware_versions.py +33 -11
  60. opentrons/protocol_api/core/engine/deck_conflict.py +3 -1
  61. opentrons/protocol_api/core/engine/instrument.py +109 -26
  62. opentrons/protocol_api/core/engine/labware.py +8 -1
  63. opentrons/protocol_api/core/engine/module_core.py +95 -4
  64. opentrons/protocol_api/core/engine/protocol.py +51 -2
  65. opentrons/protocol_api/core/engine/stringify.py +2 -0
  66. opentrons/protocol_api/core/engine/tasks.py +48 -0
  67. opentrons/protocol_api/core/engine/well.py +8 -0
  68. opentrons/protocol_api/core/instrument.py +19 -2
  69. opentrons/protocol_api/core/legacy/legacy_instrument_core.py +19 -2
  70. opentrons/protocol_api/core/legacy/legacy_module_core.py +33 -2
  71. opentrons/protocol_api/core/legacy/legacy_protocol_core.py +23 -1
  72. opentrons/protocol_api/core/legacy/legacy_well_core.py +4 -0
  73. opentrons/protocol_api/core/legacy/tasks.py +19 -0
  74. opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py +19 -2
  75. opentrons/protocol_api/core/legacy_simulator/legacy_protocol_core.py +14 -2
  76. opentrons/protocol_api/core/legacy_simulator/tasks.py +19 -0
  77. opentrons/protocol_api/core/module.py +58 -2
  78. opentrons/protocol_api/core/protocol.py +23 -2
  79. opentrons/protocol_api/core/tasks.py +31 -0
  80. opentrons/protocol_api/core/well.py +4 -0
  81. opentrons/protocol_api/instrument_context.py +388 -2
  82. opentrons/protocol_api/labware.py +10 -2
  83. opentrons/protocol_api/module_contexts.py +170 -6
  84. opentrons/protocol_api/protocol_context.py +87 -21
  85. opentrons/protocol_api/robot_context.py +41 -25
  86. opentrons/protocol_api/tasks.py +48 -0
  87. opentrons/protocol_api/validation.py +49 -3
  88. opentrons/protocol_engine/__init__.py +4 -0
  89. opentrons/protocol_engine/actions/__init__.py +6 -2
  90. opentrons/protocol_engine/actions/actions.py +31 -9
  91. opentrons/protocol_engine/clients/sync_client.py +42 -7
  92. opentrons/protocol_engine/commands/__init__.py +56 -0
  93. opentrons/protocol_engine/commands/absorbance_reader/close_lid.py +2 -15
  94. opentrons/protocol_engine/commands/absorbance_reader/open_lid.py +2 -15
  95. opentrons/protocol_engine/commands/absorbance_reader/read.py +22 -23
  96. opentrons/protocol_engine/commands/aspirate.py +1 -0
  97. opentrons/protocol_engine/commands/aspirate_while_tracking.py +52 -19
  98. opentrons/protocol_engine/commands/capture_image.py +302 -0
  99. opentrons/protocol_engine/commands/command.py +2 -0
  100. opentrons/protocol_engine/commands/command_unions.py +62 -0
  101. opentrons/protocol_engine/commands/create_timer.py +83 -0
  102. opentrons/protocol_engine/commands/dispense.py +1 -0
  103. opentrons/protocol_engine/commands/dispense_while_tracking.py +56 -19
  104. opentrons/protocol_engine/commands/drop_tip.py +32 -8
  105. opentrons/protocol_engine/commands/flex_stacker/common.py +35 -0
  106. opentrons/protocol_engine/commands/flex_stacker/set_stored_labware.py +7 -0
  107. opentrons/protocol_engine/commands/heater_shaker/__init__.py +14 -0
  108. opentrons/protocol_engine/commands/heater_shaker/common.py +20 -0
  109. opentrons/protocol_engine/commands/heater_shaker/set_and_wait_for_shake_speed.py +5 -4
  110. opentrons/protocol_engine/commands/heater_shaker/set_shake_speed.py +136 -0
  111. opentrons/protocol_engine/commands/heater_shaker/set_target_temperature.py +31 -5
  112. opentrons/protocol_engine/commands/move_labware.py +3 -4
  113. opentrons/protocol_engine/commands/move_to_addressable_area_for_drop_tip.py +1 -1
  114. opentrons/protocol_engine/commands/movement_common.py +31 -2
  115. opentrons/protocol_engine/commands/pick_up_tip.py +21 -11
  116. opentrons/protocol_engine/commands/pipetting_common.py +48 -3
  117. opentrons/protocol_engine/commands/set_tip_state.py +97 -0
  118. opentrons/protocol_engine/commands/temperature_module/set_target_temperature.py +38 -7
  119. opentrons/protocol_engine/commands/thermocycler/__init__.py +16 -0
  120. opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py +6 -0
  121. opentrons/protocol_engine/commands/thermocycler/run_profile.py +8 -0
  122. opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py +44 -7
  123. opentrons/protocol_engine/commands/thermocycler/set_target_lid_temperature.py +43 -14
  124. opentrons/protocol_engine/commands/thermocycler/start_run_extended_profile.py +191 -0
  125. opentrons/protocol_engine/commands/touch_tip.py +1 -1
  126. opentrons/protocol_engine/commands/unsafe/unsafe_place_labware.py +6 -22
  127. opentrons/protocol_engine/commands/wait_for_tasks.py +98 -0
  128. opentrons/protocol_engine/create_protocol_engine.py +12 -0
  129. opentrons/protocol_engine/engine_support.py +3 -0
  130. opentrons/protocol_engine/errors/__init__.py +12 -0
  131. opentrons/protocol_engine/errors/exceptions.py +119 -0
  132. opentrons/protocol_engine/execution/__init__.py +4 -0
  133. opentrons/protocol_engine/execution/command_executor.py +62 -1
  134. opentrons/protocol_engine/execution/create_queue_worker.py +9 -2
  135. opentrons/protocol_engine/execution/labware_movement.py +13 -15
  136. opentrons/protocol_engine/execution/movement.py +2 -0
  137. opentrons/protocol_engine/execution/pipetting.py +19 -25
  138. opentrons/protocol_engine/execution/queue_worker.py +4 -0
  139. opentrons/protocol_engine/execution/run_control.py +8 -0
  140. opentrons/protocol_engine/execution/task_handler.py +157 -0
  141. opentrons/protocol_engine/protocol_engine.py +137 -36
  142. opentrons/protocol_engine/resources/__init__.py +4 -0
  143. opentrons/protocol_engine/resources/camera_provider.py +110 -0
  144. opentrons/protocol_engine/resources/concurrency_provider.py +27 -0
  145. opentrons/protocol_engine/resources/deck_configuration_provider.py +7 -0
  146. opentrons/protocol_engine/resources/file_provider.py +133 -58
  147. opentrons/protocol_engine/resources/labware_validation.py +10 -6
  148. opentrons/protocol_engine/slot_standardization.py +2 -0
  149. opentrons/protocol_engine/state/_well_math.py +60 -18
  150. opentrons/protocol_engine/state/addressable_areas.py +2 -0
  151. opentrons/protocol_engine/state/camera.py +54 -0
  152. opentrons/protocol_engine/state/commands.py +37 -14
  153. opentrons/protocol_engine/state/geometry.py +276 -379
  154. opentrons/protocol_engine/state/labware.py +62 -108
  155. opentrons/protocol_engine/state/labware_origin_math/errors.py +94 -0
  156. opentrons/protocol_engine/state/labware_origin_math/stackup_origin_to_labware_origin.py +1336 -0
  157. opentrons/protocol_engine/state/module_substates/thermocycler_module_substate.py +37 -0
  158. opentrons/protocol_engine/state/modules.py +30 -8
  159. opentrons/protocol_engine/state/motion.py +44 -0
  160. opentrons/protocol_engine/state/preconditions.py +59 -0
  161. opentrons/protocol_engine/state/state.py +44 -0
  162. opentrons/protocol_engine/state/state_summary.py +4 -0
  163. opentrons/protocol_engine/state/tasks.py +139 -0
  164. opentrons/protocol_engine/state/tips.py +177 -258
  165. opentrons/protocol_engine/state/update_types.py +26 -9
  166. opentrons/protocol_engine/types/__init__.py +23 -4
  167. opentrons/protocol_engine/types/command_preconditions.py +18 -0
  168. opentrons/protocol_engine/types/deck_configuration.py +5 -1
  169. opentrons/protocol_engine/types/instrument.py +8 -1
  170. opentrons/protocol_engine/types/labware.py +1 -13
  171. opentrons/protocol_engine/types/location.py +26 -2
  172. opentrons/protocol_engine/types/module.py +11 -1
  173. opentrons/protocol_engine/types/tasks.py +38 -0
  174. opentrons/protocol_engine/types/tip.py +9 -0
  175. opentrons/protocol_runner/create_simulating_orchestrator.py +29 -2
  176. opentrons/protocol_runner/protocol_runner.py +14 -1
  177. opentrons/protocol_runner/run_orchestrator.py +49 -2
  178. opentrons/protocols/advanced_control/transfers/transfer_liquid_utils.py +2 -2
  179. opentrons/protocols/api_support/definitions.py +1 -1
  180. opentrons/protocols/api_support/types.py +2 -1
  181. opentrons/simulate.py +51 -15
  182. opentrons/system/camera.py +334 -4
  183. opentrons/system/ffmpeg.py +110 -0
  184. {opentrons-8.7.0a9.dist-info → opentrons-8.8.0a7.dist-info}/METADATA +4 -4
  185. {opentrons-8.7.0a9.dist-info → opentrons-8.8.0a7.dist-info}/RECORD +188 -160
  186. opentrons/protocol_engine/state/_labware_origin_math.py +0 -636
  187. {opentrons-8.7.0a9.dist-info → opentrons-8.8.0a7.dist-info}/WHEEL +0 -0
  188. {opentrons-8.7.0a9.dist-info → opentrons-8.8.0a7.dist-info}/entry_points.txt +0 -0
  189. {opentrons-8.7.0a9.dist-info → opentrons-8.8.0a7.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
- LabwareUri("opentrons/opentrons_96_filtertiprack_10ul/1"),
42
- LabwareUri("opentrons/opentrons_96_filtertiprack_200ul/1"),
43
- LabwareUri("opentrons/opentrons_96_filtertiprack_20ul/1"),
44
- LabwareUri("opentrons/opentrons_96_tiprack_10ul/1"),
45
- LabwareUri("opentrons/opentrons_96_tiprack_20ul/1"),
46
- LabwareUri("opentrons/opentrons_96_tiprack_300ul/1"),
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
- allowed_labware: List[LabwareUri]
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
- if item.uri in self.allowed_labware:
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
- allowed_labware=HS_ALLOWED_ADJACENT_TALL_LABWARE,
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(pick_up_location.x, pick_up_location.y, gripper_home_z),
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=pick_up_location, jaw_open=True, dropping=False
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(pick_up_location.x, pick_up_location.y, gripper_max_z_home),
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(drop_location.x, drop_location.y, gripper_max_z_home),
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=drop_location, jaw_open=False, dropping=False
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
- 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)
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(drop_location.x, drop_location.y, gripper_home_z),
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=drop_location, jaw_open=False, dropping=False
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 valid_new_tip == TransferTipPolicyV2.NEVER:
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
 
@@ -3,12 +3,19 @@ from typing_extensions import Final
3
3
  import enum
4
4
 
5
5
 
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.
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
- ProtocolCore = AbstractProtocol[InstrumentCore, LabwareCore, ModuleCore]
34
+ TaskCore = AbstractTaskCore
35
+ ProtocolCore = AbstractProtocol[InstrumentCore, LabwareCore, ModuleCore, TaskCore]