opentrons 8.7.0a2__py3-none-any.whl → 8.7.0a4__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 (119) hide show
  1. opentrons/_version.py +2 -2
  2. opentrons/drivers/thermocycler/abstract.py +0 -1
  3. opentrons/drivers/thermocycler/driver.py +4 -33
  4. opentrons/drivers/thermocycler/simulator.py +0 -2
  5. opentrons/hardware_control/api.py +5 -24
  6. opentrons/hardware_control/backends/controller.py +2 -8
  7. opentrons/hardware_control/backends/ot3controller.py +0 -3
  8. opentrons/hardware_control/backends/ot3simulator.py +1 -2
  9. opentrons/hardware_control/backends/simulator.py +1 -2
  10. opentrons/hardware_control/backends/subsystem_manager.py +2 -5
  11. opentrons/hardware_control/module_control.py +8 -82
  12. opentrons/hardware_control/modules/__init__.py +0 -3
  13. opentrons/hardware_control/modules/absorbance_reader.py +4 -11
  14. opentrons/hardware_control/modules/flex_stacker.py +9 -38
  15. opentrons/hardware_control/modules/heater_shaker.py +5 -30
  16. opentrons/hardware_control/modules/magdeck.py +4 -8
  17. opentrons/hardware_control/modules/mod_abc.py +5 -13
  18. opentrons/hardware_control/modules/tempdeck.py +5 -25
  19. opentrons/hardware_control/modules/thermocycler.py +10 -56
  20. opentrons/hardware_control/modules/types.py +1 -20
  21. opentrons/hardware_control/modules/utils.py +4 -11
  22. opentrons/hardware_control/nozzle_manager.py +0 -3
  23. opentrons/hardware_control/ot3api.py +5 -26
  24. opentrons/hardware_control/scripts/update_module_fw.py +0 -5
  25. opentrons/hardware_control/types.py +2 -31
  26. opentrons/legacy_commands/protocol_commands.py +0 -20
  27. opentrons/legacy_commands/types.py +0 -42
  28. opentrons/motion_planning/waypoints.py +29 -15
  29. opentrons/protocol_api/__init__.py +0 -5
  30. opentrons/protocol_api/_types.py +1 -6
  31. opentrons/protocol_api/core/common.py +1 -3
  32. opentrons/protocol_api/core/engine/_default_labware_versions.py +11 -32
  33. opentrons/protocol_api/core/engine/labware.py +1 -8
  34. opentrons/protocol_api/core/engine/module_core.py +0 -4
  35. opentrons/protocol_api/core/engine/protocol.py +43 -23
  36. opentrons/protocol_api/core/legacy/legacy_module_core.py +0 -2
  37. opentrons/protocol_api/core/legacy/legacy_protocol_core.py +1 -11
  38. opentrons/protocol_api/core/legacy_simulator/legacy_protocol_core.py +2 -14
  39. opentrons/protocol_api/core/module.py +0 -1
  40. opentrons/protocol_api/core/protocol.py +2 -11
  41. opentrons/protocol_api/module_contexts.py +0 -1
  42. opentrons/protocol_api/protocol_context.py +4 -26
  43. opentrons/protocol_api/robot_context.py +21 -38
  44. opentrons/protocol_api/validation.py +1 -6
  45. opentrons/protocol_engine/actions/__init__.py +2 -4
  46. opentrons/protocol_engine/actions/actions.py +9 -22
  47. opentrons/protocol_engine/clients/sync_client.py +7 -6
  48. opentrons/protocol_engine/commands/__init__.py +0 -42
  49. opentrons/protocol_engine/commands/absorbance_reader/close_lid.py +15 -2
  50. opentrons/protocol_engine/commands/absorbance_reader/open_lid.py +15 -2
  51. opentrons/protocol_engine/commands/aspirate.py +0 -1
  52. opentrons/protocol_engine/commands/command.py +0 -1
  53. opentrons/protocol_engine/commands/command_unions.py +0 -39
  54. opentrons/protocol_engine/commands/dispense.py +0 -1
  55. opentrons/protocol_engine/commands/drop_tip.py +8 -32
  56. opentrons/protocol_engine/commands/movement_common.py +0 -2
  57. opentrons/protocol_engine/commands/pick_up_tip.py +11 -21
  58. opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py +0 -6
  59. opentrons/protocol_engine/commands/thermocycler/run_profile.py +0 -8
  60. opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py +1 -17
  61. opentrons/protocol_engine/commands/touch_tip.py +1 -1
  62. opentrons/protocol_engine/commands/unsafe/unsafe_place_labware.py +22 -6
  63. opentrons/protocol_engine/errors/__init__.py +0 -4
  64. opentrons/protocol_engine/errors/exceptions.py +0 -55
  65. opentrons/protocol_engine/execution/__init__.py +0 -2
  66. opentrons/protocol_engine/execution/command_executor.py +0 -8
  67. opentrons/protocol_engine/execution/create_queue_worker.py +1 -5
  68. opentrons/protocol_engine/execution/labware_movement.py +12 -9
  69. opentrons/protocol_engine/execution/movement.py +0 -2
  70. opentrons/protocol_engine/execution/queue_worker.py +0 -4
  71. opentrons/protocol_engine/execution/run_control.py +0 -8
  72. opentrons/protocol_engine/protocol_engine.py +33 -67
  73. opentrons/protocol_engine/resources/__init__.py +0 -2
  74. opentrons/protocol_engine/resources/deck_configuration_provider.py +0 -7
  75. opentrons/protocol_engine/resources/labware_validation.py +6 -10
  76. opentrons/protocol_engine/state/_labware_origin_math.py +636 -0
  77. opentrons/protocol_engine/state/_well_math.py +18 -60
  78. opentrons/protocol_engine/state/addressable_areas.py +0 -2
  79. opentrons/protocol_engine/state/commands.py +7 -7
  80. opentrons/protocol_engine/state/geometry.py +374 -204
  81. opentrons/protocol_engine/state/labware.py +102 -52
  82. opentrons/protocol_engine/state/module_substates/thermocycler_module_substate.py +0 -37
  83. opentrons/protocol_engine/state/modules.py +8 -21
  84. opentrons/protocol_engine/state/motion.py +0 -44
  85. opentrons/protocol_engine/state/state.py +0 -14
  86. opentrons/protocol_engine/state/state_summary.py +0 -2
  87. opentrons/protocol_engine/state/tips.py +258 -177
  88. opentrons/protocol_engine/state/update_types.py +9 -16
  89. opentrons/protocol_engine/types/__init__.py +3 -9
  90. opentrons/protocol_engine/types/deck_configuration.py +1 -5
  91. opentrons/protocol_engine/types/instrument.py +1 -8
  92. opentrons/protocol_engine/types/labware.py +13 -1
  93. opentrons/protocol_engine/types/module.py +0 -10
  94. opentrons/protocol_engine/types/tip.py +0 -9
  95. opentrons/protocol_runner/create_simulating_orchestrator.py +2 -29
  96. opentrons/protocol_runner/run_orchestrator.py +2 -18
  97. opentrons/protocols/api_support/definitions.py +1 -1
  98. opentrons/protocols/api_support/types.py +1 -2
  99. opentrons/simulate.py +15 -48
  100. opentrons/system/camera.py +1 -1
  101. {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a4.dist-info}/METADATA +4 -4
  102. {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a4.dist-info}/RECORD +105 -118
  103. opentrons/protocol_api/core/engine/tasks.py +0 -35
  104. opentrons/protocol_api/core/legacy/tasks.py +0 -19
  105. opentrons/protocol_api/core/legacy_simulator/tasks.py +0 -19
  106. opentrons/protocol_api/core/tasks.py +0 -31
  107. opentrons/protocol_api/tasks.py +0 -48
  108. opentrons/protocol_engine/commands/create_timer.py +0 -83
  109. opentrons/protocol_engine/commands/set_tip_state.py +0 -97
  110. opentrons/protocol_engine/commands/wait_for_tasks.py +0 -98
  111. opentrons/protocol_engine/execution/task_handler.py +0 -157
  112. opentrons/protocol_engine/resources/concurrency_provider.py +0 -27
  113. opentrons/protocol_engine/state/labware_origin_math/errors.py +0 -94
  114. opentrons/protocol_engine/state/labware_origin_math/stackup_origin_to_labware_origin.py +0 -1331
  115. opentrons/protocol_engine/state/tasks.py +0 -139
  116. opentrons/protocol_engine/types/tasks.py +0 -38
  117. {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a4.dist-info}/WHEEL +0 -0
  118. {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a4.dist-info}/entry_points.txt +0 -0
  119. {opentrons-8.7.0a2.dist-info → opentrons-8.7.0a4.dist-info}/licenses/LICENSE +0 -0
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from abc import abstractmethod, ABC
6
- from typing import Generic, List, Optional, Union, Tuple, Dict, TYPE_CHECKING, Sequence
6
+ from typing import Generic, List, Optional, Union, Tuple, Dict, TYPE_CHECKING
7
7
 
