opentrons 8.7.0a5__py3-none-any.whl → 8.7.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.

Potentially problematic release.


This version of opentrons might be problematic. Click here for more details.

Files changed (144) hide show
  1. opentrons/_version.py +2 -2
  2. opentrons/drivers/asyncio/communication/serial_connection.py +129 -52
  3. opentrons/drivers/heater_shaker/abstract.py +5 -0
  4. opentrons/drivers/heater_shaker/driver.py +10 -0
  5. opentrons/drivers/heater_shaker/simulator.py +4 -0
  6. opentrons/drivers/thermocycler/abstract.py +6 -0
  7. opentrons/drivers/thermocycler/driver.py +61 -10
  8. opentrons/drivers/thermocycler/simulator.py +6 -0
  9. opentrons/hardware_control/api.py +24 -5
  10. opentrons/hardware_control/backends/controller.py +8 -2
  11. opentrons/hardware_control/backends/ot3controller.py +3 -0
  12. opentrons/hardware_control/backends/ot3simulator.py +2 -1
  13. opentrons/hardware_control/backends/simulator.py +2 -1
  14. opentrons/hardware_control/backends/subsystem_manager.py +5 -2
  15. opentrons/hardware_control/emulation/abstract_emulator.py +6 -4
  16. opentrons/hardware_control/emulation/connection_handler.py +8 -5
  17. opentrons/hardware_control/emulation/heater_shaker.py +12 -3
  18. opentrons/hardware_control/emulation/settings.py +1 -1
  19. opentrons/hardware_control/emulation/thermocycler.py +67 -15
  20. opentrons/hardware_control/module_control.py +82 -8
  21. opentrons/hardware_control/modules/__init__.py +3 -0
  22. opentrons/hardware_control/modules/absorbance_reader.py +11 -4
  23. opentrons/hardware_control/modules/flex_stacker.py +38 -9
  24. opentrons/hardware_control/modules/heater_shaker.py +42 -5
  25. opentrons/hardware_control/modules/magdeck.py +8 -4
  26. opentrons/hardware_control/modules/mod_abc.py +13 -5
  27. opentrons/hardware_control/modules/tempdeck.py +25 -5
  28. opentrons/hardware_control/modules/thermocycler.py +68 -11
  29. opentrons/hardware_control/modules/types.py +20 -1
  30. opentrons/hardware_control/modules/utils.py +11 -4
  31. opentrons/hardware_control/nozzle_manager.py +3 -0
  32. opentrons/hardware_control/ot3api.py +26 -5
  33. opentrons/hardware_control/poller.py +22 -8
  34. opentrons/hardware_control/scripts/update_module_fw.py +5 -0
  35. opentrons/hardware_control/types.py +31 -2
  36. opentrons/legacy_commands/module_commands.py +23 -0
  37. opentrons/legacy_commands/protocol_commands.py +20 -0
  38. opentrons/legacy_commands/types.py +80 -0
  39. opentrons/motion_planning/deck_conflict.py +17 -12
  40. opentrons/motion_planning/waypoints.py +15 -29
  41. opentrons/protocol_api/__init__.py +5 -1
  42. opentrons/protocol_api/_types.py +6 -1
  43. opentrons/protocol_api/core/common.py +3 -1
  44. opentrons/protocol_api/core/engine/_default_labware_versions.py +32 -11
  45. opentrons/protocol_api/core/engine/labware.py +8 -1
  46. opentrons/protocol_api/core/engine/module_core.py +75 -8
  47. opentrons/protocol_api/core/engine/protocol.py +18 -1
  48. opentrons/protocol_api/core/engine/tasks.py +48 -0
  49. opentrons/protocol_api/core/engine/well.py +8 -0
  50. opentrons/protocol_api/core/legacy/legacy_module_core.py +24 -4
  51. opentrons/protocol_api/core/legacy/legacy_protocol_core.py +11 -1
  52. opentrons/protocol_api/core/legacy/legacy_well_core.py +4 -0
  53. opentrons/protocol_api/core/legacy/tasks.py +19 -0
  54. opentrons/protocol_api/core/legacy_simulator/legacy_protocol_core.py +14 -2
  55. opentrons/protocol_api/core/legacy_simulator/tasks.py +19 -0
  56. opentrons/protocol_api/core/module.py +37 -4
  57. opentrons/protocol_api/core/protocol.py +11 -2
  58. opentrons/protocol_api/core/tasks.py +31 -0
  59. opentrons/protocol_api/core/well.py +4 -0
  60. opentrons/protocol_api/labware.py +5 -0
  61. opentrons/protocol_api/module_contexts.py +117 -11
  62. opentrons/protocol_api/protocol_context.py +26 -4
  63. opentrons/protocol_api/robot_context.py +38 -21
  64. opentrons/protocol_api/tasks.py +48 -0
  65. opentrons/protocol_api/validation.py +6 -1
  66. opentrons/protocol_engine/actions/__init__.py +4 -2
  67. opentrons/protocol_engine/actions/actions.py +22 -9
  68. opentrons/protocol_engine/clients/sync_client.py +42 -7
  69. opentrons/protocol_engine/commands/__init__.py +42 -0
  70. opentrons/protocol_engine/commands/absorbance_reader/close_lid.py +2 -15
  71. opentrons/protocol_engine/commands/absorbance_reader/open_lid.py +2 -15
  72. opentrons/protocol_engine/commands/aspirate.py +1 -0
  73. opentrons/protocol_engine/commands/command.py +1 -0
  74. opentrons/protocol_engine/commands/command_unions.py +49 -0
  75. opentrons/protocol_engine/commands/create_timer.py +83 -0
  76. opentrons/protocol_engine/commands/dispense.py +1 -0
  77. opentrons/protocol_engine/commands/drop_tip.py +32 -8
  78. opentrons/protocol_engine/commands/heater_shaker/__init__.py +14 -0
  79. opentrons/protocol_engine/commands/heater_shaker/common.py +20 -0
  80. opentrons/protocol_engine/commands/heater_shaker/set_and_wait_for_shake_speed.py +5 -4
  81. opentrons/protocol_engine/commands/heater_shaker/set_shake_speed.py +136 -0
  82. opentrons/protocol_engine/commands/heater_shaker/set_target_temperature.py +31 -5
  83. opentrons/protocol_engine/commands/movement_common.py +2 -0
  84. opentrons/protocol_engine/commands/pick_up_tip.py +21 -11
  85. opentrons/protocol_engine/commands/set_tip_state.py +97 -0
  86. opentrons/protocol_engine/commands/temperature_module/set_target_temperature.py +38 -7
  87. opentrons/protocol_engine/commands/thermocycler/__init__.py +16 -0
  88. opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py +6 -0
  89. opentrons/protocol_engine/commands/thermocycler/run_profile.py +8 -0
  90. opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py +40 -6
  91. opentrons/protocol_engine/commands/thermocycler/set_target_lid_temperature.py +29 -5
  92. opentrons/protocol_engine/commands/thermocycler/start_run_extended_profile.py +191 -0
  93. opentrons/protocol_engine/commands/touch_tip.py +1 -1
  94. opentrons/protocol_engine/commands/unsafe/unsafe_place_labware.py +6 -22
  95. opentrons/protocol_engine/commands/wait_for_tasks.py +98 -0
  96. opentrons/protocol_engine/errors/__init__.py +4 -0
  97. opentrons/protocol_engine/errors/exceptions.py +55 -0
  98. opentrons/protocol_engine/execution/__init__.py +2 -0
  99. opentrons/protocol_engine/execution/command_executor.py +8 -0
  100. opentrons/protocol_engine/execution/create_queue_worker.py +5 -1
  101. opentrons/protocol_engine/execution/labware_movement.py +9 -12
  102. opentrons/protocol_engine/execution/movement.py +2 -0
  103. opentrons/protocol_engine/execution/queue_worker.py +4 -0
  104. opentrons/protocol_engine/execution/run_control.py +8 -0
  105. opentrons/protocol_engine/execution/task_handler.py +157 -0
  106. opentrons/protocol_engine/protocol_engine.py +75 -34
  107. opentrons/protocol_engine/resources/__init__.py +2 -0
  108. opentrons/protocol_engine/resources/concurrency_provider.py +27 -0
  109. opentrons/protocol_engine/resources/deck_configuration_provider.py +7 -0
  110. opentrons/protocol_engine/resources/labware_validation.py +10 -6
  111. opentrons/protocol_engine/state/_well_math.py +60 -18
  112. opentrons/protocol_engine/state/addressable_areas.py +2 -0
  113. opentrons/protocol_engine/state/commands.py +14 -11
  114. opentrons/protocol_engine/state/geometry.py +213 -374
  115. opentrons/protocol_engine/state/labware.py +52 -102
  116. opentrons/protocol_engine/state/labware_origin_math/errors.py +94 -0
  117. opentrons/protocol_engine/state/labware_origin_math/stackup_origin_to_labware_origin.py +1331 -0
  118. opentrons/protocol_engine/state/module_substates/thermocycler_module_substate.py +37 -0
  119. opentrons/protocol_engine/state/modules.py +21 -8
  120. opentrons/protocol_engine/state/motion.py +44 -0
  121. opentrons/protocol_engine/state/state.py +14 -0
  122. opentrons/protocol_engine/state/state_summary.py +2 -0
  123. opentrons/protocol_engine/state/tasks.py +139 -0
  124. opentrons/protocol_engine/state/tips.py +177 -258
  125. opentrons/protocol_engine/state/update_types.py +16 -9
  126. opentrons/protocol_engine/types/__init__.py +9 -3
  127. opentrons/protocol_engine/types/deck_configuration.py +5 -1
  128. opentrons/protocol_engine/types/instrument.py +8 -1
  129. opentrons/protocol_engine/types/labware.py +1 -13
  130. opentrons/protocol_engine/types/module.py +10 -0
  131. opentrons/protocol_engine/types/tasks.py +38 -0
  132. opentrons/protocol_engine/types/tip.py +9 -0
  133. opentrons/protocol_runner/create_simulating_orchestrator.py +29 -2
  134. opentrons/protocol_runner/run_orchestrator.py +18 -2
  135. opentrons/protocols/api_support/definitions.py +1 -1
  136. opentrons/protocols/api_support/types.py +2 -1
  137. opentrons/simulate.py +48 -15
  138. opentrons/system/camera.py +1 -1
  139. {opentrons-8.7.0a5.dist-info → opentrons-8.7.0a7.dist-info}/METADATA +4 -4
  140. {opentrons-8.7.0a5.dist-info → opentrons-8.7.0a7.dist-info}/RECORD +143 -127
  141. opentrons/protocol_engine/state/_labware_origin_math.py +0 -636
  142. {opentrons-8.7.0a5.dist-info → opentrons-8.7.0a7.dist-info}/WHEEL +0 -0
  143. {opentrons-8.7.0a5.dist-info → opentrons-8.7.0a7.dist-info}/entry_points.txt +0 -0
  144. {opentrons-8.7.0a5.dist-info → opentrons-8.7.0a7.dist-info}/licenses/LICENSE +0 -0
