opentrons 8.2.0a4__py2.py3-none-any.whl → 8.3.0a1__py2.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 (229) hide show
  1. opentrons/calibration_storage/deck_configuration.py +3 -3
  2. opentrons/calibration_storage/file_operators.py +3 -3
  3. opentrons/calibration_storage/helpers.py +3 -1
  4. opentrons/calibration_storage/ot2/models/v1.py +16 -29
  5. opentrons/calibration_storage/ot2/tip_length.py +7 -4
  6. opentrons/calibration_storage/ot3/models/v1.py +14 -23
  7. opentrons/cli/analyze.py +18 -6
  8. opentrons/config/defaults_ot3.py +1 -0
  9. opentrons/drivers/asyncio/communication/__init__.py +2 -0
  10. opentrons/drivers/asyncio/communication/errors.py +16 -3
  11. opentrons/drivers/asyncio/communication/serial_connection.py +24 -9
  12. opentrons/drivers/command_builder.py +2 -2
  13. opentrons/drivers/flex_stacker/__init__.py +9 -0
  14. opentrons/drivers/flex_stacker/abstract.py +89 -0
  15. opentrons/drivers/flex_stacker/driver.py +260 -0
  16. opentrons/drivers/flex_stacker/simulator.py +109 -0
  17. opentrons/drivers/flex_stacker/types.py +138 -0
  18. opentrons/drivers/heater_shaker/driver.py +18 -3
  19. opentrons/drivers/temp_deck/driver.py +13 -3
  20. opentrons/drivers/thermocycler/driver.py +17 -3
  21. opentrons/execute.py +3 -1
  22. opentrons/hardware_control/__init__.py +1 -2
  23. opentrons/hardware_control/api.py +28 -20
  24. opentrons/hardware_control/backends/flex_protocol.py +17 -7
  25. opentrons/hardware_control/backends/ot3controller.py +213 -63
  26. opentrons/hardware_control/backends/ot3simulator.py +18 -9
  27. opentrons/hardware_control/backends/ot3utils.py +43 -15
  28. opentrons/hardware_control/dev_types.py +4 -0
  29. opentrons/hardware_control/emulation/heater_shaker.py +4 -0
  30. opentrons/hardware_control/emulation/module_server/client.py +1 -1
  31. opentrons/hardware_control/emulation/module_server/server.py +5 -3
  32. opentrons/hardware_control/emulation/settings.py +3 -4
  33. opentrons/hardware_control/instruments/ot2/instrument_calibration.py +2 -1
  34. opentrons/hardware_control/instruments/ot2/pipette.py +15 -22
  35. opentrons/hardware_control/instruments/ot2/pipette_handler.py +8 -1
  36. opentrons/hardware_control/instruments/ot3/gripper.py +2 -2
  37. opentrons/hardware_control/instruments/ot3/pipette.py +23 -22
  38. opentrons/hardware_control/instruments/ot3/pipette_handler.py +10 -1
  39. opentrons/hardware_control/modules/mod_abc.py +2 -2
  40. opentrons/hardware_control/motion_utilities.py +68 -0
  41. opentrons/hardware_control/nozzle_manager.py +39 -41
  42. opentrons/hardware_control/ot3_calibration.py +1 -1
  43. opentrons/hardware_control/ot3api.py +60 -23
  44. opentrons/hardware_control/protocols/gripper_controller.py +3 -0
  45. opentrons/hardware_control/protocols/hardware_manager.py +5 -1
  46. opentrons/hardware_control/protocols/liquid_handler.py +18 -0
  47. opentrons/hardware_control/protocols/motion_controller.py +6 -0
  48. opentrons/hardware_control/robot_calibration.py +1 -1
  49. opentrons/hardware_control/types.py +61 -0
  50. opentrons/protocol_api/__init__.py +20 -1
  51. opentrons/protocol_api/_liquid.py +24 -49
  52. opentrons/protocol_api/_liquid_properties.py +754 -0
  53. opentrons/protocol_api/_types.py +24 -0
  54. opentrons/protocol_api/core/common.py +2 -0
  55. opentrons/protocol_api/core/engine/instrument.py +82 -10
  56. opentrons/protocol_api/core/engine/labware.py +29 -7
  57. opentrons/protocol_api/core/engine/protocol.py +130 -5
  58. opentrons/protocol_api/core/engine/robot.py +139 -0
  59. opentrons/protocol_api/core/engine/well.py +4 -1
  60. opentrons/protocol_api/core/instrument.py +46 -4
  61. opentrons/protocol_api/core/labware.py +13 -4
  62. opentrons/protocol_api/core/legacy/legacy_instrument_core.py +37 -3
  63. opentrons/protocol_api/core/legacy/legacy_labware_core.py +13 -4
  64. opentrons/protocol_api/core/legacy/legacy_protocol_core.py +32 -1
  65. opentrons/protocol_api/core/legacy/legacy_robot_core.py +0 -0
  66. opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py +37 -3
  67. opentrons/protocol_api/core/protocol.py +34 -1
  68. opentrons/protocol_api/core/robot.py +51 -0
  69. opentrons/protocol_api/instrument_context.py +158 -44
  70. opentrons/protocol_api/labware.py +231 -7
  71. opentrons/protocol_api/module_contexts.py +21 -17
  72. opentrons/protocol_api/protocol_context.py +125 -4
  73. opentrons/protocol_api/robot_context.py +204 -32
  74. opentrons/protocol_api/validation.py +262 -3
  75. opentrons/protocol_engine/__init__.py +4 -0
  76. opentrons/protocol_engine/actions/actions.py +2 -3
  77. opentrons/protocol_engine/clients/sync_client.py +18 -0
  78. opentrons/protocol_engine/commands/__init__.py +81 -0
  79. opentrons/protocol_engine/commands/absorbance_reader/close_lid.py +0 -2
  80. opentrons/protocol_engine/commands/absorbance_reader/initialize.py +19 -5
  81. opentrons/protocol_engine/commands/absorbance_reader/open_lid.py +0 -1
  82. opentrons/protocol_engine/commands/absorbance_reader/read.py +32 -9
  83. opentrons/protocol_engine/commands/air_gap_in_place.py +160 -0
  84. opentrons/protocol_engine/commands/aspirate.py +103 -53
  85. opentrons/protocol_engine/commands/aspirate_in_place.py +55 -51
  86. opentrons/protocol_engine/commands/blow_out.py +44 -39
  87. opentrons/protocol_engine/commands/blow_out_in_place.py +21 -32
  88. opentrons/protocol_engine/commands/calibration/calibrate_gripper.py +13 -6
  89. opentrons/protocol_engine/commands/calibration/calibrate_module.py +1 -1
  90. opentrons/protocol_engine/commands/calibration/calibrate_pipette.py +3 -3
  91. opentrons/protocol_engine/commands/calibration/move_to_maintenance_position.py +1 -1
  92. opentrons/protocol_engine/commands/command.py +73 -66
  93. opentrons/protocol_engine/commands/command_unions.py +101 -1
  94. opentrons/protocol_engine/commands/comment.py +1 -1
  95. opentrons/protocol_engine/commands/configure_for_volume.py +10 -3
  96. opentrons/protocol_engine/commands/configure_nozzle_layout.py +6 -4
  97. opentrons/protocol_engine/commands/custom.py +6 -12
  98. opentrons/protocol_engine/commands/dispense.py +82 -48
  99. opentrons/protocol_engine/commands/dispense_in_place.py +71 -51
  100. opentrons/protocol_engine/commands/drop_tip.py +52 -31
  101. opentrons/protocol_engine/commands/drop_tip_in_place.py +13 -3
  102. opentrons/protocol_engine/commands/generate_command_schema.py +4 -11
  103. opentrons/protocol_engine/commands/get_next_tip.py +134 -0
  104. opentrons/protocol_engine/commands/get_tip_presence.py +1 -1
  105. opentrons/protocol_engine/commands/heater_shaker/close_labware_latch.py +1 -1
  106. opentrons/protocol_engine/commands/heater_shaker/deactivate_heater.py +1 -1
  107. opentrons/protocol_engine/commands/heater_shaker/deactivate_shaker.py +1 -1
  108. opentrons/protocol_engine/commands/heater_shaker/open_labware_latch.py +1 -1
  109. opentrons/protocol_engine/commands/heater_shaker/set_and_wait_for_shake_speed.py +1 -1
  110. opentrons/protocol_engine/commands/heater_shaker/set_target_temperature.py +1 -1
  111. opentrons/protocol_engine/commands/heater_shaker/wait_for_temperature.py +10 -4
  112. opentrons/protocol_engine/commands/home.py +13 -4
  113. opentrons/protocol_engine/commands/liquid_probe.py +67 -24
  114. opentrons/protocol_engine/commands/load_labware.py +29 -7
  115. opentrons/protocol_engine/commands/load_lid.py +146 -0
  116. opentrons/protocol_engine/commands/load_lid_stack.py +189 -0
  117. opentrons/protocol_engine/commands/load_liquid.py +12 -4
  118. opentrons/protocol_engine/commands/load_liquid_class.py +144 -0
  119. opentrons/protocol_engine/commands/load_module.py +31 -10
  120. opentrons/protocol_engine/commands/load_pipette.py +19 -8
  121. opentrons/protocol_engine/commands/magnetic_module/disengage.py +1 -1
  122. opentrons/protocol_engine/commands/magnetic_module/engage.py +1 -1
  123. opentrons/protocol_engine/commands/move_labware.py +19 -6
  124. opentrons/protocol_engine/commands/move_relative.py +35 -25
  125. opentrons/protocol_engine/commands/move_to_addressable_area.py +40 -27
  126. opentrons/protocol_engine/commands/move_to_addressable_area_for_drop_tip.py +53 -32
  127. opentrons/protocol_engine/commands/move_to_coordinates.py +36 -22
  128. opentrons/protocol_engine/commands/move_to_well.py +40 -24
  129. opentrons/protocol_engine/commands/movement_common.py +338 -0
  130. opentrons/protocol_engine/commands/pick_up_tip.py +49 -27
  131. opentrons/protocol_engine/commands/pipetting_common.py +169 -87
  132. opentrons/protocol_engine/commands/prepare_to_aspirate.py +24 -33
  133. opentrons/protocol_engine/commands/reload_labware.py +1 -1
  134. opentrons/protocol_engine/commands/retract_axis.py +1 -1
  135. opentrons/protocol_engine/commands/robot/__init__.py +69 -0
  136. opentrons/protocol_engine/commands/robot/close_gripper_jaw.py +86 -0
  137. opentrons/protocol_engine/commands/robot/common.py +18 -0
  138. opentrons/protocol_engine/commands/robot/move_axes_relative.py +101 -0
  139. opentrons/protocol_engine/commands/robot/move_axes_to.py +100 -0
  140. opentrons/protocol_engine/commands/robot/move_to.py +94 -0
  141. opentrons/protocol_engine/commands/robot/open_gripper_jaw.py +77 -0
  142. opentrons/protocol_engine/commands/save_position.py +14 -5
  143. opentrons/protocol_engine/commands/set_rail_lights.py +1 -1
  144. opentrons/protocol_engine/commands/set_status_bar.py +1 -1
  145. opentrons/protocol_engine/commands/temperature_module/deactivate.py +1 -1
  146. opentrons/protocol_engine/commands/temperature_module/set_target_temperature.py +1 -1
  147. opentrons/protocol_engine/commands/temperature_module/wait_for_temperature.py +10 -4
  148. opentrons/protocol_engine/commands/thermocycler/close_lid.py +1 -1
  149. opentrons/protocol_engine/commands/thermocycler/deactivate_block.py +1 -1
  150. opentrons/protocol_engine/commands/thermocycler/deactivate_lid.py +1 -1
  151. opentrons/protocol_engine/commands/thermocycler/open_lid.py +1 -1
  152. opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py +8 -2
  153. opentrons/protocol_engine/commands/thermocycler/run_profile.py +9 -3
  154. opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py +11 -4
  155. opentrons/protocol_engine/commands/thermocycler/set_target_lid_temperature.py +1 -1
  156. opentrons/protocol_engine/commands/thermocycler/wait_for_block_temperature.py +1 -1
  157. opentrons/protocol_engine/commands/thermocycler/wait_for_lid_temperature.py +1 -1
  158. opentrons/protocol_engine/commands/touch_tip.py +65 -16
  159. opentrons/protocol_engine/commands/unsafe/unsafe_blow_out_in_place.py +4 -1
  160. opentrons/protocol_engine/commands/unsafe/unsafe_drop_tip_in_place.py +12 -3
  161. opentrons/protocol_engine/commands/unsafe/unsafe_engage_axes.py +1 -4
  162. opentrons/protocol_engine/commands/unsafe/update_position_estimators.py +1 -4
  163. opentrons/protocol_engine/commands/verify_tip_presence.py +11 -4
  164. opentrons/protocol_engine/commands/wait_for_duration.py +10 -3
  165. opentrons/protocol_engine/commands/wait_for_resume.py +10 -3
  166. opentrons/protocol_engine/errors/__init__.py +8 -0
  167. opentrons/protocol_engine/errors/error_occurrence.py +19 -20
  168. opentrons/protocol_engine/errors/exceptions.py +50 -0
  169. opentrons/protocol_engine/execution/command_executor.py +1 -1
  170. opentrons/protocol_engine/execution/equipment.py +73 -5
  171. opentrons/protocol_engine/execution/gantry_mover.py +364 -8
  172. opentrons/protocol_engine/execution/movement.py +27 -0
  173. opentrons/protocol_engine/execution/pipetting.py +5 -1
  174. opentrons/protocol_engine/execution/tip_handler.py +4 -6
  175. opentrons/protocol_engine/notes/notes.py +1 -1
  176. opentrons/protocol_engine/protocol_engine.py +7 -6
  177. opentrons/protocol_engine/resources/labware_data_provider.py +1 -1
  178. opentrons/protocol_engine/resources/labware_validation.py +5 -0
  179. opentrons/protocol_engine/resources/module_data_provider.py +1 -1
  180. opentrons/protocol_engine/resources/pipette_data_provider.py +26 -0
  181. opentrons/protocol_engine/slot_standardization.py +9 -9
  182. opentrons/protocol_engine/state/_move_types.py +9 -5
  183. opentrons/protocol_engine/state/_well_math.py +193 -0
  184. opentrons/protocol_engine/state/addressable_areas.py +25 -61
  185. opentrons/protocol_engine/state/command_history.py +12 -0
  186. opentrons/protocol_engine/state/commands.py +17 -13
  187. opentrons/protocol_engine/state/files.py +10 -12
  188. opentrons/protocol_engine/state/fluid_stack.py +138 -0
  189. opentrons/protocol_engine/state/frustum_helpers.py +57 -32
  190. opentrons/protocol_engine/state/geometry.py +47 -1
  191. opentrons/protocol_engine/state/labware.py +79 -25
  192. opentrons/protocol_engine/state/liquid_classes.py +82 -0
  193. opentrons/protocol_engine/state/liquids.py +16 -4
  194. opentrons/protocol_engine/state/modules.py +52 -70
  195. opentrons/protocol_engine/state/motion.py +6 -1
  196. opentrons/protocol_engine/state/pipettes.py +144 -58
  197. opentrons/protocol_engine/state/state.py +21 -2
  198. opentrons/protocol_engine/state/state_summary.py +4 -2
  199. opentrons/protocol_engine/state/tips.py +11 -44
  200. opentrons/protocol_engine/state/update_types.py +343 -48
  201. opentrons/protocol_engine/state/wells.py +19 -11
  202. opentrons/protocol_engine/types.py +176 -28
  203. opentrons/protocol_reader/extract_labware_definitions.py +5 -2
  204. opentrons/protocol_reader/file_format_validator.py +5 -5
  205. opentrons/protocol_runner/json_file_reader.py +9 -3
  206. opentrons/protocol_runner/json_translator.py +51 -25
  207. opentrons/protocol_runner/legacy_command_mapper.py +66 -64
  208. opentrons/protocol_runner/protocol_runner.py +35 -4
  209. opentrons/protocol_runner/python_protocol_wrappers.py +1 -1
  210. opentrons/protocol_runner/run_orchestrator.py +13 -3
  211. opentrons/protocols/advanced_control/common.py +38 -0
  212. opentrons/protocols/advanced_control/mix.py +1 -1
  213. opentrons/protocols/advanced_control/transfers/__init__.py +0 -0
  214. opentrons/protocols/advanced_control/transfers/common.py +56 -0
  215. opentrons/protocols/advanced_control/{transfers.py → transfers/transfer.py} +10 -85
  216. opentrons/protocols/api_support/definitions.py +1 -1
  217. opentrons/protocols/api_support/instrument.py +1 -1
  218. opentrons/protocols/api_support/util.py +10 -0
  219. opentrons/protocols/labware.py +39 -6
  220. opentrons/protocols/models/json_protocol.py +5 -9
  221. opentrons/simulate.py +3 -1
  222. opentrons/types.py +162 -2
  223. opentrons/util/logging_config.py +1 -1
  224. {opentrons-8.2.0a4.dist-info → opentrons-8.3.0a1.dist-info}/METADATA +16 -15
  225. {opentrons-8.2.0a4.dist-info → opentrons-8.3.0a1.dist-info}/RECORD +229 -202
  226. {opentrons-8.2.0a4.dist-info → opentrons-8.3.0a1.dist-info}/WHEEL +1 -1
  227. {opentrons-8.2.0a4.dist-info → opentrons-8.3.0a1.dist-info}/LICENSE +0 -0
  228. {opentrons-8.2.0a4.dist-info → opentrons-8.3.0a1.dist-info}/entry_points.txt +0 -0
  229. {opentrons-8.2.0a4.dist-info → opentrons-8.3.0a1.dist-info}/top_level.txt +0 -0