8
8
  from opentrons_shared_data.deck.types import DeckDefinitionV5, SlotDefV3
9
9
  from opentrons_shared_data.pipette.types import PipetteNameType
@@ -24,7 +24,6 @@ from opentrons.protocols.api_support.util import AxisMaxSpeeds
24
24
  from .instrument import InstrumentCoreType
25
25
  from .labware import LabwareCoreType, LabwareLoadParams
26
26
  from .module import ModuleCoreType
27
- from .tasks import TaskCoreType
28
27
  from .._liquid import Liquid, LiquidClass
29
28
  from .robot import AbstractRobot
30
29
  from .._types import OffDeckType
@@ -35,7 +34,7 @@ if TYPE_CHECKING:
35
34
 
36
35
 
37
36
  class AbstractProtocol(
38
- ABC, Generic[InstrumentCoreType, LabwareCoreType, ModuleCoreType, TaskCoreType]
37
+ ABC, Generic[InstrumentCoreType, LabwareCoreType, ModuleCoreType]
39
38
  ):
40
39
  @property
41
40
  @abstractmethod
@@ -193,14 +192,6 @@ class AbstractProtocol(
193
192
  def delay(self, seconds: float, msg: Optional[str]) -> None:
194
193
  ...
195
194
 
196
- @abstractmethod
197
- def wait_for_tasks(self, task_cores: Sequence[TaskCoreType]) -> None:
198
- ...
199
-
200
- @abstractmethod
201
- def create_timer(self, seconds: float) -> TaskCoreType:
202
- ...
203
-
204
195
  @abstractmethod
205
196
  def home(self) -> None:
206
197
  ...
@@ -686,7 +686,6 @@ class ThermocyclerContext(ModuleContext):
686
686
  celsius=temperature,
687
687
  hold_time_seconds=seconds,
688
688
  block_max_volume=block_max_volume,
689
- ramp_rate=ramp_rate,
690
689
  )