@@ -271,6 +271,22 @@ from .wait_for_duration import (
271
271
  WaitForDurationCommandType,
272
272
  )
273
273
 
274
+ from .create_timer import (
275
+ CreateTimer,
276
+ CreateTimerCreate,
277
+ CreateTimerParams,
278
+ CreateTimerResult,
279
+ CreateTimerCommandType,
280
+ )
281
+
282
+ from .wait_for_tasks import (
283
+ WaitForTasks,
284
+ WaitForTasksCreate,
285
+ WaitForTasksParams,
286
+ WaitForTasksResult,
287
+ WaitForTasksCommandType,
288
+ )
289
+
274
290
  from .pick_up_tip import (
275
291
  PickUpTip,
276
292
  PickUpTipParams,
@@ -384,6 +400,14 @@ from .get_next_tip import (
384
400
  GetNextTipCommandType,
385
401
  )
386
402
 
403
+ from .set_tip_state import (
404
+ SetTipState,
405
+ SetTipStateCreate,
406
+ SetTipStateParams,
407
+ SetTipStateResult,
408
+ SetTipStateCommandType,
409
+ )
410
+
387
411
  from .liquid_probe import (
388
412
  LiquidProbe,
389
413
  LiquidProbeParams,
@@ -619,6 +643,12 @@ __all__ = [
619
643
  "WaitForDurationCreate",
620
644
  "WaitForDurationResult",
621
645
  "WaitForDurationCommandType",
646
+ # Timer command models
647
+ "CreateTimer",
648
+ "CreateTimerCreate",
649
+ "CreateTimerParams",
650
+ "CreateTimerResult",
651
+ "CreateTimerCommandType",
622
652
  # pick up tip command models
623
653
  "PickUpTip",
624
654
  "PickUpTipCreate",
@@ -725,6 +755,12 @@ __all__ = [
725
755
  "GetNextTipParams",
726
756
  "GetNextTipResult",
727
757
  "GetNextTipCommandType",
758
+ # set tip state command bundle
759
+ "SetTipState",
760
+ "SetTipStateCreate",
761
+ "SetTipStateParams",
762
+ "SetTipStateResult",
763
+ "SetTipStateCommandType",
728
764
  # liquid probe command bundle
729
765
  "LiquidProbe",
730
766
  "LiquidProbeParams",
@@ -754,4 +790,10 @@ __all__ = [
754
790
  "PressureDispenseCreate",
755
791
  "PressureDispenseResult",
756
792
  "PressureDispenseCommandType",
793
+ # wait for tasks command bundle
794
+ "WaitForTasks",
795
+ "WaitForTasksCreate",
796
+ "WaitForTasksParams",
797
+ "WaitForTasksResult",
798
+ "WaitForTasksCommandType",
757
799
  ]
@@ -102,25 +102,12 @@ class CloseLidImpl(AbstractCommandImpl[CloseLidParams, SuccessData[CloseLidResul
102
102
  )
103
103
  )
104
104
 
105
- # The lid's labware definition stores gripper offsets for itself in the
106
- # space normally meant for offsets for labware stacked atop it.
107
- lid_gripper_offsets = self._state_view.labware.get_child_gripper_offsets(
108
- labware_definition=lid_definition,
109
- slot_name=None,
110
- )
111
- if lid_gripper_offsets is None:
112
- raise ValueError(
113
- "Gripper Offset values for Absorbance Reader Lid labware must not be None."
114
- )
115
-
116
105
  await self._labware_movement.move_labware_with_gripper(
117
106
  labware_definition=lid_definition,
118
107
  current_location=current_location,
119
108
  new_location=new_location,
120
- user_pick_up_offset=Point.from_xyz_attrs(
121
- lid_gripper_offsets.pickUpOffset
122
- ),
123
- user_drop_offset=Point.from_xyz_attrs(lid_gripper_offsets.dropOffset),
109
+ user_pick_up_offset=Point(),
110
+ user_drop_offset=Point(),
124
111
  post_drop_slide_offset=None,
125
112
  gripper_z_offset=LID_Z_CLEARANCE,
126
113
  )
@@ -103,25 +103,12 @@ class OpenLidImpl(AbstractCommandImpl[OpenLidParams, SuccessData[OpenLidResult]]
103
103
  mod_substate.module_id
104
104
  )
105
105
 
106
- # The lid's labware definition stores gripper offsets for itself in the
107
- # space normally meant for offsets for labware stacked atop it.
108
- lid_gripper_offsets = self._state_view.labware.get_child_gripper_offsets(
109
- labware_definition=lid_definition,
110
- slot_name=None,
111
- )
112
- if lid_gripper_offsets is None:
113
- raise ValueError(
114
- "Gripper Offset values for Absorbance Reader Lid labware must not be None."
115
- )
116
-
117
106
  await self._labware_movement.move_labware_with_gripper(
118
107
  labware_definition=lid_definition,
119
108
  current_location=current_location,
120
109
  new_location=new_location,
121
- user_pick_up_offset=Point.from_xyz_attrs(
122
- lid_gripper_offsets.pickUpOffset
123
- ),
124
- user_drop_offset=Point.from_xyz_attrs(lid_gripper_offsets.dropOffset),
110
+ user_pick_up_offset=Point(),
111
+ user_drop_offset=Point(),
125
112
  post_drop_slide_offset=None,
126
113
  gripper_z_offset=LID_Z_CLEARANCE,
127
114
  )
@@ -161,6 +161,7 @@ class AspirateImplementation(AbstractCommandImpl[AspirateParams, _ExecuteReturn]
161
161
  well_location=well_location,
162
162
  current_well=current_well,
163
163
  operation_volume=-params.volume,
164
+ offset_pipette_for_reservoir_subwells=False,
164
165
  )
165
166
  state_update.append(move_result.state_update)
166
167
  if isinstance(move_result, DefinedErrorData):
@@ -185,6 +185,7 @@ class AbstractCommandImpl(
185
185
  tip_handler: execution.TipHandler,
186
186
  run_control: execution.RunControlHandler,
187
187
  rail_lights: execution.RailLightsHandler,
188
+ task_handler: execution.TaskHandler,
188
189
  model_utils: ModelUtils,
189
190
  status_bar: execution.StatusBarHandler,
190
191
  command_note_adder: CommandNoteAdder,
@@ -267,6 +267,22 @@ from .wait_for_duration import (
267
267
  WaitForDurationCommandType,
268
268
  )
269
269
 
270
+ from .create_timer import (
271
+ CreateTimer,
272
+ CreateTimerCreate,
273
+ CreateTimerParams,
274
+ CreateTimerResult,
275
+ CreateTimerCommandType,
276
+ )
277
+
278
+ from .wait_for_tasks import (
279
+ WaitForTasks,
280
+ WaitForTasksCreate,
281
+ WaitForTasksParams,
282
+ WaitForTasksResult,
283
+ WaitForTasksCommandType,
284
+ )
285
+
270
286
  from .pick_up_tip import (
271
287
  PickUpTip,
272
288
  PickUpTipParams,
@@ -372,6 +388,14 @@ from .get_next_tip import (
372
388
  GetNextTipCommandType,
373
389
  )
374
390
 
391
+ from .set_tip_state import (
392
+ SetTipState,
393
+ SetTipStateCreate,
394
+ SetTipStateParams,
395
+ SetTipStateResult,
396
+ SetTipStateCommandType,
397
+ )
398
+
375
399
  from .liquid_probe import (
376
400
  LiquidProbe,
377
401
  LiquidProbeParams,
@@ -454,6 +478,8 @@ Command = Annotated[
454
478
  PrepareToAspirate,
455
479
  WaitForResume,
456
480
  WaitForDuration,
481
+ WaitForTasks,
482
+ CreateTimer,
457
483
  PickUpTip,
458
484
  SavePosition,
459
485
  SetRailLights,
@@ -462,6 +488,7 @@ Command = Annotated[
462
488
  VerifyTipPresence,
463
489
  GetTipPresence,
464
490
  GetNextTip,
491
+ SetTipState,
465
492
  LiquidProbe,
466
493
  TryLiquidProbe,
467
494
  SealPipetteToTip,
@@ -471,6 +498,7 @@ Command = Annotated[
471
498
  heater_shaker.SetTargetTemperature,
472
499
  heater_shaker.DeactivateHeater,
473
500
  heater_shaker.SetAndWaitForShakeSpeed,
501
+ heater_shaker.SetShakeSpeed,
474
502
  heater_shaker.DeactivateShaker,
475
503
  heater_shaker.OpenLabwareLatch,
476
504
  heater_shaker.CloseLabwareLatch,
@@ -488,6 +516,7 @@ Command = Annotated[
488
516
  thermocycler.OpenLid,
489
517
  thermocycler.CloseLid,
490
518
  thermocycler.RunProfile,
519
+ thermocycler.StartRunExtendedProfile,
491
520
  thermocycler.RunExtendedProfile,
492
521
  absorbance_reader.CloseLid,
493
522
  absorbance_reader.OpenLid,
@@ -557,6 +586,8 @@ CommandParams = Union[
557
586
  PrepareToAspirateParams,
558
587
  WaitForResumeParams,
559
588
  WaitForDurationParams,
589
+ WaitForTasksParams,
590
+ CreateTimerParams,
560
591
  PickUpTipParams,
561
592
  SavePositionParams,
562
593
  SetRailLightsParams,
@@ -565,6 +596,7 @@ CommandParams = Union[
565
596
  VerifyTipPresenceParams,
566
597
  GetTipPresenceParams,
567
598
  GetNextTipParams,
599
+ SetTipStateParams,
568
600
  LiquidProbeParams,
569
601
  TryLiquidProbeParams,
570
602
  SealPipetteToTipParams,
@@ -574,6 +606,7 @@ CommandParams = Union[
574
606
  heater_shaker.SetTargetTemperatureParams,
575
607
  heater_shaker.DeactivateHeaterParams,
576
608
  heater_shaker.SetAndWaitForShakeSpeedParams,
609
+ heater_shaker.SetShakeSpeedParams,
577
610
  heater_shaker.DeactivateShakerParams,
578
611
  heater_shaker.OpenLabwareLatchParams,
579
612
  heater_shaker.CloseLabwareLatchParams,
@@ -591,6 +624,7 @@ CommandParams = Union[
591
624
  thermocycler.OpenLidParams,
592
625
  thermocycler.CloseLidParams,
593
626
  thermocycler.RunProfileParams,
627
+ thermocycler.StartRunExtendedProfileParams,
594
628
  thermocycler.RunExtendedProfileParams,
595
629
  absorbance_reader.CloseLidParams,
596
630
  absorbance_reader.OpenLidParams,
@@ -658,6 +692,8 @@ CommandType = Union[
658
692
  PrepareToAspirateCommandType,
659
693
  WaitForResumeCommandType,
660
694
  WaitForDurationCommandType,
695
+ WaitForTasksCommandType,
696
+ CreateTimerCommandType,
661
697
  PickUpTipCommandType,
662
698
  SavePositionCommandType,
663
699
  SetRailLightsCommandType,
@@ -666,6 +702,7 @@ CommandType = Union[
666
702
  VerifyTipPresenceCommandType,
667
703
  GetTipPresenceCommandType,
668
704
  GetNextTipCommandType,
705
+ SetTipStateCommandType,
669
706
  LiquidProbeCommandType,
670
707
  TryLiquidProbeCommandType,
671
708
  SealPipetteToTipCommandType,
@@ -675,6 +712,7 @@ CommandType = Union[
675
712
  heater_shaker.SetTargetTemperatureCommandType,
676
713
  heater_shaker.DeactivateHeaterCommandType,
677
714
  heater_shaker.SetAndWaitForShakeSpeedCommandType,
715
+ heater_shaker.SetShakeSpeedCommandType,
678
716
  heater_shaker.DeactivateShakerCommandType,
679
717
  heater_shaker.OpenLabwareLatchCommandType,
680
718
  heater_shaker.CloseLabwareLatchCommandType,
@@ -692,6 +730,7 @@ CommandType = Union[
692
730
  thermocycler.OpenLidCommandType,
693
731
  thermocycler.CloseLidCommandType,
694
732
  thermocycler.RunProfileCommandType,
733
+ thermocycler.StartRunExtendedProfileCommandType,
695
734
  thermocycler.RunExtendedProfileCommandType,
696
735
  absorbance_reader.CloseLidCommandType,
697
736
  absorbance_reader.OpenLidCommandType,
@@ -760,6 +799,8 @@ CommandCreate = Annotated[
760
799
  PrepareToAspirateCreate,
761
800
  WaitForResumeCreate,
762
801
  WaitForDurationCreate,
802
+ WaitForTasksCreate,
803
+ CreateTimerCreate,
763
804
  PickUpTipCreate,
764
805
  SavePositionCreate,
765
806
  SetRailLightsCreate,
@@ -768,6 +809,7 @@ CommandCreate = Annotated[
768
809
  VerifyTipPresenceCreate,
769
810
  GetTipPresenceCreate,
770
811
  GetNextTipCreate,
812
+ SetTipStateCreate,
771
813
  LiquidProbeCreate,
772
814
  TryLiquidProbeCreate,
773
815
  SealPipetteToTipCreate,
@@ -777,6 +819,7 @@ CommandCreate = Annotated[
777
819
  heater_shaker.SetTargetTemperatureCreate,
778
820
  heater_shaker.DeactivateHeaterCreate,
779
821
  heater_shaker.SetAndWaitForShakeSpeedCreate,
822
+ heater_shaker.SetShakeSpeedCreate,
780
823
  heater_shaker.DeactivateShakerCreate,
781
824
  heater_shaker.OpenLabwareLatchCreate,
782
825
  heater_shaker.CloseLabwareLatchCreate,
@@ -794,6 +837,7 @@ CommandCreate = Annotated[
794
837
  thermocycler.OpenLidCreate,
795
838
  thermocycler.CloseLidCreate,
796
839
  thermocycler.RunProfileCreate,
840
+ thermocycler.StartRunExtendedProfileCreate,
797
841
  thermocycler.RunExtendedProfileCreate,
798
842
  absorbance_reader.CloseLidCreate,
799
843
  absorbance_reader.OpenLidCreate,
@@ -870,6 +914,8 @@ CommandResult = Union[
870
914
  PrepareToAspirateResult,
871
915
  WaitForResumeResult,
872
916
  WaitForDurationResult,
917
+ WaitForTasksResult,
918
+ CreateTimerResult,
873
919
  PickUpTipResult,
874
920
  SavePositionResult,
875
921
  SetRailLightsResult,
@@ -878,6 +924,7 @@ CommandResult = Union[
878
924
  VerifyTipPresenceResult,
879
925
  GetTipPresenceResult,
880
926
  GetNextTipResult,
927
+ SetTipStateResult,
881
928
  LiquidProbeResult,
882
929
  TryLiquidProbeResult,
883
930
  SealPipetteToTipResult,
@@ -887,6 +934,7 @@ CommandResult = Union[
887
934
  heater_shaker.SetTargetTemperatureResult,
888
935
  heater_shaker.DeactivateHeaterResult,
889
936
  heater_shaker.SetAndWaitForShakeSpeedResult,
937
+ heater_shaker.SetShakeSpeedResult,
890
938
  heater_shaker.DeactivateShakerResult,
891
939
  heater_shaker.OpenLabwareLatchResult,
892
940
  heater_shaker.CloseLabwareLatchResult,
@@ -904,6 +952,7 @@ CommandResult = Union[
904
952
  thermocycler.OpenLidResult,
905
953
  thermocycler.CloseLidResult,
906
954
  thermocycler.RunProfileResult,
955
+ thermocycler.StartRunExtendedProfileResult,
907
956
  thermocycler.RunExtendedProfileResult,
908
957
  absorbance_reader.CloseLidResult,
909
958
  absorbance_reader.OpenLidResult,
@@ -0,0 +1,83 @@
1
+ """CreateTimer command request, result, and implementation models."""
2
+
3
+ from __future__ import annotations
4
+ from pydantic import BaseModel, Field
5
+ from typing import Optional, Type, TYPE_CHECKING
6
+ from typing_extensions import Literal
7
+
8
+ from .command import AbstractCommandImpl, BaseCommand, BaseCommandCreate, SuccessData
9
+ from ..errors.error_occurrence import ErrorOccurrence
10
+
11
+ if TYPE_CHECKING:
12
+ from ..execution import TaskHandler, RunControlHandler
13
+
14
+
15
+ CreateTimerCommandType = Literal["createTimer"]
16
+
17
+
18
+ class CreateTimerParams(BaseModel):
19
+ """Payload required to annotate execution with a CreateTimer."""
20
+
21
+ time: float = Field(
22
+ ...,
23
+ description="The time before the timer should elapse in seconds. This is the minimum time before the timer elapses; it may in practice take longer than this.",
24
+ )
25
+ task_id: str | None = Field(
26
+ None,
27
+ description="The id of the timer task",
28
+ )
29
+
30
+
31
+ class CreateTimerResult(BaseModel):
32
+ """Result data from the execution of a CreateTimer command."""
33
+
34
+ task_id: str = Field(..., description="The id of the timer task")
35
+ time: float = Field(..., description="The same time as the parameter.")
36
+
37
+
38
+ class CreateTimerImplementation(
39
+ AbstractCommandImpl[CreateTimerParams, SuccessData[CreateTimerResult]]
40
+ ):
41
+ """CreateTimer command implementation."""
42
+
43
+ def __init__(
44
+ self,
45
+ task_handler: TaskHandler,
46
+ run_control: RunControlHandler,
47
+ **kwargs: object,
48
+ ) -> None:
49
+ self._task_handler = task_handler
50
+ self._run_control = run_control
51
+
52
+ async def execute(
53
+ self, params: CreateTimerParams
54
+ ) -> SuccessData[CreateTimerResult]:
55
+ """No operation taken other than capturing message in command."""
56
+
57
+ async def timer(task_handler: TaskHandler) -> None:
58
+ async with task_handler.synchronize_concurrent("createTimer"):
59
+ await self._run_control.wait_for_duration(params.time)
60
+
61
+ task = await self._task_handler.create_task(timer, params.task_id)
62
+ return SuccessData(
63
+ public=CreateTimerResult(task_id=task.id, time=params.time),
64
+ )
65
+
66
+
67
+ class CreateTimer(BaseCommand[CreateTimerParams, CreateTimerResult, ErrorOccurrence]):
68
+ """CreateTimer command model."""
69
+
70
+ commandType: CreateTimerCommandType = "createTimer"
71
+ params: CreateTimerParams
72
+ result: Optional[CreateTimerResult] = None
73
+
74
+ _ImplementationCls: Type[CreateTimerImplementation] = CreateTimerImplementation
75
+
76
+
77
+ class CreateTimerCreate(BaseCommandCreate[CreateTimerParams]):
78
+ """CreateTimer command request model."""
79
+
80
+ commandType: CreateTimerCommandType = "createTimer"
81
+ params: CreateTimerParams
82
+
83
+ _CommandCls: Type[CreateTimer] = CreateTimer
@@ -101,6 +101,7 @@ class DispenseImplementation(AbstractCommandImpl[DispenseParams, _ExecuteReturn]
101
101
  well_name=well_name,
102
102
  well_location=well_location,
103
103
  operation_volume=volume,
104
+ offset_pipette_for_reservoir_subwells=False,
104
105
  )
105
106
  if isinstance(move_result, DefinedErrorData):
106
107
  return move_result
@@ -12,7 +12,7 @@ from opentrons.protocol_engine.errors.exceptions import TipAttachedError
12
12
  from opentrons.protocol_engine.resources.model_utils import ModelUtils
13
13
 
14
14
  from ..state.update_types import StateUpdate
15
- from ..types import DropTipWellLocation
15
+ from ..types import DropTipWellLocation, TipRackWellState
16
16
  from .pipetting_common import (
17
17
  PipetteIdMixin,
18
18
  TipPhysicallyAttachedError,
@@ -140,6 +140,25 @@ class DropTipImplementation(AbstractCommandImpl[DropTipParams, _ExecuteReturn]):
140
140
  partially_configured=is_partially_configured,
141
141
  )
142
142
 
143
+ is_tip_rack = self._state_view.labware.get_definition(
144
+ labware_id
145
+ ).parameters.isTiprack
146
+
147
+ # It's possible that we are dropping tips into a labware trash for pre API v2.14 OT-2 protocols
148
+ # (or something else unexpected), so if it is not a tip rack mark no wells as used
149
+ if is_tip_rack:
150
+ tips_to_mark_as_used = (
151
+ self._state_view.tips.compute_tips_to_mark_as_used_or_empty(
152
+ labware_id=labware_id,
153
+ well_name=well_name,
154
+ nozzle_map=self._state_view.pipettes.get_nozzle_configuration(
155
+ pipette_id
156
+ ),
157
+ )
158
+ )
159
+ else:
160
+ tips_to_mark_as_used = []
161
+
143
162
  move_result = await move_to_well(
144
163
  movement=self._movement_handler,
145
164
  model_utils=self._model_utils,
@@ -152,12 +171,7 @@ class DropTipImplementation(AbstractCommandImpl[DropTipParams, _ExecuteReturn]):
152
171
  return move_result
153
172
 
154
173
  scrape_type = TipScrapeType.NONE
155
- if (
156
- params.scrape_tips
157
- and self._state_view.geometry._labware.get_definition(
158
- labware_id
159
- ).parameters.isTiprack
160
- ):
174
+ if params.scrape_tips and is_tip_rack:
161
175
  if int("".join(filter(str.isdigit, well_name))) <= 6:
162
176
  scrape_type = TipScrapeType.RIGHT_ONE_COL
163
177
  else:
@@ -194,6 +208,10 @@ class DropTipImplementation(AbstractCommandImpl[DropTipParams, _ExecuteReturn]):
194
208
  pipette_id=params.pipetteId,
195
209
  tip_geometry=None,
196
210
  tip_source=None,
211
+ ).update_tip_rack_well_state(
212
+ tip_state=TipRackWellState.USED,
213
+ labware_id=labware_id,
214
+ well_names=tips_to_mark_as_used,
197
215
  ),
198
216
  )
199
217
  else:
@@ -201,10 +219,16 @@ class DropTipImplementation(AbstractCommandImpl[DropTipParams, _ExecuteReturn]):
201
219
  public=DropTipResult(position=move_result.public.position),
202
220
  state_update=move_result.state_update.set_fluid_unknown(
203
221
  pipette_id=pipette_id
204
- ).update_pipette_tip_state(
222
+ )
223
+ .update_pipette_tip_state(
205
224
  pipette_id=params.pipetteId,
206
225
  tip_geometry=None,
207
226
  tip_source=None,
227
+ )
228
+ .update_tip_rack_well_state(
229
+ tip_state=TipRackWellState.USED,
230
+ labware_id=labware_id,
231
+ well_names=tips_to_mark_as_used,
208
232
  ),
209
233
  )
210
234
 
@@ -32,6 +32,14 @@ from .set_and_wait_for_shake_speed import (
32
32
  SetAndWaitForShakeSpeedCommandType,
33
33
  )
34
34
 
35
+ from .set_shake_speed import (
36
+ SetShakeSpeed,
37
+ SetShakeSpeedCreate,
38
+ SetShakeSpeedParams,
39
+ SetShakeSpeedResult,
40
+ SetShakeSpeedCommandType,
41
+ )
42
+
35
43
  from .deactivate_shaker import (
36
44
  DeactivateShaker,
37
45
  DeactivateShakerCreate,
@@ -81,6 +89,12 @@ __all__ = [
81
89
  "SetAndWaitForShakeSpeedParams",
82
90
  "SetAndWaitForShakeSpeedResult",
83
91
  "SetAndWaitForShakeSpeedCommandType",
92
+ # heaterShaker/setShakeSpeed
93
+ "SetShakeSpeed",
94
+ "SetShakeSpeedCreate",
95
+ "SetShakeSpeedParams",
96
+ "SetShakeSpeedResult",
97
+ "SetShakeSpeedCommandType",
84
98
  # heaterShaker/deactivateShaker
85
99
  "DeactivateShaker",
86
100
  "DeactivateShakerCreate",
@@ -0,0 +1,20 @@
1
+ """Common heatershaker base models."""
2
+ from opentrons.protocol_engine.state.module_substates.heater_shaker_module_substate import (
3
+ HeaterShakerModuleSubState,
4
+ )
5
+
6
+
7
+ async def get_heatershaker_ready_to_shake(
8
+ hs_module_substate: HeaterShakerModuleSubState,
9
+ rpm: float,
10
+ ) -> int:
11
+ """Check heatershaker state to confirm if it is ready to shake.
12
+
13
+ This includes
14
+ - Checking latch closure
15
+ - Validating target speed
16
+ """
17
+ hs_module_substate.raise_if_labware_latch_not_closed()
18
+ # Verify speed from hs module view
19
+ validated_speed = hs_module_substate.validate_target_speed(rpm)
20
+ return validated_speed
@@ -8,6 +8,8 @@ from ..command import AbstractCommandImpl, BaseCommand, BaseCommandCreate, Succe
8
8
  from ...errors.error_occurrence import ErrorOccurrence
9
9
  from ...state import update_types
10
10
 
11
+ from .common import get_heatershaker_ready_to_shake
12
+
11
13
  if TYPE_CHECKING:
12
14
  from opentrons.protocol_engine.state.state import StateView
13
15
  from opentrons.protocol_engine.execution import EquipmentHandler, MovementHandler
@@ -64,10 +66,9 @@ class SetAndWaitForShakeSpeedImpl(
64
66
  module_id=params.moduleId
65
67
  )
66
68
 
67
- hs_module_substate.raise_if_labware_latch_not_closed()
68
-
69
- # Verify speed from hs module view
70
- validated_speed = hs_module_substate.validate_target_speed(params.rpm)
69
+ validated_speed = await get_heatershaker_ready_to_shake(
70
+ hs_module_substate, params.rpm
71
+ )
71
72
 
72
73
  pipette_should_retract = (
73
74
  self._state_view.motion.check_pipette_blocking_hs_shaker(