opentrons 8.5.0a9__py2.py3-none-any.whl → 8.5.0a10__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.

@@ -30,6 +30,9 @@ from opentrons.protocols.advanced_control.transfers.common import (
30
30
  NoLiquidClassPropertyError,
31
31
  )
32
32
  from opentrons.protocols.advanced_control.transfers import common as tx_commons
33
+ from opentrons.protocols.advanced_control.transfers.transfer_liquid_utils import (
34
+ check_current_volume_before_dispensing,
35
+ )
33
36
  from opentrons.protocol_engine import commands as cmd
34
37
  from opentrons.protocol_engine import (
35
38
  DeckPoint,
@@ -2143,9 +2146,12 @@ class InstrumentCore(AbstractInstrument[WellCore, LabwareCore]):
2143
2146
  """Remove an air gap that was previously added during a transfer."""
2144
2147
  if last_air_gap == 0:
2145
2148
  return
2146
-
2149
+ current_vol = self.get_current_volume()
2150
+ check_current_volume_before_dispensing(
2151
+ current_volume=current_vol, dispense_volume=last_air_gap
2152
+ )
2147
2153
  correction_volume = dispense_props.correction_by_volume.get_for_volume(
2148
- self.get_current_volume() - last_air_gap
2154
+ current_vol - last_air_gap
2149
2155
  )
2150
2156
  # The minimum flow rate should be air_gap_volume per second
2151
2157
  flow_rate = max(
@@ -25,6 +25,7 @@ from opentrons.protocol_engine.errors import TouchTipDisabledError
25
25
  from opentrons.types import Location, Point, Mount
26
26
  from opentrons.protocols.advanced_control.transfers.transfer_liquid_utils import (
27
27
  LocationCheckDescriptors,
28
+ check_current_volume_before_dispensing,
28
29
  )
29
30
  from opentrons.protocols.advanced_control.transfers import (
30
31
  transfer_liquid_utils as tx_utils,
@@ -253,8 +254,12 @@ class TransferComponentsExecutor:
253
254
  push_out_override: Optional[float],
254
255
  ) -> None:
255
256
  """Dispense according to dispense properties and wait if enabled."""
257
+ current_vol = self._instrument.get_current_volume()
258
+ check_current_volume_before_dispensing(
259
+ current_volume=current_vol, dispense_volume=volume
260
+ )
256
261
  correction_volume = dispense_properties.correction_by_volume.get_for_volume(
257
- self._instrument.get_current_volume() - volume
262
+ current_vol - volume
258
263
  )
259
264
  self._instrument.dispense(
260
265
  location=self._target_location,
@@ -840,10 +840,9 @@ class InstrumentContext(publisher.CommandPublisher):
840
840
  :type speed: float
841
841
  :param mm_from_edge: How far to move inside the well, as a distance from the
842
842
  well's edge.
843
- When ``mm_from_edge=0``, the pipette tip will move all the
844
- way to the edge of the target well. When ``mm_from_edge=1``,
845
- the pipette tip will move to 1 mm from the well's edge.
846
- Lower values will press the tip harder into the well's
843
+ When ``mm_from_edge=0``, the pipette will move to the target well's edge to touch the tip. When ``mm_from_edge=1``,
844
+ the pipette will move to 1 mm from the target well's edge to touch the tip.
845
+ Values lower than 0 will press the tip harder into the target well's
847
846
  walls; higher values will touch the well more lightly, or
848
847
  not at all.
849
848
  ``mm_from_edge`` and ``radius`` are mutually exclusive: to
@@ -1829,6 +1828,7 @@ class InstrumentContext(publisher.CommandPublisher):
1829
1828
 
1830
1829
  :param trash_location: A trash container, well, or other location to dispose of
1831
1830
  tips. Depending on the liquid class, the pipette may also blow out liquid here.
1831
+ If not specified, the pipette will dispose of tips in its :py:obj:`~.InstrumentContext.trash_container`.
1832
1832
  :param return_tip: Whether to drop used tips in their original locations
1833
1833
  in the tip rack, instead of the trash.
1834
1834
  :param group_wells: For multi-channel transfers only. If set to ``True``, group together contiguous wells
@@ -1838,7 +1838,6 @@ class InstrumentContext(publisher.CommandPublisher):
1838
1838
  ``False``, the last tip will be dropped or returned. If not set, behavior depends on the value of
1839
1839
  ``new_tip``. ``new_tip="never"`` keeps the tip, and all other values of ``new_tip`` drop or return the tip.
1840
1840
 
1841
- :meta private:
1842
1841
  """
1843
1842
  if volume == 0.0:
1844
1843
  _log.info(
@@ -1962,13 +1961,14 @@ class InstrumentContext(publisher.CommandPublisher):
1962
1961
  Defaults to ``"once"``.
1963
1962
 
1964
1963
  - ``"once"``: Use one tip for the entire command.
1964
+ - ``"always"``: Use a new tip before each aspirate.
1965
1965
  - ``"never"``: Do not pick up or drop tips at all.
1966
- - ``"always"``: Pick up a new tip before every aspirate.
1967
1966
 
1968
1967
  See :ref:`param-tip-handling` for details.
1969
1968
 
1970
1969
  :param trash_location: A trash container, well, or other location to dispose of
1971
1970
  tips. Depending on the liquid class, the pipette may also blow out liquid here.
1971
+ If not specified, the pipette will dispose of tips in its :py:obj:`~.InstrumentContext.trash_container`.
1972
1972
  :param return_tip: Whether to drop used tips in their original locations
1973
1973
  in the tip rack, instead of the trash.
1974
1974
  :param group_wells: For multi-channel transfers only. If set to ``True``, group together contiguous wells
@@ -1978,7 +1978,6 @@ class InstrumentContext(publisher.CommandPublisher):
1978
1978
  ``False``, the last tip will be dropped or returned. If not set, behavior depends on the value of
1979
1979
  ``new_tip``. ``new_tip="never"`` keeps the tip, and all other values of ``new_tip`` drop or return the tip.
1980
1980
 
1981
- :meta private:
1982
1981
  """
1983
1982
  if volume == 0.0:
1984
1983
  _log.info(
@@ -2111,13 +2110,14 @@ class InstrumentContext(publisher.CommandPublisher):
2111
2110
  Defaults to ``"once"``.
2112
2111
 
2113
2112
  - ``"once"``: Use one tip for the entire command.
2113
+ - ``"always"``: Use a new tip after each aspirate and dispense, even when visiting the same source again.
2114
2114
  - ``"never"``: Do not pick up or drop tips at all.
2115
- - ``"always"``: Pick up a new tip before going back to source for refilling after a dispense.
2116
2115
 
2117
2116
  See :ref:`param-tip-handling` for details.
2118
2117
 
2119
2118
  :param trash_location: A trash container, well, or other location to dispose of
2120
2119
  tips. Depending on the liquid class, the pipette may also blow out liquid here.
2120
+ If not specified, the pipette will dispose of tips in its :py:obj:`~.InstrumentContext.trash_container`.
2121
2121
  :param return_tip: Whether to drop used tips in their original locations
2122
2122
  in the tip rack, instead of the trash.
2123
2123
  :param group_wells: For multi-channel transfers only. If set to ``True``, group together contiguous wells
@@ -2127,7 +2127,6 @@ class InstrumentContext(publisher.CommandPublisher):
2127
2127
  ``False``, the last tip will be dropped or returned. If not set, behavior depends on the value of
2128
2128
  ``new_tip``. ``new_tip="never"`` keeps the tip, and all other values of ``new_tip`` drop or return the tip.
2129
2129
 
2130
- :meta private:
2131
2130
  """
2132
2131
  if volume == 0.0:
2133
2132
  _log.info(
@@ -1377,10 +1377,13 @@ class ProtocolContext(CommandPublisher):
1377
1377
  name: str,
1378
1378
  ) -> LiquidClass:
1379
1379
  """
1380
- Get an instance of a built-in liquid class for use in the protocol.
1380
+ Get an instance of an Opentrons-verified liquid class for use in a Flex protocol.
1381
1381
 
1382
- Args:
1383
- name: Name of an Opentrons-defined liquid class.
1382
+ :param name: Name of an Opentrons-verified liquid class. Must be one of:
1383
+
1384
+ - ``"water"``: an Opentrons-verified liquid class based on deionized water.
1385
+ - ``"glycerol_50"``: an Opentrons-verified liquid class for viscous liquid. Based on 50% glycerol.
1386
+ - ``"ethanol_80"``: an Opentrons-verified liquid class for volatile liquid. Based on 80% ethanol.
1384
1387
 
1385
1388
  :raises: ``LiquidClassDefinitionDoesNotExist``: if the specified liquid class does not exist.
1386
1389
  """
@@ -1394,28 +1397,14 @@ class ProtocolContext(CommandPublisher):
1394
1397
  base_liquid_class: Optional[LiquidClass] = None,
1395
1398
  display_name: Optional[str] = None,
1396
1399
  ) -> LiquidClass:
1397
- """Define a custom liquid class, either a completely new one or based on an existing one.
1398
-
1399
- Args:
1400
- name: The name to give to the new liquid class. Cannot use names of existing in-built liquid classes.
1401
- properties: A dict of transfer properties per tip per pipette.
1402
- Accepts a nested dictionary in the following format:
1403
-
1404
- .. code-block:: python
1400
+ """Define a custom liquid class, either based on an existing, Opentrons-verified liquid class, or to create a completely new one.
1405
1401
 
1406
- {
1407
- <pipette_name>: {
1408
- <tiprack_uri>: <properties in the shape of TransferPropertiesDict>
1402
+ :param name: The name to give to the new liquid class. Cannot use the name of an Opentrons-verified liquid class.
1403
+ :param properties: A dict of transfer properties for the Flex pipette and tips to use for liquid class transfers. The nested dictionary must have top-level keys corresponding to pipette load names and second-level keys corresponding to compatible tip rack load names. Further nested key–value pairs should be in the format returned by :py:meth:`.LiquidClass.get_for`. See also the `liquid class JSON schema <https://github.com/Opentrons/opentrons/tree/edge/shared-data/liquid-class/schemas>`_.
1409
1404
 
1410
- # TransferPropertiesDict is a dictionary representation of the
1411
- # transfer properties returned by the `LiquidClass.get_for(..)` function.
1412
- }}
1405
+ :param base_liquid_class: An Opentrons-verified liquid class to base the newly defined liquid class on. The specified ``transfer_properties`` will override any existing properties for the Flex pipette and tips. All other properties will remain the same as those in the base class.
1413
1406
 
1414
- base_liquid_class: A LiquidClass to base this liquid class on. The properties
1415
- specified in transfer_properties will override any existing ones
1416
- for the specified pipettes & tips.
1417
- display_name: An optional human-readable name for the liquid. If not provided,
1418
- will default to title-cased name.
1407
+ :param display_name: An optional name for the liquid class. Defaults to the title-case ``name`` if a display name isn't provided.
1419
1408
 
1420
1409
  """
1421
1410
  if definition_exists(name, DEFAULT_LC_VERSION):
@@ -212,3 +212,20 @@ def _group_wells_for_nozzle_configuration( # noqa: C901
212
212
  grouped_wells.reverse()
213
213
 
214
214
  return grouped_wells
215
+
216
+
217
+ def check_current_volume_before_dispensing(
218
+ current_volume: float,
219
+ dispense_volume: float,
220
+ ) -> None:
221
+ """Check if the current volume is valid for dispensing the dispense volume."""
222
+ if current_volume < dispense_volume:
223
+ # Although this should never happen, we can get into an unexpected state
224
+ # following error recovery and not have the expected amount of liquid in the tip.
225
+ # If this happens, we want to raise a useful error so the user can understand
226
+ # the cause of the problem. If we don't make this check for current volume,
227
+ # an unhelpful error might get raised when a '..byVolume' property encounters
228
+ # a negative volume (current_volume - dispense_volume).
229
+ raise RuntimeError(
230
+ f"Cannot dispense {dispense_volume}uL when the tip has only {current_volume}uL."
231
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: opentrons
3
- Version: 8.5.0a9
3
+ Version: 8.5.0a10
4
4
  Summary: The Opentrons API is a simple framework designed to make writing automated biology lab protocols easy.
5
5
  Author: Opentrons
6
6
  Author-email: engineering@opentrons.com
@@ -21,7 +21,7 @@ Classifier: Programming Language :: Python :: 3.10
21
21
  Classifier: Topic :: Scientific/Engineering
22
22
  Requires-Python: >=3.10
23
23
  License-File: ../LICENSE
24
- Requires-Dist: opentrons-shared-data (==8.5.0a9)
24
+ Requires-Dist: opentrons-shared-data (==8.5.0a10)
25
25
  Requires-Dist: aionotify (==0.3.1)
26
26
  Requires-Dist: anyio (<4.0.0,>=3.6.1)
27
27
  Requires-Dist: jsonschema (<4.18.0,>=3.0.1)
@@ -35,9 +35,9 @@ Requires-Dist: pyusb (==1.2.1)
35
35
  Requires-Dist: packaging (>=21.0)
36
36
  Requires-Dist: importlib-metadata (>=1.0) ; python_version < "3.8"
37
37
  Provides-Extra: flex-hardware
38
- Requires-Dist: opentrons-hardware[flex] (==8.5.0a9) ; extra == 'flex-hardware'
38
+ Requires-Dist: opentrons-hardware[flex] (==8.5.0a10) ; extra == 'flex-hardware'
39
39
  Provides-Extra: ot2-hardware
40
- Requires-Dist: opentrons-hardware (==8.5.0a9) ; extra == 'ot2-hardware'
40
+ Requires-Dist: opentrons-hardware (==8.5.0a10) ; extra == 'ot2-hardware'
41
41
 
42
42
  .. _Full API Documentation: http://docs.opentrons.com
43
43
 
@@ -229,11 +229,11 @@ opentrons/protocol_api/config.py,sha256=r9lyvXjagTX_g3q5FGURPpcz2IA9sSF7Oa_1mKx-
229
229
  opentrons/protocol_api/create_protocol_context.py,sha256=wwsZje0L__oDnu1Yrihau320_f-ASloR9eL1QCtkOh8,7612
230
230
  opentrons/protocol_api/deck.py,sha256=94vFceg1SC1bAGd7TvC1ZpYwnJR-VlzurEZ6jkacYeg,8910
231
231
  opentrons/protocol_api/disposal_locations.py,sha256=NRiSGmDR0LnbyEkWSOM-o64uR2fUoB1NWJG7Y7SsJSs,7920
232
- opentrons/protocol_api/instrument_context.py,sha256=B0-bI1UYtmk0tzikmtBamW-VBkx4iiktFrOgNtN5mOY,138964
232
+ opentrons/protocol_api/instrument_context.py,sha256=mtflJtJfzHbnU3dFkQp8a2D4dqE1VRzy8JkqbDVpAJc,139254
233
233
  opentrons/protocol_api/labware.py,sha256=AhL1JX10Xt-mpB85CAnEOBvz9r5v3xncJuLMkiY1FPM,60934
234
234
  opentrons/protocol_api/module_contexts.py,sha256=Mzut2a92Gcv23wFPdNVU9fj2P--7WDqBx27xAJ7z8eo,48361
235
235
  opentrons/protocol_api/module_validation_and_errors.py,sha256=XL_m72P8rcvGO2fynY7UzXLcpGuI6X4s0V6Xf735Iyc,1464
236
- opentrons/protocol_api/protocol_context.py,sha256=9vIQmpCBJcfFH4TgAGzxMwqhw09JrN9nA0yZ1b90H8w,69672
236
+ opentrons/protocol_api/protocol_context.py,sha256=PkedIdTuE8EBd4I7E6q1HjfXQWwmO_j3Q8dmNwLVJ90,70060
237
237
  opentrons/protocol_api/robot_context.py,sha256=D6ZdpFX30VTtVUDHitsVjabJQXD5TxOV9_Z6sik1LvE,11891
238
238
  opentrons/protocol_api/validation.py,sha256=73QwpdK5337yu9g8jvpHHizOD0Mf3m6Wr9S8eikrHIc,28993
239
239
  opentrons/protocol_api/core/__init__.py,sha256=-g74o8OtBB0LmmOvwkRvPgrHt7fF7T8FRHDj-x_-Onk,736
@@ -249,7 +249,7 @@ opentrons/protocol_api/core/well_grid.py,sha256=BU28DKaBgEU_JdZ6pEzrwNxmuh6TkO4z
249
249
  opentrons/protocol_api/core/engine/__init__.py,sha256=B_5T7zgkWDb1mXPg4NbT-wBkQaK-WVokMMnJRNu7xiM,582
250
250
  opentrons/protocol_api/core/engine/deck_conflict.py,sha256=q3JViIAHDthIqq6ce7h2gxw3CHRfYsm5kkwzuXB-Gnc,12334
251
251
  opentrons/protocol_api/core/engine/exceptions.py,sha256=aZgNrmYEeuPZm21nX_KZYtvyjv5h_zPjxxgPkEV7_bw,725
252
- opentrons/protocol_api/core/engine/instrument.py,sha256=3qh-qmK69ot3B73oWmepBx53jXOcpwFPPModhGoqu2U,103611
252
+ opentrons/protocol_api/core/engine/instrument.py,sha256=HCc9SMglY9gumz1sAg7PU9cb7pR36Qkn0Cf6G1779_o,103900
253
253
  opentrons/protocol_api/core/engine/labware.py,sha256=1xvzguNnK7aecFLiJK0gtRrZ5kpwtzLS73HnKvdJ5lc,8413
254
254
  opentrons/protocol_api/core/engine/load_labware_params.py,sha256=I4Cb8rqpBhmykQuZE8QRG802APrdCy_TYS88rm_9oGA,7159
255
255
  opentrons/protocol_api/core/engine/module_core.py,sha256=MLPgYSRJHUZPZ9rTLvsg3GlpL5b6-Pjk5UBgXCGrL6U,30994
@@ -259,7 +259,7 @@ opentrons/protocol_api/core/engine/point_calculations.py,sha256=C2eF0fvJQGMqQv3D
259
259
  opentrons/protocol_api/core/engine/protocol.py,sha256=OvE8kDONIR0z5S-FV10KUw5v5_HskPk7aqFNyTSUasc,46919
260
260
  opentrons/protocol_api/core/engine/robot.py,sha256=bzUt23NG-clD-9-QFsV_6nm3fMgSmvYEG9DyyZI1xgw,5366
261
261
  opentrons/protocol_api/core/engine/stringify.py,sha256=GwFgEhFMk-uPfFQhQG_2mkaf4cxaItiY8RW7rZwiooQ,2794
262
- opentrons/protocol_api/core/engine/transfer_components_executor.py,sha256=zLokgodl5hu471_3uGKhm3TKOuOsvyeDKSiSkmmotf0,43462
262
+ opentrons/protocol_api/core/engine/transfer_components_executor.py,sha256=2RAcqU-a2uB6YQw7MGKIjeFhNkVFTD3AQySPGgrmpxc,43661
263
263
  opentrons/protocol_api/core/engine/well.py,sha256=IaaFK-3hoUfabfn_twIT7zcAynhzAmRxDnvABss2szo,8923
264
264
  opentrons/protocol_api/core/legacy/__init__.py,sha256=_9jCJNKG3SlS_vljVu8HHkZmtLf4F-f-JHALLF5d5go,401
265
265
  opentrons/protocol_api/core/legacy/deck.py,sha256=qHqcGo-Kdkl9L1aOE0pwrm9tsAnwkXbt4rIOr_VEP-s,13955
@@ -526,7 +526,7 @@ opentrons/protocols/advanced_control/mix.py,sha256=GobQ9E6F2gARjfhNp2xdyWQXFBSwO
526
526
  opentrons/protocols/advanced_control/transfers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
527
527
  opentrons/protocols/advanced_control/transfers/common.py,sha256=Mal5AKO35nCXqjwxR6tDityEoLYg09Yty3Jv1fgOHnQ,5498
528
528
  opentrons/protocols/advanced_control/transfers/transfer.py,sha256=-vE1uZq2BqAagSGeiuTxTyL1wT6fza_fwkO_V_OMMFc,37318
529
- opentrons/protocols/advanced_control/transfers/transfer_liquid_utils.py,sha256=uHUQJLYzDqA4pzZyIbR00PKRN5FMc6A6JgPBA9wSKTg,9713
529
+ opentrons/protocols/advanced_control/transfers/transfer_liquid_utils.py,sha256=wCyAi0nbAWR0qFetRb2w7PYzyaIbpeFkZn9tbcumJgE,10571
530
530
  opentrons/protocols/api_support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
531
531
  opentrons/protocols/api_support/constants.py,sha256=pI_zJ8oORr6FUOaF508ttll3KOIYqRRgcwVFwnqZuqc,262
532
532
  opentrons/protocols/api_support/deck_type.py,sha256=cBxm-IQqFyL1QtYTMGtLXOlyuh-67xWgnJSP6rkg8oc,3942
@@ -584,9 +584,9 @@ opentrons/util/linal.py,sha256=IlKAP9HkNBBgULeSf4YVwSKHdx9jnCjSr7nvDvlRALg,5753
584
584
  opentrons/util/logging_config.py,sha256=7et4YYuQdWdq_e50U-8vFS_QyNBRgdnqPGAQJm8qrIo,9954
585
585
  opentrons/util/logging_queue_handler.py,sha256=ZsSJwy-oV8DXwpYiZisQ1PbYwmK2cOslD46AcyJ1E4I,2484
586
586
  opentrons/util/performance_helpers.py,sha256=ew7H8XD20iS6-2TJAzbQeyzStZkkE6PzHt_Adx3wbZQ,5172
587
- opentrons-8.5.0a9.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
588
- opentrons-8.5.0a9.dist-info/METADATA,sha256=nJjbwXecLEzOwdHxrr1YkHreHdpA1rane4x2MmTnJUI,5084
589
- opentrons-8.5.0a9.dist-info/WHEEL,sha256=qUzzGenXXuJTzyjFah76kDVqDvnk-YDzY00svnrl84w,109
590
- opentrons-8.5.0a9.dist-info/entry_points.txt,sha256=fTa6eGCYkvOtv0ov-KVE8LLGetgb35LQLF9x85OWPVw,106
591
- opentrons-8.5.0a9.dist-info/top_level.txt,sha256=wk6whpbMZdBQpcK0Fg0YVfUGrAgVOFON7oQAhOMGMW8,10
592
- opentrons-8.5.0a9.dist-info/RECORD,,
587
+ opentrons-8.5.0a10.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
588
+ opentrons-8.5.0a10.dist-info/METADATA,sha256=ashrw6ywHgLbcFpe0gEN3i2AquuqwgzaxM6bvgxdDIw,5088
589
+ opentrons-8.5.0a10.dist-info/WHEEL,sha256=qUzzGenXXuJTzyjFah76kDVqDvnk-YDzY00svnrl84w,109
590
+ opentrons-8.5.0a10.dist-info/entry_points.txt,sha256=fTa6eGCYkvOtv0ov-KVE8LLGetgb35LQLF9x85OWPVw,106
591
+ opentrons-8.5.0a10.dist-info/top_level.txt,sha256=wk6whpbMZdBQpcK0Fg0YVfUGrAgVOFON7oQAhOMGMW8,10
592
+ opentrons-8.5.0a10.dist-info/RECORD,,