691
690
  self._core.wait_for_block_temperature()
692
691
 
@@ -89,7 +89,6 @@ from .module_contexts import (
89
89
  FlexStackerContext,
90
90
  ModuleContext,
91
91
  )
92
- from .tasks import Task
93
92
  from ._parameters import Parameters
94
93
 
95
94
 
@@ -235,7 +234,10 @@ class ProtocolContext(CommandPublisher):
235
234
  @property
236
235
  @requires_version(2, 22)
237
236
  def robot(self) -> RobotContext:
238
- """The :py:class:`.RobotContext` for the protocol."""
237
+ """The :py:class:`.RobotContext` for the protocol.
238
+
239
+ :meta private:
240
+ """
239
241
  if self._core.robot_type != "OT-3 Standard" or not self._robot:
240
242
  raise RobotTypeError("The RobotContext is only available on Flex robots.")
241
243
  return self._robot
@@ -1287,30 +1289,6 @@ class ProtocolContext(CommandPublisher):
1287
1289
  delay_time = seconds + minutes * 60
1288
1290
  self._core.delay(seconds=delay_time, msg=msg)
1289
1291
 
1290
- @publish(command=cmds.wait_for_tasks)
1291
- @requires_version(2, 27)
1292
- def wait_for_tasks(self, tasks: list[Task]) -> None:
1293
- """Wait for a list of tasks to complete before executing subsequent commands.
1294
-
1295
- :param list Task: tasks: A list of Task objects to wait for.
1296
-
1297
- Task objects can be commands that are allowed to run concurrently.
1298
- """
1299
- task_cores = [task._core for task in tasks]
1300
- self._core.wait_for_tasks(task_cores)
1301
-
1302
- @publish(command=cmds.create_timer)
1303
- @requires_version(2, 27)
1304
- def create_timer(self, seconds: float) -> Task:
1305
- """Create a timer task that runs in the background.
1306
-
1307
- :param float seconds: The time to delay in seconds.
1308
-
1309
- This timer will continue to run until it is complete and will not block subsequent commands.
1310
- """
1311
- task_core = self._core.create_timer(seconds=seconds)
1312
- return Task(core=task_core, api_version=self._api_version)
1313
-
1314
1292
  @requires_version(2, 0)
1315
1293
  def home(self) -> None:
1316
1294
  """Home the movement system of the robot."""