@@ -3,14 +3,14 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from abc import abstractmethod, ABC
6
- from typing import Any, Generic, Optional, TypeVar, Union
6
+ from typing import Any, Generic, Optional, TypeVar, Union, List
7
7
 
8
8
  from opentrons import types
9
9
  from opentrons.hardware_control.dev_types import PipetteDict
10
10
  from opentrons.protocols.api_support.util import FlowRates
11
+ from opentrons.protocols.advanced_control.transfers.common import TransferTipPolicyV2
11
12
  from opentrons.protocol_api._nozzle_layout import NozzleLayout
12
- from opentrons.hardware_control.nozzle_manager import NozzleMap
13
-
13
+ from opentrons.protocol_api._liquid import LiquidClass
14
14
  from ..disposal_locations import TrashBin, WasteChute
15
15
  from .well import WellCoreType
16
16
 
@@ -24,6 +24,14 @@ class AbstractInstrument(ABC, Generic[WellCoreType]):
24
24
  def set_default_speed(self, speed: float) -> None:
25
25
  ...
26
26
 
27
+ @abstractmethod
28
+ def air_gap_in_place(self, volume: float, flow_rate: float) -> None:
29
+ """Aspirate a given volume of air from the current location of the pipette.
30
+ Args:
31
+ volume: The volume of air to aspirate, in microliters.
32
+ flow_rate: The flow rate of air into the pipette, in microliters.
33
+ """
34
+
27
35
  @abstractmethod
