opentrons 8.7.0a7__py3-none-any.whl → 8.8.0a7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (109) hide show
  1. opentrons/_version.py +2 -2
  2. opentrons/cli/analyze.py +4 -1
  3. opentrons/config/__init__.py +7 -0
  4. opentrons/drivers/asyncio/communication/serial_connection.py +8 -5
  5. opentrons/drivers/flex_stacker/driver.py +6 -1
  6. opentrons/drivers/vacuum_module/__init__.py +5 -0
  7. opentrons/drivers/vacuum_module/abstract.py +93 -0
  8. opentrons/drivers/vacuum_module/driver.py +208 -0
  9. opentrons/drivers/vacuum_module/errors.py +39 -0
  10. opentrons/drivers/vacuum_module/simulator.py +85 -0
  11. opentrons/drivers/vacuum_module/types.py +79 -0
  12. opentrons/execute.py +3 -0
  13. opentrons/hardware_control/backends/flex_protocol.py +2 -0
  14. opentrons/hardware_control/backends/ot3controller.py +35 -2
  15. opentrons/hardware_control/backends/ot3simulator.py +2 -0
  16. opentrons/hardware_control/backends/ot3utils.py +37 -0
  17. opentrons/hardware_control/module_control.py +23 -2
  18. opentrons/hardware_control/modules/mod_abc.py +1 -1
  19. opentrons/hardware_control/modules/types.py +1 -1
  20. opentrons/hardware_control/motion_utilities.py +6 -6
  21. opentrons/hardware_control/ot3api.py +62 -13
  22. opentrons/hardware_control/protocols/gripper_controller.py +1 -0
  23. opentrons/hardware_control/protocols/liquid_handler.py +6 -2
  24. opentrons/hardware_control/types.py +12 -0
  25. opentrons/legacy_commands/commands.py +58 -5
  26. opentrons/legacy_commands/module_commands.py +29 -0
  27. opentrons/legacy_commands/protocol_commands.py +33 -1
  28. opentrons/legacy_commands/types.py +75 -1
  29. opentrons/protocol_api/_transfer_liquid_validation.py +17 -2
  30. opentrons/protocol_api/_types.py +2 -0
  31. opentrons/protocol_api/core/engine/_default_labware_versions.py +1 -0
  32. opentrons/protocol_api/core/engine/deck_conflict.py +3 -1
  33. opentrons/protocol_api/core/engine/instrument.py +109 -26
  34. opentrons/protocol_api/core/engine/module_core.py +27 -3
  35. opentrons/protocol_api/core/engine/protocol.py +33 -1
  36. opentrons/protocol_api/core/engine/stringify.py +2 -0
  37. opentrons/protocol_api/core/instrument.py +19 -2
  38. opentrons/protocol_api/core/legacy/legacy_instrument_core.py +19 -2
  39. opentrons/protocol_api/core/legacy/legacy_module_core.py +15 -4
  40. opentrons/protocol_api/core/legacy/legacy_protocol_core.py +12 -0
  41. opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py +19 -2
  42. opentrons/protocol_api/core/module.py +25 -2
  43. opentrons/protocol_api/core/protocol.py +12 -0
  44. opentrons/protocol_api/instrument_context.py +388 -2
  45. opentrons/protocol_api/labware.py +5 -2
  46. opentrons/protocol_api/module_contexts.py +133 -30
  47. opentrons/protocol_api/protocol_context.py +61 -17
  48. opentrons/protocol_api/robot_context.py +3 -4
  49. opentrons/protocol_api/validation.py +43 -2
  50. opentrons/protocol_engine/__init__.py +4 -0
  51. opentrons/protocol_engine/actions/__init__.py +2 -0
  52. opentrons/protocol_engine/actions/actions.py +9 -0
  53. opentrons/protocol_engine/commands/__init__.py +14 -0
  54. opentrons/protocol_engine/commands/absorbance_reader/read.py +22 -23
  55. opentrons/protocol_engine/commands/aspirate_while_tracking.py +52 -19
  56. opentrons/protocol_engine/commands/capture_image.py +302 -0
  57. opentrons/protocol_engine/commands/command.py +1 -0
  58. opentrons/protocol_engine/commands/command_unions.py +13 -0
  59. opentrons/protocol_engine/commands/dispense_while_tracking.py +56 -19
  60. opentrons/protocol_engine/commands/flex_stacker/common.py +35 -0
  61. opentrons/protocol_engine/commands/flex_stacker/set_stored_labware.py +7 -0
  62. opentrons/protocol_engine/commands/heater_shaker/set_shake_speed.py +1 -1
  63. opentrons/protocol_engine/commands/heater_shaker/set_target_temperature.py +1 -1
  64. opentrons/protocol_engine/commands/move_labware.py +3 -4
  65. opentrons/protocol_engine/commands/move_to_addressable_area_for_drop_tip.py +1 -1
  66. opentrons/protocol_engine/commands/movement_common.py +29 -2
  67. opentrons/protocol_engine/commands/pipetting_common.py +48 -3
  68. opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py +12 -9
  69. opentrons/protocol_engine/commands/thermocycler/set_target_lid_temperature.py +17 -12
  70. opentrons/protocol_engine/commands/thermocycler/start_run_extended_profile.py +1 -1
  71. opentrons/protocol_engine/create_protocol_engine.py +12 -0
  72. opentrons/protocol_engine/engine_support.py +3 -0
  73. opentrons/protocol_engine/errors/__init__.py +8 -0
  74. opentrons/protocol_engine/errors/exceptions.py +64 -0
  75. opentrons/protocol_engine/execution/__init__.py +2 -0
  76. opentrons/protocol_engine/execution/command_executor.py +54 -1
  77. opentrons/protocol_engine/execution/create_queue_worker.py +4 -1
  78. opentrons/protocol_engine/execution/labware_movement.py +13 -4
  79. opentrons/protocol_engine/execution/pipetting.py +19 -25
  80. opentrons/protocol_engine/protocol_engine.py +62 -2
  81. opentrons/protocol_engine/resources/__init__.py +2 -0
  82. opentrons/protocol_engine/resources/camera_provider.py +110 -0
  83. opentrons/protocol_engine/resources/file_provider.py +133 -58
  84. opentrons/protocol_engine/slot_standardization.py +2 -0
  85. opentrons/protocol_engine/state/camera.py +54 -0
  86. opentrons/protocol_engine/state/commands.py +24 -4
  87. opentrons/protocol_engine/state/geometry.py +68 -10
  88. opentrons/protocol_engine/state/labware.py +10 -6
  89. opentrons/protocol_engine/state/labware_origin_math/stackup_origin_to_labware_origin.py +6 -1
  90. opentrons/protocol_engine/state/modules.py +9 -0
  91. opentrons/protocol_engine/state/preconditions.py +59 -0
  92. opentrons/protocol_engine/state/state.py +30 -0
  93. opentrons/protocol_engine/state/state_summary.py +2 -0
  94. opentrons/protocol_engine/state/update_types.py +10 -0
  95. opentrons/protocol_engine/types/__init__.py +14 -1
  96. opentrons/protocol_engine/types/command_preconditions.py +18 -0
  97. opentrons/protocol_engine/types/location.py +26 -2
  98. opentrons/protocol_engine/types/module.py +1 -1
  99. opentrons/protocol_runner/protocol_runner.py +14 -1
  100. opentrons/protocol_runner/run_orchestrator.py +31 -0
  101. opentrons/protocols/advanced_control/transfers/transfer_liquid_utils.py +2 -2
  102. opentrons/simulate.py +3 -0
  103. opentrons/system/camera.py +333 -3
  104. opentrons/system/ffmpeg.py +110 -0
  105. {opentrons-8.7.0a7.dist-info → opentrons-8.8.0a7.dist-info}/METADATA +4 -4
  106. {opentrons-8.7.0a7.dist-info → opentrons-8.8.0a7.dist-info}/RECORD +109 -97
  107. {opentrons-8.7.0a7.dist-info → opentrons-8.8.0a7.dist-info}/WHEEL +0 -0
  108. {opentrons-8.7.0a7.dist-info → opentrons-8.8.0a7.dist-info}/entry_points.txt +0 -0
  109. {opentrons-8.7.0a7.dist-info → opentrons-8.8.0a7.dist-info}/licenses/LICENSE +0 -0