@@ -46,7 +46,7 @@ class RobotContext(publisher.CommandPublisher):
46
46
  Objects in this class should not be instantiated directly. Instead, instances are
47
47
  returned by :py:meth:`ProtocolContext.robot`.
48
48
 
49
- .. versionadded:: 2.22
49
+ .. versionadded:: 2.20
50
50
 
51
51
  """
52
52
 
@@ -83,19 +83,15 @@ class RobotContext(publisher.CommandPublisher):
83
83
  speed: Optional[float] = None,
84
84
  ) -> None:
85
85
  """
86
- Move a specified mount to a location on the deck.
86
+ Move a specified mount to a destination location on the deck.
87
87
 
88
88
  :param mount: The mount of the instrument you wish to move.
89
89
  This can either be an instance of :py:class:`.types.Mount` or one
90
90
  of the strings ``"left"``, ``"right"``, ``"extension"``, ``"gripper"``. Note
91
91
  that the gripper mount can be referred to either as ``"extension"`` or ``"gripper"``.
92
92
  :type mount: types.Mount or str
93
- :param destination: Any location on the deck, specified as:
94
-
95
- - a slot, like ``"A1"``
96
- - a defined location, like labware in a deck slot
97
- - an absolute location, like a point {x=10 , y=10, z=10} or a deck location and point ("A1" + point {x=10 , y=10, z=10})
98
- :param speed: The absolute speed in mm/s.
93
+ :param Location destination:
94
+ :param speed:
99
95
  """
100
96
  mount = validation.ensure_instrument_mount(mount)
101
97
  with publisher.publish_context(
@@ -120,9 +116,10 @@ class RobotContext(publisher.CommandPublisher):
120
116
  Move a set of axes to an absolute position on the deck.
121
117
 
122
118
  :param axis_map: A dictionary mapping axes to an absolute position on the deck in mm.
123
- :param critical_point: The critical point, or specific point on the object being moved, to move the axes with. It should only specify the gantry axes (i.e. `x`, `y`, `z`). When you specify a critical point, you're specifying the object on the gantry to be moved. If not specified, the critical point defaults to the center of the carriage attached to the gantry.
124
- :param float speed: The maximum speed with which to move all axes in mm/s.
125
-
119
+ :param critical_point: The critical point to move the axes with. It should only
120
+ specify the gantry axes (i.e. `x`, `y`, `z`).
121
+ :param float speed: The maximum speed with which you want to move all the axes
122
+ in the axis map.
126
123
  """
127
124
  instrument_on_left = self._core.get_pipette_type_from_engine(Mount.LEFT)
128
125
  is_96_channel = instrument_on_left == PipetteNameType.P1000_96
@@ -157,9 +154,11 @@ class RobotContext(publisher.CommandPublisher):
157
154
  """
158
155
  Move a set of axes to a relative position on the deck.
159
156
 
160
- :param axis_map: A dictionary mapping axes to relative movements from the current position in mm.
157
+ :param axis_map: A dictionary mapping axes to relative movements in mm.
158
+ :type mount: types.Mount or str
161
159
 
162
- :param float speed: The maximum speed with which to move all axes in mm/s.
160
+ :param float speed: The maximum speed with which you want to move all the axes
161
+ in the axis map.
163
162
  """
164
163
  instrument_on_left = self._core.get_pipette_type_from_engine(Mount.LEFT)
165
164
  is_96_channel = instrument_on_left == PipetteNameType.P1000_96
@@ -178,10 +177,7 @@ class RobotContext(publisher.CommandPublisher):
178
177
  self._core.move_axes_relative(axis_map, speed)
179
178
 
180
179
  def close_gripper_jaw(self, force: Optional[float] = None) -> None:
181
- """Closes the Flex Gripper jaws with a specified force.
182
-
183
- :param force: Force with which to close the gripper jaws in newtons.
184
- """
180
+ """Command the gripper closed with some force."""
185
181
  with publisher.publish_context(
186
182
  broker=self.broker,
187
183
  command=cmds.close_gripper(
@@ -191,10 +187,7 @@ class RobotContext(publisher.CommandPublisher):
191
187
  self._core.close_gripper(force)
192
188
 
193
189
  def open_gripper_jaw(self) -> None:
194
- """Opens the Flex Gripper jaws with a specified force.
195
-
196
- :param force: Force with which to open the gripper jaws in newtons.
197
- """
190
+ """Command the gripper open."""
198
191
  with publisher.publish_context(
199
192
  broker=self.broker,
200
193
  command=cmds.open_gripper(),
@@ -207,9 +200,9 @@ class RobotContext(publisher.CommandPublisher):
207
200
  location: Union[Location, ModuleContext, DeckLocation],
208
201
  ) -> AxisMapType:
209
202
  """
210
- Build an axis map from a location to provide to
203
+ Build a :py:class:`.types.AxisMapType` from a location to be compatible with
211
204
  either :py:meth:`.RobotContext.move_axes_to` or :py:meth:`.RobotContext.move_axes_relative`.
212
- You must provide only one of either a `location`, `slot`, or `module` to build
205
+ You must provide only one of `location`, `slot`, or `module` to build
213
206
  the axis map.
214
207
 
215
208
  :param mount: The mount of the instrument you wish create an axis map for.
@@ -217,10 +210,7 @@ class RobotContext(publisher.CommandPublisher):
217
210
  of the strings ``"left"``, ``"right"``, ``"extension"``, ``"gripper"``. Note
218
211
  that the gripper mount can be referred to either as ``"extension"`` or ``"gripper"``.
219
212
  :type mount: types.Mount or str
220
- :param location: Any location on the deck, specified as:
221
-
222
- - a deck location, like slot ``"A1"``.
223
- - a defined location, like a module on the deck.
213
+ :param location: The location to format an axis map for.
224
214
  :type location: `Well`, `ModuleContext`, `DeckLocation` or `OffDeckType`
225
215
  """
226
216
  mount = validation.ensure_instrument_mount(mount)
@@ -258,11 +248,7 @@ class RobotContext(publisher.CommandPublisher):
258
248
  self, mount: Union[Mount, str], volume: float, action: PipetteActionTypes
259
249
  ) -> AxisMapType:
260
250
  """
261
- Build an axis map to move a pipette plunger motor to complete liquid handling actions.
262
-
263
- :mount: The left or right instrument mount the pipette is attached to.
264
- :param volume: A volume to convert to an axis map for linear plunger displacement.
265
- :param action: Choose to ``aspirate`` or ``dispense``.
251
+ Build a :py:class:`.types.AxisMapType` for a pipette plunger motor from volume.
266
252
 
267
253
  """
268
254
  pipette_name = self._core.get_pipette_type_from_engine(mount)
@@ -282,9 +268,7 @@ class RobotContext(publisher.CommandPublisher):
282
268
  self, mount: Union[Mount, str], position_name: PlungerPositionTypes
283
269
  ) -> AxisMapType:
284
270
  """
285
- Build an axis map to move a pipette plunger motor to a named position.
286
-
287
- :param position_name: A named position to move the pipette plunger to. Choose from ``top``, ``bottom``, ``blowout``, or ``drop`` plunger positions.
271
+ Build a :py:class:`.types.AxisMapType` for a pipette plunger motor from position_name.
288
272
 
289
273
  """
290
274
  pipette_name = self._core.get_pipette_type_from_engine(mount)
@@ -300,9 +284,8 @@ class RobotContext(publisher.CommandPublisher):
300
284
  return {pipette_axis: pipette_position}
301
285
 
302
286
  def build_axis_map(self, axis_map: StringAxisMap) -> AxisMapType:
303
- """Take in a :py:class:`.types.StringAxisMap` and output an axis map.
304
-
305
- The :py:class:`.types.StringAxisMap` is allowed to contain any of the following strings:
287
+ """Take in a :py:class:`.types.StringAxisMap` and output a :py:class:`.types.AxisMapType`.
288
+ A :py:class:`.types.StringAxisMap` is allowed to contain any of the following strings:
306
289
  ``"x"``, ``"y"``, "``z_l"``, "``z_r"``, "``z_g"``, ``"q"``.
307
290
 
308
291
  An example of a valid axis map could be:
@@ -489,7 +489,6 @@ def ensure_thermocycler_profile_steps(
489
489
  temperature = step.get("temperature")
490
490
  hold_mins = step.get("hold_time_minutes")
491
491
  hold_secs = step.get("hold_time_seconds")
492
- ramp_rate = step.get("ramp_rate")
493
492
  if temperature is None:
494
493
  raise ValueError("temperature must be defined for each step in cycle")
495
494
  if hold_mins is None and hold_secs is None:
@@ -497,14 +496,10 @@ def ensure_thermocycler_profile_steps(
497
496
  "either hold_time_minutes or hold_time_seconds must be"
498
497
  "defined for each step in cycle"
499
498
  )
500
- if ramp_rate is not None and ramp_rate <= 0:
501
- raise ValueError("Ramp rate must be greater than 0.")
502
499
  validated_seconds = ensure_hold_time_seconds(hold_secs, hold_mins)
503
500
  validated_steps.append(
504
501
  ThermocyclerStep(
505
- temperature=temperature,
506
- hold_time_seconds=validated_seconds,
507
- ramp_rate=ramp_rate,
502
+ temperature=temperature, hold_time_seconds=validated_seconds
508
503
  )
509
504
  )
510
505
  return validated_steps
@@ -26,9 +26,8 @@ from .actions import (
26
26
  AddModuleAction,
27
27
  FinishErrorDetails,
28
28
  DoorChangeAction,
29
+ ResetTipsAction,
29
30
  SetPipetteMovementSpeedAction,
30
- StartTaskAction,
31
- FinishTaskAction,
32
31
  )
33
32
  from .get_state_update import get_state_updates
34
33
 
@@ -56,9 +55,8 @@ __all__ = [
56
55
  "AddAddressableAreaAction",
57
56
  "AddModuleAction",
58
57
  "DoorChangeAction",
58
+ "ResetTipsAction",
59
59
  "SetPipetteMovementSpeedAction",
60
- "StartTaskAction",
61
- "FinishTaskAction",
62
60
  # action payload values
63
61
  "PauseSource",
64
62
  "FinishErrorDetails",
@@ -3,7 +3,6 @@
3
3
  Actions can be passed to the ActionDispatcher, where they will trigger
4
4
  reactions in objects that subscribe to the pipeline, like the StateStore.
5
5
  """
6
-
7
6
  import dataclasses
8
7
  from datetime import datetime
9
8
  from enum import Enum
@@ -21,7 +20,6 @@ from ..commands import (
21
20
  CommandDefinedErrorData,
22
21
  )
23
22
  from ..error_recovery_policy import ErrorRecoveryPolicy, ErrorRecoveryType
24
- from ..errors import ErrorOccurrence
25
23
  from ..notes.notes import CommandNote
26
24
  from ..state.update_types import StateUpdate
27
25
  from ..types import (
@@ -29,7 +27,6 @@ from ..types import (
29
27
  ModuleDefinition,
30
28
  Liquid,
31
29
  DeckConfigurationType,
32
- Task,
33
30
  )
34
31
 
35
32
 
@@ -63,7 +60,7 @@ class PauseAction:
63
60
  class StopAction:
64
61
  """Request engine execution to stop soon."""
65
62
 
66
- from_asynchronous_error: bool = False
63
+ from_estop: bool = False
67
64
 
68
65
 
69
66
  @dataclasses.dataclass(frozen=True)
@@ -204,22 +201,6 @@ class FailCommandAction:
204
201
  """The command to fail, in its prior `running` state."""
205
202
 
206
203
 
207
- @dataclasses.dataclass(frozen=True)
208
- class StartTaskAction:
209
- """Store new task in state."""
210
-
211
- task: Task
212
-
213
-
214
- @dataclasses.dataclass(frozen=True)
215
- class FinishTaskAction:
216
- """Mark task as finished in state."""
217
-
218
- task_id: str
219
- finished_at: datetime
220
- error: ErrorOccurrence | None
221
-
222
-
223
204
  @dataclasses.dataclass(frozen=True)
224
205
  class AddLabwareOffsetAction:
225
206
  """Add a labware offset, to apply to subsequent `LoadLabwareCommand`s."""
@@ -272,6 +253,13 @@ class AddModuleAction:
272
253
  module_live_data: LiveData
273
254
 
274
255
 
256
+ @dataclasses.dataclass(frozen=True)
257
+ class ResetTipsAction:
258
+ """Reset the tip tracking state of a given tip rack."""
259
+
260
+ labware_id: str
261
+
262
+
275
263
  @dataclasses.dataclass(frozen=True)
276
264
  class SetPipetteMovementSpeedAction:
277
265
  """Set the speed of a pipette's X/Y/Z movements. Does not affect plunger speed.
@@ -308,8 +296,7 @@ Action = Union[
308
296
  SetDeckConfigurationAction,
309
297
  AddAddressableAreaAction,
310
298
  AddLiquidAction,
299
+ ResetTipsAction,
311
300
  SetPipetteMovementSpeedAction,
312
301
  SetErrorRecoveryPolicyAction,
313
- StartTaskAction,
314
- FinishTaskAction,
315
302
  ]
@@ -65,12 +65,6 @@ class SyncClient:
65
65
  ) -> commands.LoadLabwareResult:
66
66
  pass
67
67
 
68
- @overload
69
- def execute_command_without_recovery(
70
- self, params: commands.CreateTimerParams
71
- ) -> commands.CreateTimerResult:
72
- pass
73
-
74
68
  @overload
75
69
  def execute_command_without_recovery(
76
70
  self, params: commands.LoadModuleParams
@@ -155,6 +149,13 @@ class SyncClient:
155
149
  """Add a liquid to the engine."""
156
150
  return self._transport.call_method("add_liquid", name=name, color=color, description=description) # type: ignore[no-any-return]
157
151
 
152
+ def reset_tips(self, labware_id: str) -> None:
153
+ """Reset a labware's tip tracking state.."""
154
+ self._transport.call_method(
155
+ "reset_tips",
156
+ labware_id=labware_id,
157
+ )
158
+
158
159
  def add_labware_offset(self, request: LabwareOffsetCreate) -> None:
159
160
  """Add a labware offset."""
160
161
  self._transport.call_method("add_labware_offset", request=request)
@@ -271,22 +271,6 @@ 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
-
290
274
  from .pick_up_tip import (
291
275
  PickUpTip,
292
276
  PickUpTipParams,
@@ -400,14 +384,6 @@ from .get_next_tip import (
400
384
  GetNextTipCommandType,
401
385
  )
402
386
 
403
- from .set_tip_state import (
404
- SetTipState,
405
- SetTipStateCreate,
406
- SetTipStateParams,
407
- SetTipStateResult,
408
- SetTipStateCommandType,
409
- )
410
-
411
387
  from .liquid_probe import (
412
388
  LiquidProbe,
413
389
  LiquidProbeParams,
@@ -643,12 +619,6 @@ __all__ = [
643
619
  "WaitForDurationCreate",
644
620
  "WaitForDurationResult",
645
621
  "WaitForDurationCommandType",
646
- # Timer command models
647
- "CreateTimer",
648
- "CreateTimerCreate",
649
- "CreateTimerParams",
650
- "CreateTimerResult",
651
- "CreateTimerCommandType",
652
622
  # pick up tip command models
653
623
  "PickUpTip",
654
624
  "PickUpTipCreate",
@@ -755,12 +725,6 @@ __all__ = [
755
725
  "GetNextTipParams",
756
726
  "GetNextTipResult",
757
727
  "GetNextTipCommandType",
758
- # set tip state command bundle
759
- "SetTipState",
760
- "SetTipStateCreate",
761
- "SetTipStateParams",
762
- "SetTipStateResult",
763
- "SetTipStateCommandType",
764
728
  # liquid probe command bundle
765
729
  "LiquidProbe",
766
730
  "LiquidProbeParams",
@@ -790,10 +754,4 @@ __all__ = [
790
754
  "PressureDispenseCreate",
791
755
  "PressureDispenseResult",
792
756
  "PressureDispenseCommandType",
793
- # wait for tasks command bundle
794
- "WaitForTasks",
795
- "WaitForTasksCreate",
796
- "WaitForTasksParams",
797
- "WaitForTasksResult",
798
- "WaitForTasksCommandType",
799
757
  ]
@@ -102,12 +102,25 @@ 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
+
105
116
  await self._labware_movement.move_labware_with_gripper(
106
117
  labware_definition=lid_definition,
107
118
  current_location=current_location,
108
119
  new_location=new_location,
109
- user_pick_up_offset=Point(),
110
- user_drop_offset=Point(),
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),
111
124
  post_drop_slide_offset=None,
112
125
  gripper_z_offset=LID_Z_CLEARANCE,
113
126
  )
@@ -103,12 +103,25 @@ 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
+
106
117
  await self._labware_movement.move_labware_with_gripper(
107
118
  labware_definition=lid_definition,
108
119
  current_location=current_location,
109
120
  new_location=new_location,
110
- user_pick_up_offset=Point(),
111
- user_drop_offset=Point(),
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),
112
125
  post_drop_slide_offset=None,
113
126
  gripper_z_offset=LID_Z_CLEARANCE,
114
127
  )
@@ -161,7 +161,6 @@ 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,
165
164
  )
166
165
  state_update.append(move_result.state_update)
167
166
  if isinstance(move_result, DefinedErrorData):
@@ -185,7 +185,6 @@ 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,
189
188
  model_utils: ModelUtils,
190
189
  status_bar: execution.StatusBarHandler,
191
190
  command_note_adder: CommandNoteAdder,
@@ -267,22 +267,6 @@ 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
-
286
270
  from .pick_up_tip import (
287
271
  PickUpTip,
288
272
  PickUpTipParams,
@@ -388,14 +372,6 @@ from .get_next_tip import (
388
372
  GetNextTipCommandType,
389
373
  )
390
374
 
391
- from .set_tip_state import (
392
- SetTipState,
393
- SetTipStateCreate,
394
- SetTipStateParams,
395
- SetTipStateResult,
396
- SetTipStateCommandType,
397
- )
398
-
399
375
  from .liquid_probe import (
400
376
  LiquidProbe,
401
377
  LiquidProbeParams,
@@ -478,8 +454,6 @@ Command = Annotated[
478
454
  PrepareToAspirate,
479
455
  WaitForResume,
480
456
  WaitForDuration,
481
- WaitForTasks,
482
- CreateTimer,
483
457
  PickUpTip,
484
458
  SavePosition,
485
459
  SetRailLights,
@@ -488,7 +462,6 @@ Command = Annotated[
488
462
  VerifyTipPresence,
489
463
  GetTipPresence,
490
464
  GetNextTip,
491
- SetTipState,
492
465
  LiquidProbe,
493
466
  TryLiquidProbe,
494
467
  SealPipetteToTip,
@@ -584,8 +557,6 @@ CommandParams = Union[
584
557
  PrepareToAspirateParams,
585
558
  WaitForResumeParams,
586
559
  WaitForDurationParams,
587
- WaitForTasksParams,
588
- CreateTimerParams,
589
560
  PickUpTipParams,
590
561
  SavePositionParams,
591
562
  SetRailLightsParams,
@@ -594,7 +565,6 @@ CommandParams = Union[
594
565
  VerifyTipPresenceParams,
595
566
  GetTipPresenceParams,
596
567
  GetNextTipParams,
597
- SetTipStateParams,
598
568
  LiquidProbeParams,
599
569
  TryLiquidProbeParams,
600
570
  SealPipetteToTipParams,
@@ -688,8 +658,6 @@ CommandType = Union[
688
658
  PrepareToAspirateCommandType,
689
659
  WaitForResumeCommandType,
690
660
  WaitForDurationCommandType,
691
- WaitForTasksCommandType,
692
- CreateTimerCommandType,
693
661
  PickUpTipCommandType,
694
662
  SavePositionCommandType,
695
663
  SetRailLightsCommandType,
@@ -698,7 +666,6 @@ CommandType = Union[
698
666
  VerifyTipPresenceCommandType,
699
667
  GetTipPresenceCommandType,
700
668
  GetNextTipCommandType,
701
- SetTipStateCommandType,
702
669
  LiquidProbeCommandType,
703
670
  TryLiquidProbeCommandType,
704
671
  SealPipetteToTipCommandType,
@@ -793,8 +760,6 @@ CommandCreate = Annotated[
793
760
  PrepareToAspirateCreate,
794
761
  WaitForResumeCreate,
795
762
  WaitForDurationCreate,
796
- WaitForTasksCreate,
797
- CreateTimerCreate,
798
763
  PickUpTipCreate,
799
764
  SavePositionCreate,
800
765
  SetRailLightsCreate,
@@ -803,7 +768,6 @@ CommandCreate = Annotated[
803
768
  VerifyTipPresenceCreate,
804
769
  GetTipPresenceCreate,
805
770
  GetNextTipCreate,
806
- SetTipStateCreate,
807
771
  LiquidProbeCreate,
808
772
  TryLiquidProbeCreate,
809
773
  SealPipetteToTipCreate,
@@ -906,8 +870,6 @@ CommandResult = Union[
906
870
  PrepareToAspirateResult,
907
871
  WaitForResumeResult,
908
872
  WaitForDurationResult,
909
- WaitForTasksResult,
910
- CreateTimerResult,
911
873
  PickUpTipResult,
912
874
  SavePositionResult,
913
875
  SetRailLightsResult,
@@ -916,7 +878,6 @@ CommandResult = Union[
916
878
  VerifyTipPresenceResult,
917
879
  GetTipPresenceResult,
918
880
  GetNextTipResult,
919
- SetTipStateResult,
920
881
  LiquidProbeResult,
921
882
  TryLiquidProbeResult,
922
883
  SealPipetteToTipResult,
@@ -101,7 +101,6 @@ 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,
105
104
  )
106
105
  if isinstance(move_result, DefinedErrorData):
107
106
  return move_result