28
36
  def aspirate(
29
37
  self,
@@ -222,7 +230,7 @@ class AbstractInstrument(ABC, Generic[WellCoreType]):
222
230
  ...
223
231
 
224
232
  @abstractmethod
225
- def get_nozzle_map(self) -> NozzleMap:
233
+ def get_nozzle_map(self) -> types.NozzleMapInterface:
226
234
  ...
227
235
 
228
236
  @abstractmethod
@@ -253,6 +261,10 @@ class AbstractInstrument(ABC, Generic[WellCoreType]):
253
261
  def get_liquid_presence_detection(self) -> bool:
254
262
  ...
255
263
 
264
+ @abstractmethod
265
+ def _pressure_supported_by_pipette(self) -> bool:
266
+ ...
267
+
256
268
  @abstractmethod
257
269
  def set_liquid_presence_detection(self, enable: bool) -> None:
258
270
  ...
@@ -298,6 +310,32 @@ class AbstractInstrument(ABC, Generic[WellCoreType]):
298
310
  """
299
311
  ...
300
312
 
313
+ @abstractmethod
314
+ def load_liquid_class(
315
+ self,
316
+ liquid_class: LiquidClass,
317
+ pipette_load_name: str,
318
+ tiprack_uri: str,
319
+ ) -> str:
320
+ """Load the liquid class properties of given pipette and tiprack into the engine.
321
+
322
+ Returns: ID of the liquid class record
323
+ """
324
+ ...
325
+
326
+ @abstractmethod
327
+ def transfer_liquid(
328
+ self,
329
+ liquid_class_id: str,
330
+ volume: float,
331
+ source: List[WellCoreType],
332
+ dest: List[WellCoreType],
333
+ new_tip: TransferTipPolicyV2,
334
+ trash_location: Union[WellCoreType, types.Location, TrashBin, WasteChute],
335
+ ) -> None:
336
+ """Transfer a liquid from source to dest according to liquid class properties."""
337
+ ...
338
+
301
339
  @abstractmethod
302
340
  def is_tip_tracking_available(self) -> bool:
303
341
  """Return whether auto tip tracking is available for the pipette's current nozzle configuration."""
@@ -327,5 +365,9 @@ class AbstractInstrument(ABC, Generic[WellCoreType]):
327
365
  """Do a liquid probe to find the level of the liquid in the well."""
328
366
  ...
329
367
 
368
+ @abstractmethod
369
+ def nozzle_configuration_valid_for_lld(self) -> bool:
370
+ """Check if the nozzle configuration currently supports LLD."""
371
+
330
372
 
331
373
  InstrumentCoreType = TypeVar("InstrumentCoreType", bound=AbstractInstrument[Any])
@@ -1,8 +1,9 @@
1
1
  """The interface that implements InstrumentContext."""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  from abc import ABC, abstractmethod
5
- from typing import Any, Generic, List, NamedTuple, Optional, TypeVar
6
+ from typing import Any, Generic, List, NamedTuple, Optional, TypeVar, Dict
6
7
 
7
8
  from opentrons_shared_data.labware.types import (
8
9
  LabwareUri,
@@ -10,8 +11,8 @@ from opentrons_shared_data.labware.types import (
10
11
  LabwareDefinition as LabwareDefinitionDict,
11
12
  )
12
13
 
13
- from opentrons.types import DeckSlotName, Point
14
- from opentrons.hardware_control.nozzle_manager import NozzleMap
14
+ from opentrons.types import DeckSlotName, Point, NozzleMapInterface
15
+ from .._liquid import Liquid
15
16
 
16
17
  from .well import WellCoreType
17
18
 
@@ -118,7 +119,7 @@ class AbstractLabware(ABC, Generic[WellCoreType]):
118
119
  self,
119
120
  num_tips: int,
120
121
  starting_tip: Optional[WellCoreType],
121
- nozzle_map: Optional[NozzleMap],
122
+ nozzle_map: Optional[NozzleMapInterface],
122
123
  ) -> Optional[str]:
123
124
  """Get the name of the next available tip(s) in the rack, if available."""
124
125
 
@@ -134,5 +135,13 @@ class AbstractLabware(ABC, Generic[WellCoreType]):
134
135
  def get_deck_slot(self) -> Optional[DeckSlotName]:
135
136
  """Get the deck slot the labware or its parent is in, if any."""
136
137
 
138
+ @abstractmethod
139
+ def load_liquid(self, volumes: Dict[str, float], liquid: Liquid) -> None:
140
+ """Load liquid into wells of the labware."""
141
+
142
+ @abstractmethod
143
+ def load_empty(self, wells: List[str]) -> None:
144
+ """Mark wells of the labware as empty."""
145
+
137
146
 
138
147
  LabwareCoreType = TypeVar("LabwareCoreType", bound=AbstractLabware[Any])
@@ -1,12 +1,13 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import logging
4
- from typing import TYPE_CHECKING, Optional, Union
4
+ from typing import TYPE_CHECKING, Optional, Union, List
5
5
 
6
6
  from opentrons import types
7
7
  from opentrons.hardware_control import CriticalPoint
8
8
  from opentrons.hardware_control.dev_types import PipetteDict
9
9
  from opentrons.protocol_api.core.common import WellCore
10
+ from opentrons.protocols.advanced_control.transfers.common import TransferTipPolicyV2
10
11
  from opentrons.protocols.api_support import instrument as instrument_support
11
12
  from opentrons.protocols.api_support.definitions import MAX_SUPPORTED_VERSION
12
13
  from opentrons.protocols.api_support.labware_like import LabwareLike
@@ -19,7 +20,7 @@ from opentrons.protocols.api_support.util import (
19
20
  )
20
21
  from opentrons.protocols.geometry import planning
21
22
  from opentrons.protocol_api._nozzle_layout import NozzleLayout
22
- from opentrons.hardware_control.nozzle_manager import NozzleMap
23
+ from opentrons.protocol_api._liquid import LiquidClass
23
24
 
24
25
  from ...disposal_locations import TrashBin, WasteChute
25
26
  from ..instrument import AbstractInstrument
@@ -72,6 +73,9 @@ class LegacyInstrumentCore(AbstractInstrument[LegacyWellCore]):
72
73
  """Sets the speed at which the robot's gantry moves."""
73
74
  self._default_speed = speed
74
75
 
76
+ def air_gap_in_place(self, volume: float, flow_rate: float) -> None:
77
+ assert False, "Air gap tracking only available in API version 2.22 and later"
78
+
75
79
  def aspirate(
76
80
  self,
77
81
  location: types.Location,
@@ -552,11 +556,34 @@ class LegacyInstrumentCore(AbstractInstrument[LegacyWellCore]):
552
556
  """This will never be called because it was added in API 2.16."""
553
557
  pass
554
558
 
559
+ def load_liquid_class(
560
+ self,
561
+ liquid_class: LiquidClass,
562
+ pipette_load_name: str,
563
+ tiprack_uri: str,
564
+ ) -> str:
565
+ """This will never be called because it was added in .."""
566
+ # TODO(spp, 2024-11-20): update the docstring and error to include API version
567
+ assert False, "load_liquid_class is not supported in legacy context"
568
+
569
+ def transfer_liquid(
570
+ self,
571
+ liquid_class_id: str,
572
+ volume: float,
573
+ source: List[LegacyWellCore],
574
+ dest: List[LegacyWellCore],
575
+ new_tip: TransferTipPolicyV2,
576
+ trash_location: Union[LegacyWellCore, types.Location, TrashBin, WasteChute],
577
+ ) -> None:
578
+ """This will never be called because it was added in .."""
579
+ # TODO(spp, 2024-11-20): update the docstring and error to include API version
580
+ assert False, "transfer_liquid is not supported in legacy context"
581
+
555
582
  def get_active_channels(self) -> int:
556
583
  """This will never be called because it was added in API 2.16."""
557
584
  assert False, "get_active_channels only supported in API 2.16 & later"
558
585
 
559
- def get_nozzle_map(self) -> NozzleMap:
586
+ def get_nozzle_map(self) -> types.NozzleMapInterface:
560
587
  """This will never be called because it was added in API 2.18."""
561
588
  assert False, "get_nozzle_map only supported in API 2.18 & later"
562
589
 
@@ -583,3 +610,10 @@ class LegacyInstrumentCore(AbstractInstrument[LegacyWellCore]):
583
610
  ) -> float:
584
611
  """This will never be called because it was added in API 2.20."""
585
612
  assert False, "liquid_probe_without_recovery only supported in API 2.20 & later"
613
+
614
+ def _pressure_supported_by_pipette(self) -> bool:
615
+ return False
616
+
617
+ def nozzle_configuration_valid_for_lld(self) -> bool:
618
+ """Check if the nozzle configuration currently supports LLD."""
619
+ return False
@@ -1,13 +1,14 @@
1
- from typing import List, Optional
1
+ from typing import List, Optional, Dict
2
2
 
3
3
  from opentrons.calibration_storage import helpers
4
4
  from opentrons.protocols.geometry.labware_geometry import LabwareGeometry
5
5
  from opentrons.protocols.api_support.tip_tracker import TipTracker
6
6
 
7
- from opentrons.types import DeckSlotName, Location, Point
8
- from opentrons.hardware_control.nozzle_manager import NozzleMap
7
+ from opentrons.types import DeckSlotName, Location, Point, NozzleMapInterface
8
+
9
9
  from opentrons_shared_data.labware.types import LabwareParameters, LabwareDefinition
10
10
 
11
+ from ..._liquid import Liquid
11
12
  from ..labware import AbstractLabware, LabwareLoadParams
12
13
  from .legacy_well_core import LegacyWellCore
13
14
  from .well_geometry import WellGeometry
@@ -162,7 +163,7 @@ class LegacyLabwareCore(AbstractLabware[LegacyWellCore]):
162
163
  self,
163
164
  num_tips: int,
164
165
  starting_tip: Optional[LegacyWellCore],
165
- nozzle_map: Optional[NozzleMap],
166
+ nozzle_map: Optional[NozzleMapInterface],
166
167
  ) -> Optional[str]:
167
168
  if nozzle_map is not None:
168
169
  raise ValueError(
@@ -220,3 +221,11 @@ class LegacyLabwareCore(AbstractLabware[LegacyWellCore]):
220
221
  """Get the deck slot the labware is in, if in a deck slot."""
221
222
  slot = self._geometry.parent.labware.first_parent()
222
223
  return DeckSlotName.from_primitive(slot) if slot is not None else None
224
+
225
+ def load_liquid(self, volumes: Dict[str, float], liquid: Liquid) -> None:
226
+ """Load liquid into wells of the labware."""
227
+ assert False, "load_liquid only supported in API version 2.22 & later"
228
+
229
+ def load_empty(self, wells: List[str]) -> None:
230
+ """Mark wells of the labware as empty."""
231
+ assert False, "load_empty only supported in API version 2.22 & later"
@@ -6,7 +6,13 @@ from opentrons_shared_data.labware.types import LabwareDefinition
6
6
  from opentrons_shared_data.pipette.types import PipetteNameType
7
7
  from opentrons_shared_data.robot.types import RobotType
8
8
 
9
- from opentrons.types import DeckSlotName, StagingSlotName, Location, Mount, Point
9
+ from opentrons.types import (
10
+ DeckSlotName,
11
+ StagingSlotName,
12
+ Location,
13
+ Mount,
14
+ Point,
15
+ )
10
16
  from opentrons.util.broker import Broker
11
17
  from opentrons.hardware_control import SyncHardwareAPI
12
18
  from opentrons.hardware_control.modules import AbstractModule, ModuleModel, ModuleType
@@ -267,6 +273,20 @@ class LegacyProtocolCore(
267
273
  """Load an adapter using its identifying parameters"""
268
274
  raise APIVersionError(api_element="Loading adapter")
269
275
 
276
+ def load_lid(
277
+ self,
278
+ load_name: str,
279
+ location: LegacyLabwareCore,
280
+ namespace: Optional[str],
281
+ version: Optional[int],
282
+ ) -> LegacyLabwareCore:
283
+ """Load an individual lid labware using its identifying parameters. Must be loaded on a labware."""
284
+ raise APIVersionError(api_element="Loading lid")
285
+
286
+ def load_robot(self) -> None: # type: ignore
287
+ """Load an adapter using its identifying parameters"""
288
+ raise APIVersionError(api_element="Loading robot")
289
+
270
290
  def move_labware(
271
291
  self,
272
292
  labware_core: LegacyLabwareCore,
@@ -474,6 +494,17 @@ class LegacyProtocolCore(
474
494
  self._last_location = location
475
495
  self._last_mount = mount
476
496
 
497
+ def load_lid_stack(
498
+ self,
499
+ load_name: str,
500
+ location: Union[DeckSlotName, StagingSlotName, LegacyLabwareCore],
501
+ quantity: int,
502
+ namespace: Optional[str],
503
+ version: Optional[int],
504
+ ) -> LegacyLabwareCore:
505
+ """Load a Stack of Lids to a given location, creating a Lid Stack."""
506
+ raise APIVersionError(api_element="Lid stack")
507
+
477
508
  def get_module_cores(self) -> List[legacy_module_core.LegacyModuleCore]:
478
509
  """Get loaded module cores."""
479
510
  return self._module_cores
@@ -1,12 +1,13 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import logging
4
- from typing import TYPE_CHECKING, Optional, Union
4
+ from typing import TYPE_CHECKING, Optional, Union, List
5
5
 
6
6
  from opentrons import types
7
7
  from opentrons.hardware_control.dev_types import PipetteDict
8
8
  from opentrons.hardware_control.types import HardwareAction
9
9
  from opentrons.protocol_api.core.common import WellCore
10
+ from opentrons.protocols.advanced_control.transfers.common import TransferTipPolicyV2
10
11
  from opentrons.protocols.api_support import instrument as instrument_support
11
12
  from opentrons.protocols.api_support.labware_like import LabwareLike
12
13
  from opentrons.protocols.api_support.types import APIVersion
@@ -24,7 +25,7 @@ from opentrons_shared_data.errors.exceptions import (
24
25
 
25
26
  from ...disposal_locations import TrashBin, WasteChute
26
27
  from opentrons.protocol_api._nozzle_layout import NozzleLayout
27
- from opentrons.hardware_control.nozzle_manager import NozzleMap
28
+ from opentrons.protocol_api._liquid import LiquidClass
28
29
 
29
30
  from ..instrument import AbstractInstrument
30
31
 
@@ -83,6 +84,9 @@ class LegacyInstrumentCoreSimulator(AbstractInstrument[LegacyWellCore]):
83
84
  def set_default_speed(self, speed: float) -> None:
84
85
  self._default_speed = speed
85
86
 
87
+ def air_gap_in_place(self, volume: float, flow_rate: float) -> None:
88
+ assert False, "Air gap tracking only available in API version 2.22 and later"
89
+
86
90
  def aspirate(
87
91
  self,
88
92
  location: types.Location,
@@ -470,11 +474,34 @@ class LegacyInstrumentCoreSimulator(AbstractInstrument[LegacyWellCore]):
470
474
  """This will never be called because it was added in API 2.15."""
471
475
  pass
472
476
 
477
+ def load_liquid_class(
478
+ self,
479
+ liquid_class: LiquidClass,
480
+ pipette_load_name: str,
481
+ tiprack_uri: str,
482
+ ) -> str:
483
+ """This will never be called because it was added in .."""
484
+ # TODO(spp, 2024-11-20): update the docstring and error to include API version
485
+ assert False, "load_liquid_class is not supported in legacy context"
486
+
487
+ def transfer_liquid(
488
+ self,
489
+ liquid_class_id: str,
490
+ volume: float,
491
+ source: List[LegacyWellCore],
492
+ dest: List[LegacyWellCore],
493
+ new_tip: TransferTipPolicyV2,
494
+ trash_location: Union[LegacyWellCore, types.Location, TrashBin, WasteChute],
495
+ ) -> None:
496
+ """Transfer a liquid from source to dest according to liquid class properties."""
497
+ # TODO(spp, 2024-11-20): update the docstring and error to include API version
498
+ assert False, "transfer_liquid is not supported in legacy context"
499
+
473
500
  def get_active_channels(self) -> int:
474
501
  """This will never be called because it was added in API 2.16."""
475
502
  assert False, "get_active_channels only supported in API 2.16 & later"
476
503
 
477
- def get_nozzle_map(self) -> NozzleMap:
504
+ def get_nozzle_map(self) -> types.NozzleMapInterface:
478
505
  """This will never be called because it was added in API 2.18."""
479
506
  assert False, "get_nozzle_map only supported in API 2.18 & later"
480
507
 
@@ -501,3 +528,10 @@ class LegacyInstrumentCoreSimulator(AbstractInstrument[LegacyWellCore]):
501
528
  ) -> float:
502
529
  """This will never be called because it was added in API 2.20."""
503
530
  assert False, "liquid_probe_without_recovery only supported in API 2.20 & later"
531
+
532
+ def _pressure_supported_by_pipette(self) -> bool:
533
+ return False
534
+
535
+ def nozzle_configuration_valid_for_lld(self) -> bool:
536
+ """Check if the nozzle configuration currently supports LLD."""
537
+ return False
@@ -10,7 +10,13 @@ from opentrons_shared_data.pipette.types import PipetteNameType
10
10
  from opentrons_shared_data.labware.types import LabwareDefinition
11
11
  from opentrons_shared_data.robot.types import RobotType
12
12
 
13
- from opentrons.types import DeckSlotName, StagingSlotName, Location, Mount, Point
13
+ from opentrons.types import (
14
+ DeckSlotName,
15
+ StagingSlotName,
16
+ Location,
17
+ Mount,
18
+ Point,
19
+ )
14
20
  from opentrons.hardware_control import SyncHardwareAPI
15
21
  from opentrons.hardware_control.modules.types import ModuleModel
16
22
  from opentrons.protocols.api_support.util import AxisMaxSpeeds
@@ -19,6 +25,7 @@ from .instrument import InstrumentCoreType
19
25
  from .labware import LabwareCoreType, LabwareLoadParams
20
26
  from .module import ModuleCoreType
21
27
  from .._liquid import Liquid, LiquidClass
28
+ from .robot import AbstractRobot
22
29
  from .._types import OffDeckType
23
30
  from ..disposal_locations import TrashBin, WasteChute
24
31
 
@@ -93,6 +100,17 @@ class AbstractProtocol(
93
100
  """Load an adapter using its identifying parameters"""
94
101
  ...
95
102
 
103
+ @abstractmethod
104
+ def load_lid(
105
+ self,
106
+ load_name: str,
107
+ location: LabwareCoreType,
108
+ namespace: Optional[str],
109
+ version: Optional[int],
110
+ ) -> LabwareCoreType:
111
+ """Load an individual lid labware using its identifying parameters. Must be loaded on a labware."""
112
+ ...
113
+
96
114
  @abstractmethod
97
115
  def move_labware(
98
116
  self,
@@ -190,6 +208,17 @@ class AbstractProtocol(
190
208
  ) -> None:
191
209
  ...
192
210
 
211
+ @abstractmethod
212
+ def load_lid_stack(
213
+ self,
214
+ load_name: str,
215
+ location: Union[DeckSlotName, StagingSlotName, LabwareCoreType],
216
+ quantity: int,
217
+ namespace: Optional[str],
218
+ version: Optional[int],
219
+ ) -> LabwareCoreType:
220
+ ...
221
+
193
222
  @abstractmethod
194
223
  def get_deck_definition(self) -> DeckDefinitionV5:
195
224
  """Get the geometry definition of the robot's deck."""
@@ -257,3 +286,7 @@ class AbstractProtocol(
257
286
  self, labware_core: LabwareCoreType
258
287
  ) -> Union[str, LabwareCoreType, ModuleCoreType, OffDeckType]:
259
288
  """Get labware parent location."""
289
+
290
+ @abstractmethod
291
+ def load_robot(self) -> AbstractRobot:
292
+ """Load a Robot Core context into a protocol"""
@@ -0,0 +1,51 @@
1
+ from abc import abstractmethod, ABC
2
+ from typing import Optional, Union
3
+
4
+ from opentrons.types import AxisMapType, Mount, Point
5
+ from opentrons_shared_data.pipette.types import PipetteNameType
6
+ from opentrons.protocol_api._types import PlungerPositionTypes, PipetteActionTypes
7
+
8
+
9
+ class AbstractRobot(ABC):
10
+ @abstractmethod
11
+ def get_pipette_type_from_engine(
12
+ self, mount: Union[Mount, str]
13
+ ) -> Optional[PipetteNameType]:
14
+ ...
15
+
16
+ @abstractmethod
17
+ def get_plunger_position_from_volume(
18
+ self, mount: Mount, volume: float, action: PipetteActionTypes, robot_type: str
19
+ ) -> float:
20
+ ...
21
+
22
+ @abstractmethod
23
+ def get_plunger_position_from_name(
24
+ self, mount: Mount, position_name: PlungerPositionTypes
25
+ ) -> float:
26
+ ...
27
+
28
+ @abstractmethod
29
+ def move_to(self, mount: Mount, destination: Point, speed: Optional[float]) -> None:
30
+ ...
31
+
32
+ @abstractmethod
33
+ def move_axes_to(
34
+ self,
35
+ axis_map: AxisMapType,
36
+ critical_point: Optional[AxisMapType],
37
+ speed: Optional[float],
38
+ ) -> None:
39
+ ...
40
+
41
+ @abstractmethod
42
+ def move_axes_relative(self, axis_map: AxisMapType, speed: Optional[float]) -> None:
43
+ ...
44
+
45
+ @abstractmethod
46
+ def release_grip(self) -> None:
47
+ ...
48
+
49
+ @abstractmethod
50
+ def close_gripper(self, force: Optional[float] = None) -> None:
51
+ ...