@@ -106,7 +106,10 @@ class LegacyInstrumentCoreSimulator(
106
106
  flow_rate: float,
107
107
  in_place: bool,
108
108
  meniscus_tracking: Optional[types.MeniscusTrackingTarget] = None,
109
+ end_location: Optional[types.Location] = None,
110
+ end_meniscus_tracking: Optional[types.MeniscusTrackingTarget] = None,
109
111
  correction_volume: Optional[float] = None,
112
+ movement_delay: Optional[float] = None,
110
113
  ) -> None:
111
114
  if self.get_current_volume() == 0:
112
115
  # Make sure we're at the top of the labware and clear of any
@@ -149,7 +152,10 @@ class LegacyInstrumentCoreSimulator(
149
152
  in_place: bool,
150
153
  push_out: Optional[float],
151
154
  meniscus_tracking: Optional[types.MeniscusTrackingTarget] = None,
155
+ end_location: Optional[types.Location] = None,
156
+ end_meniscus_tracking: Optional[types.MeniscusTrackingTarget] = None,
152
157
  correction_volume: Optional[float] = None,
158
+ movement_delay: Optional[float] = None,
153
159
  ) -> None:
154
160
  if isinstance(location, (TrashBin, WasteChute)):
155
161
  raise APIVersionError(
@@ -536,6 +542,7 @@ class LegacyInstrumentCoreSimulator(
536
542
  trash_location: Union[types.Location, TrashBin, WasteChute],
537
543
  return_tip: bool,
538
544
  keep_last_tip: bool,
545
+ tips: Optional[List[LegacyWellCore]],
539
546
  ) -> None:
540
547
  """This will never be called because it was added in API 2.23."""
541
548
  assert False, "transfer_liquid is not supported in legacy context"
@@ -546,12 +553,17 @@ class LegacyInstrumentCoreSimulator(
546
553
  volume: float,
547
554
  source: Tuple[types.Location, LegacyWellCore],
548
555
  dest: List[Tuple[types.Location, LegacyWellCore]],
549
- new_tip: Literal[TransferTipPolicyV2.NEVER, TransferTipPolicyV2.ONCE],
556
+ new_tip: Literal[
557
+ TransferTipPolicyV2.NEVER,
558
+ TransferTipPolicyV2.ONCE,
559
+ TransferTipPolicyV2.ALWAYS,
560
+ ],
550
561
  tip_racks: List[Tuple[types.Location, LegacyLabwareCore]],
551
562
  starting_tip: Optional[LegacyWellCore],
552
563
  trash_location: Union[types.Location, TrashBin, WasteChute],
553
564
  return_tip: bool,
554
565
  keep_last_tip: bool,
566
+ tips: Optional[List[LegacyWellCore]],
555
567
  ) -> None:
556
568
  """This will never be called because it was added in API 2.23."""
557
569
  assert False, "distribute_liquid is not supported in legacy context"
@@ -562,12 +574,17 @@ class LegacyInstrumentCoreSimulator(
562
574
  volume: float,
563
575
  source: List[Tuple[types.Location, LegacyWellCore]],
564
576
  dest: Union[Tuple[types.Location, LegacyWellCore], TrashBin, WasteChute],
565
- new_tip: Literal[TransferTipPolicyV2.NEVER, TransferTipPolicyV2.ONCE],
577
+ new_tip: Literal[
578
+ TransferTipPolicyV2.NEVER,
579
+ TransferTipPolicyV2.ONCE,
580
+ TransferTipPolicyV2.ALWAYS,
581
+ ],
566
582
  tip_racks: List[Tuple[types.Location, LegacyLabwareCore]],
567
583
  starting_tip: Optional[LegacyWellCore],
568
584
  trash_location: Union[types.Location, TrashBin, WasteChute],
569
585
  return_tip: bool,
570
586
  keep_last_tip: bool,
587
+ tips: Optional[List[LegacyWellCore]],
571
588
  ) -> None:
572
589
  """This will never be called because it was added in API 2.23."""
573
590
  assert False, "consolidate_liquid is not supported in legacy context"
@@ -165,7 +165,7 @@ class AbstractThermocyclerCore(
165
165
  ramp_rate: Optional[float],
166
166
  hold_time_seconds: Optional[float] = None,
167
167
  block_max_volume: Optional[float] = None,
168
- ) -> AbstractTaskCore:
168
+ ) -> None:
169
169
  """Set the target temperature for the well block, in °C.
170
170
 
171
171
  Note:
@@ -180,14 +180,37 @@ class AbstractThermocyclerCore(
180
180
  will default to 25µL/well.
181
181
  """
