opentrons 8.2.0a1__py2.py3-none-any.whl → 8.2.0a2__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.
@@ -775,12 +775,12 @@ class OT3API(
775
775
  """
776
776
  Function to update motor estimation for a set of axes
777
777
  """
778
+ if axes is None:
779
+ axes = [ax for ax in Axis]
778
780
 
779
- if axes:
780
- checked_axes = [ax for ax in axes if ax in Axis]
781
- else:
782
- checked_axes = [ax for ax in Axis]
783
- await self._backend.update_motor_estimation(checked_axes)
781
+ axes = [ax for ax in axes if self._backend.axis_is_present(ax)]
782
+
783
+ await self._backend.update_motor_estimation(axes)
784
784
 
785
785
  # Global actions API
786
786
  def pause(self, pause_type: PauseType) -> None:
@@ -10,7 +10,7 @@ class PositionEstimator(Protocol):
10
10
  """Update the specified axes' position estimators from their encoders.
11
11
 
12
12
  This will allow these axes to make a non-home move even if they do not currently have
13
- a position estimation (unless there is no tracked poition from the encoders, as would be
13
+ a position estimation (unless there is no tracked position from the encoders, as would be
14
14
  true immediately after boot).
15
15
 
16
16
  Axis encoders have less precision than their position estimators. Calling this function will
@@ -19,6 +19,8 @@ class PositionEstimator(Protocol):
19
19
 
20
20
  This function updates only the requested axes. If other axes have bad position estimation,
21
21
  moves that require those axes or attempts to get the position of those axes will still fail.
22
+ Axes that are not currently available (like a plunger for a pipette that is not connected)
23
+ will be ignored.
22
24
  """
23
25
  ...
24
26
 
@@ -10,6 +10,7 @@ from opentrons.protocol_engine.types import ABSMeasureMode
10
10
 
11
11
  from ..command import AbstractCommandImpl, BaseCommand, BaseCommandCreate, SuccessData
12
12
  from ...errors.error_occurrence import ErrorOccurrence
13
+ from ...errors import InvalidWavelengthError
13
14
 
14
15
  if TYPE_CHECKING:
15
16
  from opentrons.protocol_engine.state.state import StateView
@@ -69,30 +70,41 @@ class InitializeImpl(
69
70
  unsupported_wavelengths = sample_wavelengths.difference(
70
71
  supported_wavelengths
71
72
  )
73
+ sample_wl_str = ", ".join([str(w) + "nm" for w in sample_wavelengths])
74
+ supported_wl_str = ", ".join([str(w) + "nm" for w in supported_wavelengths])
75
+ unsupported_wl_str = ", ".join(
76
+ [str(w) + "nm" for w in unsupported_wavelengths]
77
+ )
72
78
  if unsupported_wavelengths:
73
- raise ValueError(f"Unsupported wavelengths: {unsupported_wavelengths}")
79
+ raise InvalidWavelengthError(
80
+ f"Unsupported wavelengths: {unsupported_wl_str}. "
81
+ f" Use one of {supported_wl_str} instead."
82
+ )
74
83
 
75
84
  if params.measureMode == "single":
76
85
  if sample_wavelengths_len != 1:
77
86
  raise ValueError(
78
- f"single requires one sample wavelength, provided {sample_wavelengths}"
87
+ f"Measure mode `single` requires one sample wavelength,"
88
+ f" {sample_wl_str} provided instead."
79
89
  )
80
90
  if (
81
91
  reference_wavelength is not None
82
92
  and reference_wavelength not in supported_wavelengths
83
93
  ):
84
- raise ValueError(
85
- f"Reference wavelength {reference_wavelength} not supported {supported_wavelengths}"
94
+ raise InvalidWavelengthError(
95
+ f"Reference wavelength {reference_wavelength}nm is not supported."
96
+ f" Use one of {supported_wl_str} instead."
86
97
  )
87
98
 
88
99
  if params.measureMode == "multi":
89
100
  if sample_wavelengths_len < 1 or sample_wavelengths_len > 6:
90
101
  raise ValueError(
91
- f"multi requires 1-6 sample wavelengths, provided {sample_wavelengths}"
102
+ f"Measure mode `multi` requires 1-6 sample wavelengths,"
103
+ f" {sample_wl_str} provided instead."
92
104
  )
93
105
  if reference_wavelength is not None:
94
- raise RuntimeError(
95
- "Reference wavelength cannot be used with multi mode."
106
+ raise ValueError(
107
+ "Reference wavelength cannot be used with Measure mode `multi`."
96
108
  )
97
109
 
98
110
  await abs_reader.set_sample_wavelength(
@@ -129,9 +129,14 @@ class UnsafePlaceLabwareImplementation(
129
129
  module.id
130
130
  )
131
131
 
132
- # NOTE: When the estop is pressed, the gantry loses position,
133
- # so the robot needs to home x, y to sync.
134
- await ot3api.home(axes=[Axis.Z_L, Axis.Z_R, Axis.Z_G, Axis.X, Axis.Y])
132
+ # NOTE: When the estop is pressed, the gantry loses position, lets use
133
+ # the encoders to sync position.
134
+ # Ideally, we'd do a full home, but this command is used when
135
+ # the gripper is holding the plate reader, and a full home would
136
+ # bang it into the right window.
137
+ await ot3api.home(axes=[Axis.Z_L, Axis.Z_R, Axis.Z_G])
138
+ await ot3api.engage_axes([Axis.X, Axis.Y])
139
+ await ot3api.update_axis_position_estimations([Axis.X, Axis.Y])
135
140
 
136
141
  # Place the labware down
137
142
  await self._start_movement(ot3api, definition, location, drop_offset)
@@ -23,7 +23,11 @@ class UpdatePositionEstimatorsParams(BaseModel):
23
23
  """Payload required for an UpdatePositionEstimators command."""
24
24
 
25
25
  axes: List[MotorAxis] = Field(
26
- ..., description="The axes for which to update the position estimators."
26
+ ...,
27
+ description=(
28
+ "The axes for which to update the position estimators."
29
+ " Any axes that are not physically present will be ignored."
30
+ ),
27
31
  )
28
32
 
29
33
 
@@ -55,6 +55,7 @@ from .exceptions import (
55
55
  InvalidTargetTemperatureError,
56
56
  InvalidBlockVolumeError,
57
57
  InvalidHoldTimeError,
58
+ InvalidWavelengthError,
58
59
  CannotPerformModuleAction,
59
60
  PauseNotAllowedError,
60
61
  ResumeFromRecoveryNotAllowedError,
@@ -137,6 +138,7 @@ __all__ = [
137
138
  "InvalidTargetSpeedError",
138
139
  "InvalidBlockVolumeError",
139
140
  "InvalidHoldTimeError",
141
+ "InvalidWavelengthError",
140
142
  "CannotPerformModuleAction",
141
143
  "ResumeFromRecoveryNotAllowedError",
142
144
  "PauseNotAllowedError",
@@ -773,6 +773,19 @@ class InvalidBlockVolumeError(ProtocolEngineError):
773
773
  super().__init__(ErrorCodes.GENERAL_ERROR, message, details, wrapping)
774
774
 
775
775
 
776
+ class InvalidWavelengthError(ProtocolEngineError):
777
+ """Raised when attempting to set an invalid absorbance wavelength."""
778
+
779
+ def __init__(
780
+ self,
781
+ message: Optional[str] = None,
782
+ details: Optional[Dict[str, Any]] = None,
783
+ wrapping: Optional[Sequence[EnumeratedError]] = None,
784
+ ) -> None:
785
+ """Build a InvalidWavelengthError."""
786
+ super().__init__(ErrorCodes.GENERAL_ERROR, message, details, wrapping)
787
+
788
+
776
789
  class InvalidHoldTimeError(ProtocolEngineError):
777
790
  """An error raised when attempting to set an invalid temperature hold time."""
778
791
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: opentrons
3
- Version: 8.2.0a1
3
+ Version: 8.2.0a2
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.2.0a1
24
+ Requires-Dist: opentrons-shared-data ==8.2.0a2
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
@@ -34,9 +34,9 @@ Requires-Dist: pyusb ==1.2.1
34
34
  Requires-Dist: packaging >=21.0
35
35
  Requires-Dist: importlib-metadata >=1.0 ; python_version < "3.8"
36
36
  Provides-Extra: flex-hardware
37
- Requires-Dist: opentrons-hardware[flex] ==8.2.0a1 ; extra == 'flex-hardware'
37
+ Requires-Dist: opentrons-hardware[flex] ==8.2.0a2 ; extra == 'flex-hardware'
38
38
  Provides-Extra: ot2-hardware
39
- Requires-Dist: opentrons-hardware ==8.2.0a1 ; extra == 'ot2-hardware'
39
+ Requires-Dist: opentrons-hardware ==8.2.0a2 ; extra == 'ot2-hardware'
40
40
 
41
41
  .. _Full API Documentation: http://docs.opentrons.com
42
42
 
@@ -100,7 +100,7 @@ opentrons/hardware_control/module_control.py,sha256=u0RpbOgr5pV5exgKg3qvNQdwdVuy
100
100
  opentrons/hardware_control/motion_utilities.py,sha256=LuOZBcnNJmTPra6-mYX5wN3jh8PA2l81dy5amCyYpcQ,7164
101
101
  opentrons/hardware_control/nozzle_manager.py,sha256=XNEyNdh00QdZ7VECb--JUO_BI-96EwoAPuQ7bdGXSGs,16788
102
102
  opentrons/hardware_control/ot3_calibration.py,sha256=ExWZDLDHpi8HUzdYvBzhOyAXXwT3z7BnxPH-2EpOerM,44717
103
- opentrons/hardware_control/ot3api.py,sha256=QCTBbJ2-KLFk43qCkEJctxSmk9ZwMV8Tj6QN89KFjXo,118083
103
+ opentrons/hardware_control/ot3api.py,sha256=CMtyrIDYzw-H-FQuUlnjVpGEOA9YNWETFy7jDxT8zYk,118073
104
104
  opentrons/hardware_control/pause_manager.py,sha256=wmNmraimE2yZQVqCxX_rtQHUWRzpzyQEaym9fLMgyww,888
105
105
  opentrons/hardware_control/poller.py,sha256=rx6Q-UxbUIj3ek69IlYenFh7BFuasszRO-GzzhRPuHQ,3885
106
106
  opentrons/hardware_control/robot_calibration.py,sha256=HiCQNmdp59SbkzXpDGtPsN8rSfUj-ZU4v63vcSw4AbI,7149
@@ -189,7 +189,7 @@ opentrons/hardware_control/protocols/instrument_configurer.py,sha256=5zUCAchtoJ6
189
189
  opentrons/hardware_control/protocols/liquid_handler.py,sha256=UusmQYUncMqAwxuKTIcIIrlF93XpLPctu5SJuotsTws,7731
190
190
  opentrons/hardware_control/protocols/module_provider.py,sha256=QDKCWqrW-6IeI91IICBTJClK0C__mgq3A0-M3Wa9ee8,487
191
191
  opentrons/hardware_control/protocols/motion_controller.py,sha256=2sv-fc0uvmuFj-wA1h4VrEjLLTMTvswLCkisjEXwxXQ,9520
192
- opentrons/hardware_control/protocols/position_estimator.py,sha256=bEYQiNZYsh5k9r_J2XCDQg6FixrQmxr-7KTD9gfVmYc,1797
192
+ opentrons/hardware_control/protocols/position_estimator.py,sha256=BrqK5AJn9747c4LX0ZWBJWgWHjyX977CHBI7WVvO-9Q,1922
193
193
  opentrons/hardware_control/protocols/simulatable.py,sha256=ED3VHoO8q1h9FhBDv31g5N7YdTKB5hj7lp7BZcCaL7o,247
194
194
  opentrons/hardware_control/protocols/stoppable.py,sha256=ukI1WrJzXwsJm5ty2trhMqGJr0sT13ttlv914YMAUt8,226
195
195
  opentrons/hardware_control/protocols/types.py,sha256=UlejXW-ZHjuZWizKamphyGG4Iv7-liOuCfvQR29f0Do,613
@@ -323,7 +323,7 @@ opentrons/protocol_engine/commands/wait_for_duration.py,sha256=DIATqpdBStGQWnLAb
323
323
  opentrons/protocol_engine/commands/wait_for_resume.py,sha256=yFNpYDJO5mgAhIpMb1i7Epo7ZhO15Ot9RsSUdW8AjUg,2178
324
324
  opentrons/protocol_engine/commands/absorbance_reader/__init__.py,sha256=umS98LlkBEAToRCvxLpr4k43tRPPTfkYu-81-bLy5DU,1251
325
325
  opentrons/protocol_engine/commands/absorbance_reader/close_lid.py,sha256=i6kggql8hJgTxpUbc5dmdMdHDsYWiczfMvZNA72FmvI,5540
326
- opentrons/protocol_engine/commands/absorbance_reader/initialize.py,sha256=HKsgwCfv6LR4SJ06721eq9_NhKcxtVR5lYIdaZPL-_4,4760
326
+ opentrons/protocol_engine/commands/absorbance_reader/initialize.py,sha256=bbs7FwfpGVNAa5UT_rMV7ImrRnmREN9kRhmG8xJsAaU,5373
327
327
  opentrons/protocol_engine/commands/absorbance_reader/open_lid.py,sha256=Ef5coWs4GGOzmZbrAFZXTKq8hZCC7rJc2DVCOU2PFJg,5531
328
328
  opentrons/protocol_engine/commands/absorbance_reader/read.py,sha256=xu5KijW_sSEtjdhNIEctYkQBZC8Baj650W6s8nXfTKw,8187
329
329
  opentrons/protocol_engine/commands/calibration/__init__.py,sha256=JjNnULLBM3j8VtpfHOvH51em9jVLR_ezyrUJUWqxuYI,1611
@@ -362,12 +362,12 @@ opentrons/protocol_engine/commands/unsafe/__init__.py,sha256=lx3TFW_78XK0bdtLFuG
362
362
  opentrons/protocol_engine/commands/unsafe/unsafe_blow_out_in_place.py,sha256=K1idiUT1RW_mWa_SIe3JOUaeuSsUbv12toWgAB1KSvM,3065
363
363
  opentrons/protocol_engine/commands/unsafe/unsafe_drop_tip_in_place.py,sha256=v5h1sLxx_NMAhVCLbmECd7sD0PsecB4Dj-oaBEe0YBs,3635
364
364
  opentrons/protocol_engine/commands/unsafe/unsafe_engage_axes.py,sha256=hCRqFeBInC9Mxz9LqUgIrjTTAjuMEq5MJxCqqXwi3N4,2552
365
- opentrons/protocol_engine/commands/unsafe/unsafe_place_labware.py,sha256=HnYnFViUtPx2p3UXntdMa5LyBLE2AYLjskvnIIWYZ24,7576
365
+ opentrons/protocol_engine/commands/unsafe/unsafe_place_labware.py,sha256=etNdLxj0TtmBA5fTLR-OSfbnRNbXKDzE__aKRAkvWMM,7866
366
366
  opentrons/protocol_engine/commands/unsafe/unsafe_ungrip_labware.py,sha256=MSYftVeLHqnIyX0n9IJLq6XOb7P835EQg7KR3n3PU6c,2397
367
- opentrons/protocol_engine/commands/unsafe/update_position_estimators.py,sha256=pXew4UsDB4Kh7z9r2l7-S3D8bICNmdDr8lNkNEnByYE,2938
368
- opentrons/protocol_engine/errors/__init__.py,sha256=rwpfKoEIZUN7c5kf0T9b0MHCJdDxZiUTCvQs64jPtVI,5174
367
+ opentrons/protocol_engine/commands/unsafe/update_position_estimators.py,sha256=Jgds_cwEHBiiDyJVK6wL34VTWZikrSVYJSRUohnsod8,3044
368
+ opentrons/protocol_engine/errors/__init__.py,sha256=4CEG_WmrdSmESVkSkwfLlbNwW_r8TlMbD_fEXzcn5qg,5232
369
369
  opentrons/protocol_engine/errors/error_occurrence.py,sha256=PM_bxIxLYKtsRl_cGMiCtXVVMEb88hkLFEWcafwqLf8,7542
370
- opentrons/protocol_engine/errors/exceptions.py,sha256=bLZ5ZYUgUH-CjGtflbDBbmWCqUPr6MGcpE1Yiip3ll4,40153
370
+ opentrons/protocol_engine/errors/exceptions.py,sha256=yHLqtkKQbJev80zZYvZz8gjw8luXxWRrcJe3TEcIj88,40604
371
371
  opentrons/protocol_engine/execution/__init__.py,sha256=X8qTYYOc1v84JIDM1xYpIo3VG_BPnsrfl2jm9UUQGwQ,1384
372
372
  opentrons/protocol_engine/execution/command_executor.py,sha256=F1V7H_Y7mqc4hJMfs79aNZ7qG0NFh-xj2BHt4fSUK-4,8202
373
373
  opentrons/protocol_engine/execution/create_queue_worker.py,sha256=6hMuOqbqwfMn63idsrAgro0NJZoyX4VVH7AV3le2EWM,3372
@@ -512,9 +512,9 @@ opentrons/util/helpers.py,sha256=3hr801bWGbxEcOFAS7f-iOhmnUhoK5qahbB8SIvaCfY,165
512
512
  opentrons/util/linal.py,sha256=IlKAP9HkNBBgULeSf4YVwSKHdx9jnCjSr7nvDvlRALg,5753
513
513
  opentrons/util/logging_config.py,sha256=t3xRxQ5zfXQsU8S4gl6yvrtqx6dxOGyBwIM43CGRyjE,6887
514
514
  opentrons/util/performance_helpers.py,sha256=ew7H8XD20iS6-2TJAzbQeyzStZkkE6PzHt_Adx3wbZQ,5172
515
- opentrons-8.2.0a1.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
516
- opentrons-8.2.0a1.dist-info/METADATA,sha256=1X3bpJiJdC2f93wQJUlj-jC0LTujfDRA2Rdrk4895lw,5019
517
- opentrons-8.2.0a1.dist-info/WHEEL,sha256=_4XEmVmaBFWtekSGrbfOGNjC2I5lUr0lZSRblBllIFA,109
518
- opentrons-8.2.0a1.dist-info/entry_points.txt,sha256=fTa6eGCYkvOtv0ov-KVE8LLGetgb35LQLF9x85OWPVw,106
519
- opentrons-8.2.0a1.dist-info/top_level.txt,sha256=wk6whpbMZdBQpcK0Fg0YVfUGrAgVOFON7oQAhOMGMW8,10
520
- opentrons-8.2.0a1.dist-info/RECORD,,
515
+ opentrons-8.2.0a2.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
516
+ opentrons-8.2.0a2.dist-info/METADATA,sha256=bvd0sP2Rm1bKi07Fc_-G1cXPrnnrdfybMiiHbJRcWI4,5019
517
+ opentrons-8.2.0a2.dist-info/WHEEL,sha256=_4XEmVmaBFWtekSGrbfOGNjC2I5lUr0lZSRblBllIFA,109
518
+ opentrons-8.2.0a2.dist-info/entry_points.txt,sha256=fTa6eGCYkvOtv0ov-KVE8LLGetgb35LQLF9x85OWPVw,106
519
+ opentrons-8.2.0a2.dist-info/top_level.txt,sha256=wk6whpbMZdBQpcK0Fg0YVfUGrAgVOFON7oQAhOMGMW8,10
520
+ opentrons-8.2.0a2.dist-info/RECORD,,