182
182
 
183
+ @abstractmethod
184
+ def start_set_target_block_temperature(
185
+ self,
186
+ celsius: float,
187
+ ramp_rate: Optional[float],
188
+ block_max_volume: Optional[float] = None,
189
+ ) -> AbstractTaskCore:
190
+ """Start setting the target temperature for the well block, in °C.
191
+
192
+ Note:
193
+ If ``hold_time_seconds`` is not specified, the Thermocycler
194
+ will proceed to the next command after ``temperature`` is reached.
195
+ Args:
196
+ celsius: The target temperature, in °C.
197
+ block_max_volume: The maximum volume of any individual well
198
+ of the loaded labware. If not supplied, the thermocycler
199
+ will default to 25µL/well.
200
+ """
201
+
183
202
  @abstractmethod
184
203
  def wait_for_block_temperature(self) -> None:
185
204
  """Wait for target block temperature to be reached."""
186
205
 
187
206
  @abstractmethod
188
- def set_target_lid_temperature(self, celsius: float) -> AbstractTaskCore:
207
+ def set_target_lid_temperature(self, celsius: float) -> None:
189
208
  """Set the target temperature for the heated lid, in °C."""
190
209
 
210
+ @abstractmethod
211
+ def start_set_target_lid_temperature(self, celsius: float) -> AbstractTaskCore:
212
+ """Start setting the target temperature for the heated lid, in °C."""
213
+
191
214
  @abstractmethod
192
215
  def wait_for_lid_temperature(self) -> None:
193
216
  """Wait for target lid temperature to be reached."""
@@ -315,6 +315,18 @@ class AbstractProtocol(
315
315
  ) -> Union[str, LabwareCoreType, ModuleCoreType, OffDeckType]:
316
316
  """Get labware parent location."""
317
317
 
318
+ @abstractmethod
319
+ def capture_image(
320
+ self,
321
+ filename: Optional[str] = None,
322
+ resolution: Optional[Tuple[int, int]] = None,
323
+ zoom: Optional[float] = None,
324
+ contrast: Optional[float] = None,
325
+ brightness: Optional[float] = None,
326
+ saturation: Optional[float] = None,
327
+ ) -> None:
328
+ "Capture an image using a camera."
329
+
318
330
  @abstractmethod
319
331
  def load_robot(self) -> AbstractRobot:
320
332
  """Load a Robot Core context into a protocol"""