opentrons 8.4.0a3__py2.py3-none-any.whl → 8.4.0a5__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.
- opentrons/legacy_commands/commands.py +83 -2
- opentrons/legacy_commands/helpers.py +59 -1
- opentrons/legacy_commands/types.py +30 -0
- opentrons/protocol_api/core/engine/instrument.py +182 -115
- opentrons/protocol_api/core/engine/pipette_movement_conflict.py +6 -14
- opentrons/protocol_api/core/engine/transfer_components_executor.py +30 -25
- opentrons/protocol_api/core/instrument.py +8 -4
- opentrons/protocol_api/core/legacy/legacy_instrument_core.py +9 -30
- opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py +8 -4
- opentrons/protocol_api/core/well.py +1 -1
- opentrons/protocol_api/instrument_context.py +144 -73
- opentrons/protocol_api/labware.py +26 -44
- opentrons/protocol_api/protocol_context.py +18 -16
- opentrons/protocol_engine/commands/__init__.py +38 -38
- opentrons/protocol_engine/commands/aspirate_while_tracking.py +38 -65
- opentrons/protocol_engine/commands/command_unions.py +33 -33
- opentrons/protocol_engine/commands/dispense_while_tracking.py +36 -72
- opentrons/protocol_engine/commands/labware_handling_common.py +6 -1
- opentrons/protocol_engine/commands/liquid_probe.py +1 -2
- opentrons/protocol_engine/commands/move_to_well.py +5 -11
- opentrons/protocol_engine/commands/{evotip_dispense.py → pressure_dispense.py} +27 -27
- opentrons/protocol_engine/commands/{evotip_seal_pipette.py → seal_pipette_to_tip.py} +32 -27
- opentrons/protocol_engine/commands/{evotip_unseal_pipette.py → unseal_pipette_from_tip.py} +22 -22
- opentrons/protocol_engine/execution/pipetting.py +1 -0
- opentrons/protocol_engine/labware_offset_standardization.py +22 -1
- opentrons/protocol_engine/resources/deck_configuration_provider.py +8 -4
- opentrons/protocol_engine/state/frustum_helpers.py +12 -4
- opentrons/protocol_engine/state/geometry.py +121 -72
- opentrons/protocol_engine/state/update_types.py +1 -1
- opentrons/protocol_engine/state/wells.py +1 -1
- opentrons/protocol_engine/types/__init__.py +6 -0
- opentrons/protocol_engine/types/well_position.py +18 -1
- opentrons/protocols/advanced_control/transfers/transfer_liquid_utils.py +1 -1
- opentrons/protocols/labware.py +23 -18
- opentrons/util/logging_config.py +94 -25
- opentrons/util/logging_queue_handler.py +61 -0
- {opentrons-8.4.0a3.dist-info → opentrons-8.4.0a5.dist-info}/METADATA +4 -4
- {opentrons-8.4.0a3.dist-info → opentrons-8.4.0a5.dist-info}/RECORD +42 -41
- {opentrons-8.4.0a3.dist-info → opentrons-8.4.0a5.dist-info}/LICENSE +0 -0
- {opentrons-8.4.0a3.dist-info → opentrons-8.4.0a5.dist-info}/WHEEL +0 -0
- {opentrons-8.4.0a3.dist-info → opentrons-8.4.0a5.dist-info}/entry_points.txt +0 -0
- {opentrons-8.4.0a3.dist-info → opentrons-8.4.0a5.dist-info}/top_level.txt +0 -0
|
@@ -29,7 +29,7 @@ from ..state.update_types import StateUpdate
|
|
|
29
29
|
from ..errors.exceptions import PipetteNotReadyToAspirateError
|
|
30
30
|
from opentrons.hardware_control import HardwareControlAPI
|
|
31
31
|
from ..state.update_types import CLEAR
|
|
32
|
-
from ..types import
|
|
32
|
+
from ..types import DeckPoint
|
|
33
33
|
|
|
34
34
|
if TYPE_CHECKING:
|
|
35
35
|
from ..execution import PipettingHandler, GantryMover, MovementHandler
|
|
@@ -104,16 +104,8 @@ class AspirateWhileTrackingImplementation(
|
|
|
104
104
|
" The first aspirate following a blow-out must be from a specific well"
|
|
105
105
|
" so the plunger can be reset in a known safe position."
|
|
106
106
|
)
|
|
107
|
-
|
|
108
|
-
current_position = await self._gantry_mover.get_position(params.pipetteId)
|
|
109
|
-
current_location = self._state_view.pipettes.get_current_location()
|
|
110
|
-
|
|
111
107
|
state_update = StateUpdate()
|
|
112
|
-
|
|
113
|
-
pipette_id=params.pipetteId,
|
|
114
|
-
labware_id=params.labwareId,
|
|
115
|
-
well_name=params.wellName,
|
|
116
|
-
)
|
|
108
|
+
|
|
117
109
|
move_result = await move_to_well(
|
|
118
110
|
movement=self._movement,
|
|
119
111
|
model_utils=self._model_utils,
|
|
@@ -121,7 +113,6 @@ class AspirateWhileTrackingImplementation(
|
|
|
121
113
|
labware_id=params.labwareId,
|
|
122
114
|
well_name=params.wellName,
|
|
123
115
|
well_location=params.wellLocation,
|
|
124
|
-
current_well=current_well,
|
|
125
116
|
operation_volume=-params.volume,
|
|
126
117
|
)
|
|
127
118
|
state_update.append(move_result.state_update)
|
|
@@ -138,9 +129,9 @@ class AspirateWhileTrackingImplementation(
|
|
|
138
129
|
flow_rate=params.flowRate,
|
|
139
130
|
location_if_error={
|
|
140
131
|
"retryLocation": (
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
132
|
+
move_result.public.position.x,
|
|
133
|
+
move_result.public.position.y,
|
|
134
|
+
move_result.public.position.z,
|
|
144
135
|
)
|
|
145
136
|
},
|
|
146
137
|
command_note_adder=self._command_note_adder,
|
|
@@ -156,58 +147,40 @@ class AspirateWhileTrackingImplementation(
|
|
|
156
147
|
z=position_after_aspirate.z,
|
|
157
148
|
)
|
|
158
149
|
if isinstance(aspirate_result, DefinedErrorData):
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
well_names=self._state_view.geometry.get_wells_covered_by_pipette_with_active_well(
|
|
168
|
-
current_location.labware_id,
|
|
169
|
-
current_location.well_name,
|
|
170
|
-
params.pipetteId,
|
|
171
|
-
),
|
|
172
|
-
volume_added=CLEAR,
|
|
173
|
-
),
|
|
174
|
-
state_update_if_false_positive=aspirate_result.state_update_if_false_positive,
|
|
175
|
-
)
|
|
176
|
-
else:
|
|
177
|
-
return aspirate_result
|
|
178
|
-
else:
|
|
179
|
-
if (
|
|
180
|
-
isinstance(current_location, CurrentWell)
|
|
181
|
-
and current_location.pipette_id == params.pipetteId
|
|
182
|
-
):
|
|
183
|
-
return SuccessData(
|
|
184
|
-
public=AspirateWhileTrackingResult(
|
|
185
|
-
volume=aspirate_result.public.volume,
|
|
186
|
-
position=result_deck_point,
|
|
187
|
-
),
|
|
188
|
-
state_update=aspirate_result.state_update.set_liquid_operated(
|
|
189
|
-
labware_id=current_location.labware_id,
|
|
190
|
-
well_names=self._state_view.geometry.get_wells_covered_by_pipette_with_active_well(
|
|
191
|
-
current_location.labware_id,
|
|
192
|
-
current_location.well_name,
|
|
193
|
-
params.pipetteId,
|
|
194
|
-
),
|
|
195
|
-
volume_added=-aspirate_result.public.volume
|
|
196
|
-
* self._state_view.geometry.get_nozzles_per_well(
|
|
197
|
-
current_location.labware_id,
|
|
198
|
-
current_location.well_name,
|
|
199
|
-
params.pipetteId,
|
|
200
|
-
),
|
|
201
|
-
),
|
|
202
|
-
)
|
|
203
|
-
else:
|
|
204
|
-
return SuccessData(
|
|
205
|
-
public=AspirateWhileTrackingResult(
|
|
206
|
-
volume=aspirate_result.public.volume,
|
|
207
|
-
position=result_deck_point,
|
|
150
|
+
return DefinedErrorData(
|
|
151
|
+
public=aspirate_result.public,
|
|
152
|
+
state_update=aspirate_result.state_update.set_liquid_operated(
|
|
153
|
+
labware_id=params.labwareId,
|
|
154
|
+
well_names=self._state_view.geometry.get_wells_covered_by_pipette_with_active_well(
|
|
155
|
+
params.labwareId,
|
|
156
|
+
params.wellName,
|
|
157
|
+
params.pipetteId,
|
|
208
158
|
),
|
|
209
|
-
|
|
210
|
-
)
|
|
159
|
+
volume_added=CLEAR,
|
|
160
|
+
),
|
|
161
|
+
state_update_if_false_positive=aspirate_result.state_update_if_false_positive,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
return SuccessData(
|
|
165
|
+
public=AspirateWhileTrackingResult(
|
|
166
|
+
volume=aspirate_result.public.volume,
|
|
167
|
+
position=result_deck_point,
|
|
168
|
+
),
|
|
169
|
+
state_update=aspirate_result.state_update.set_liquid_operated(
|
|
170
|
+
labware_id=params.labwareId,
|
|
171
|
+
well_names=self._state_view.geometry.get_wells_covered_by_pipette_with_active_well(
|
|
172
|
+
params.labwareId,
|
|
173
|
+
params.wellName,
|
|
174
|
+
params.pipetteId,
|
|
175
|
+
),
|
|
176
|
+
volume_added=-aspirate_result.public.volume
|
|
177
|
+
* self._state_view.geometry.get_nozzles_per_well(
|
|
178
|
+
params.labwareId,
|
|
179
|
+
params.wellName,
|
|
180
|
+
params.pipetteId,
|
|
181
|
+
),
|
|
182
|
+
),
|
|
183
|
+
)
|
|
211
184
|
|
|
212
185
|
|
|
213
186
|
class AspirateWhileTracking(
|
|
@@ -378,28 +378,28 @@ from .liquid_probe import (
|
|
|
378
378
|
TryLiquidProbeCommandType,
|
|
379
379
|
)
|
|
380
380
|
|
|
381
|
-
from .
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
381
|
+
from .seal_pipette_to_tip import (
|
|
382
|
+
SealPipetteToTip,
|
|
383
|
+
SealPipetteToTipParams,
|
|
384
|
+
SealPipetteToTipCreate,
|
|
385
|
+
SealPipetteToTipResult,
|
|
386
|
+
SealPipetteToTipCommandType,
|
|
387
387
|
)
|
|
388
388
|
|
|
389
|
-
from .
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
389
|
+
from .pressure_dispense import (
|
|
390
|
+
PressureDispense,
|
|
391
|
+
PressureDispenseParams,
|
|
392
|
+
PressureDispenseCreate,
|
|
393
|
+
PressureDispenseResult,
|
|
394
|
+
PressureDispenseCommandType,
|
|
395
395
|
)
|
|
396
396
|
|
|
397
|
-
from .
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
397
|
+
from .unseal_pipette_from_tip import (
|
|
398
|
+
UnsealPipetteFromTip,
|
|
399
|
+
UnsealPipetteFromTipParams,
|
|
400
|
+
UnsealPipetteFromTipCreate,
|
|
401
|
+
UnsealPipetteFromTipResult,
|
|
402
|
+
UnsealPipetteFromTipCommandType,
|
|
403
403
|
)
|
|
404
404
|
|
|
405
405
|
Command = Annotated[
|
|
@@ -448,9 +448,9 @@ Command = Annotated[
|
|
|
448
448
|
GetNextTip,
|
|
449
449
|
LiquidProbe,
|
|
450
450
|
TryLiquidProbe,
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
451
|
+
SealPipetteToTip,
|
|
452
|
+
PressureDispense,
|
|
453
|
+
UnsealPipetteFromTip,
|
|
454
454
|
heater_shaker.WaitForTemperature,
|
|
455
455
|
heater_shaker.SetTargetTemperature,
|
|
456
456
|
heater_shaker.DeactivateHeater,
|
|
@@ -549,9 +549,9 @@ CommandParams = Union[
|
|
|
549
549
|
GetNextTipParams,
|
|
550
550
|
LiquidProbeParams,
|
|
551
551
|
TryLiquidProbeParams,
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
552
|
+
SealPipetteToTipParams,
|
|
553
|
+
PressureDispenseParams,
|
|
554
|
+
UnsealPipetteFromTipParams,
|
|
555
555
|
heater_shaker.WaitForTemperatureParams,
|
|
556
556
|
heater_shaker.SetTargetTemperatureParams,
|
|
557
557
|
heater_shaker.DeactivateHeaterParams,
|
|
@@ -648,9 +648,9 @@ CommandType = Union[
|
|
|
648
648
|
GetNextTipCommandType,
|
|
649
649
|
LiquidProbeCommandType,
|
|
650
650
|
TryLiquidProbeCommandType,
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
651
|
+
SealPipetteToTipCommandType,
|
|
652
|
+
PressureDispenseCommandType,
|
|
653
|
+
UnsealPipetteFromTipCommandType,
|
|
654
654
|
heater_shaker.WaitForTemperatureCommandType,
|
|
655
655
|
heater_shaker.SetTargetTemperatureCommandType,
|
|
656
656
|
heater_shaker.DeactivateHeaterCommandType,
|
|
@@ -748,9 +748,9 @@ CommandCreate = Annotated[
|
|
|
748
748
|
GetNextTipCreate,
|
|
749
749
|
LiquidProbeCreate,
|
|
750
750
|
TryLiquidProbeCreate,
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
751
|
+
SealPipetteToTipCreate,
|
|
752
|
+
PressureDispenseCreate,
|
|
753
|
+
UnsealPipetteFromTipCreate,
|
|
754
754
|
heater_shaker.WaitForTemperatureCreate,
|
|
755
755
|
heater_shaker.SetTargetTemperatureCreate,
|
|
756
756
|
heater_shaker.DeactivateHeaterCreate,
|
|
@@ -856,9 +856,9 @@ CommandResult = Union[
|
|
|
856
856
|
GetNextTipResult,
|
|
857
857
|
LiquidProbeResult,
|
|
858
858
|
TryLiquidProbeResult,
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
859
|
+
SealPipetteToTipResult,
|
|
860
|
+
PressureDispenseResult,
|
|
861
|
+
UnsealPipetteFromTipResult,
|
|
862
862
|
heater_shaker.WaitForTemperatureResult,
|
|
863
863
|
heater_shaker.SetTargetTemperatureResult,
|
|
864
864
|
heater_shaker.DeactivateHeaterResult,
|
|
@@ -9,7 +9,7 @@ from pydantic import Field
|
|
|
9
9
|
from pydantic.json_schema import SkipJsonSchema
|
|
10
10
|
|
|
11
11
|
from ..state.update_types import CLEAR, StateUpdate
|
|
12
|
-
from ..types import
|
|
12
|
+
from ..types import DeckPoint
|
|
13
13
|
from .pipetting_common import (
|
|
14
14
|
PipetteIdMixin,
|
|
15
15
|
DispenseVolumeMixin,
|
|
@@ -99,13 +99,6 @@ class DispenseWhileTrackingImplementation(
|
|
|
99
99
|
|
|
100
100
|
# TODO(pbm, 10-15-24): call self._state_view.geometry.validate_dispense_volume_into_well()
|
|
101
101
|
|
|
102
|
-
current_location = self._state_view.pipettes.get_current_location()
|
|
103
|
-
current_position = await self._gantry_mover.get_position(params.pipetteId)
|
|
104
|
-
current_well = CurrentWell(
|
|
105
|
-
pipette_id=params.pipetteId,
|
|
106
|
-
labware_id=params.labwareId,
|
|
107
|
-
well_name=params.wellName,
|
|
108
|
-
)
|
|
109
102
|
state_update = StateUpdate()
|
|
110
103
|
move_result = await move_to_well(
|
|
111
104
|
movement=self._movement,
|
|
@@ -114,8 +107,6 @@ class DispenseWhileTrackingImplementation(
|
|
|
114
107
|
labware_id=params.labwareId,
|
|
115
108
|
well_name=params.wellName,
|
|
116
109
|
well_location=params.wellLocation,
|
|
117
|
-
current_well=current_well,
|
|
118
|
-
operation_volume=-params.volume,
|
|
119
110
|
)
|
|
120
111
|
state_update.append(move_result.state_update)
|
|
121
112
|
if isinstance(move_result, DefinedErrorData):
|
|
@@ -132,9 +123,9 @@ class DispenseWhileTrackingImplementation(
|
|
|
132
123
|
push_out=params.pushOut,
|
|
133
124
|
location_if_error={
|
|
134
125
|
"retryLocation": (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
126
|
+
move_result.public.position.x,
|
|
127
|
+
move_result.public.position.y,
|
|
128
|
+
move_result.public.position.z,
|
|
138
129
|
)
|
|
139
130
|
},
|
|
140
131
|
pipetting=self._pipetting,
|
|
@@ -150,67 +141,40 @@ class DispenseWhileTrackingImplementation(
|
|
|
150
141
|
)
|
|
151
142
|
|
|
152
143
|
if isinstance(dispense_result, DefinedErrorData):
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
labware_id=current_location.labware_id,
|
|
161
|
-
well_names=self._state_view.geometry.get_wells_covered_by_pipette_with_active_well(
|
|
162
|
-
current_location.labware_id,
|
|
163
|
-
current_location.well_name,
|
|
164
|
-
params.pipetteId,
|
|
165
|
-
),
|
|
166
|
-
volume_added=CLEAR,
|
|
167
|
-
),
|
|
168
|
-
state_update_if_false_positive=dispense_result.state_update_if_false_positive,
|
|
169
|
-
)
|
|
170
|
-
else:
|
|
171
|
-
return dispense_result
|
|
172
|
-
else:
|
|
173
|
-
if (
|
|
174
|
-
isinstance(current_location, CurrentWell)
|
|
175
|
-
and current_location.pipette_id == params.pipetteId
|
|
176
|
-
):
|
|
177
|
-
volume_added = (
|
|
178
|
-
self._state_view.pipettes.get_liquid_dispensed_by_ejecting_volume(
|
|
179
|
-
pipette_id=params.pipetteId,
|
|
180
|
-
volume=dispense_result.public.volume,
|
|
181
|
-
)
|
|
182
|
-
)
|
|
183
|
-
if volume_added is not None:
|
|
184
|
-
volume_added *= self._state_view.geometry.get_nozzles_per_well(
|
|
185
|
-
current_location.labware_id,
|
|
186
|
-
current_location.well_name,
|
|
144
|
+
return DefinedErrorData(
|
|
145
|
+
public=dispense_result.public,
|
|
146
|
+
state_update=dispense_result.state_update.set_liquid_operated(
|
|
147
|
+
labware_id=params.labwareId,
|
|
148
|
+
well_names=self._state_view.geometry.get_wells_covered_by_pipette_with_active_well(
|
|
149
|
+
params.labwareId,
|
|
150
|
+
params.wellName,
|
|
187
151
|
params.pipetteId,
|
|
188
|
-
)
|
|
189
|
-
return SuccessData(
|
|
190
|
-
public=DispenseWhileTrackingResult(
|
|
191
|
-
volume=dispense_result.public.volume,
|
|
192
|
-
position=result_deck_point,
|
|
193
152
|
),
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
153
|
+
volume_added=CLEAR,
|
|
154
|
+
),
|
|
155
|
+
state_update_if_false_positive=dispense_result.state_update_if_false_positive,
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
return SuccessData(
|
|
159
|
+
public=DispenseWhileTrackingResult(
|
|
160
|
+
volume=dispense_result.public.volume,
|
|
161
|
+
position=result_deck_point,
|
|
162
|
+
),
|
|
163
|
+
state_update=dispense_result.state_update.set_liquid_operated(
|
|
164
|
+
labware_id=params.labwareId,
|
|
165
|
+
well_names=self._state_view.geometry.get_wells_covered_by_pipette_with_active_well(
|
|
166
|
+
params.labwareId,
|
|
167
|
+
params.wellName,
|
|
168
|
+
params.pipetteId,
|
|
169
|
+
),
|
|
170
|
+
volume_added=dispense_result.public.volume
|
|
171
|
+
* self._state_view.geometry.get_nozzles_per_well(
|
|
172
|
+
params.labwareId,
|
|
173
|
+
params.wellName,
|
|
174
|
+
params.pipetteId,
|
|
175
|
+
),
|
|
176
|
+
),
|
|
177
|
+
)
|
|
214
178
|
|
|
215
179
|
|
|
216
180
|
class DispenseWhileTracking(
|
|
@@ -11,7 +11,12 @@ class LabwareHandlingResultMixin(BaseModel):
|
|
|
11
11
|
labwareId: str = Field(..., description="The id of the labware.")
|
|
12
12
|
locationSequence: LabwareLocationSequence | None = Field(
|
|
13
13
|
None,
|
|
14
|
-
description=
|
|
14
|
+
description=(
|
|
15
|
+
"The full location down to the deck on which this labware exists."
|
|
16
|
+
" The reason this can be `null` or omitted is just backwards compatibility,"
|
|
17
|
+
" for older runs and analyses. This should always be present"
|
|
18
|
+
" for new runs and analyses, even for labware whose location is off-deck."
|
|
19
|
+
),
|
|
15
20
|
)
|
|
16
21
|
|
|
17
22
|
|
|
@@ -22,8 +22,7 @@ from opentrons_shared_data.errors.exceptions import (
|
|
|
22
22
|
PipetteOverpressureError,
|
|
23
23
|
)
|
|
24
24
|
|
|
25
|
-
from ..types import DeckPoint
|
|
26
|
-
from ..types.liquid_level_detection import LiquidTrackingType
|
|
25
|
+
from ..types import DeckPoint, LiquidTrackingType
|
|
27
26
|
from .pipetting_common import (
|
|
28
27
|
LiquidNotFoundError,
|
|
29
28
|
PipetteIdMixin,
|
|
@@ -8,7 +8,7 @@ from .pipetting_common import (
|
|
|
8
8
|
PipetteIdMixin,
|
|
9
9
|
)
|
|
10
10
|
from .movement_common import (
|
|
11
|
-
|
|
11
|
+
LiquidHandlingWellLocationMixin,
|
|
12
12
|
MovementMixin,
|
|
13
13
|
DestinationPositionResult,
|
|
14
14
|
StallOrCollisionError,
|
|
@@ -21,7 +21,6 @@ from .command import (
|
|
|
21
21
|
SuccessData,
|
|
22
22
|
DefinedErrorData,
|
|
23
23
|
)
|
|
24
|
-
from ..errors import LabwareIsTipRackError
|
|
25
24
|
|
|
26
25
|
if TYPE_CHECKING:
|
|
27
26
|
from ..execution import MovementHandler
|
|
@@ -31,7 +30,7 @@ if TYPE_CHECKING:
|
|
|
31
30
|
MoveToWellCommandType = Literal["moveToWell"]
|
|
32
31
|
|
|
33
32
|
|
|
34
|
-
class MoveToWellParams(PipetteIdMixin,
|
|
33
|
+
class MoveToWellParams(PipetteIdMixin, LiquidHandlingWellLocationMixin, MovementMixin):
|
|
35
34
|
"""Payload required to move a pipette to a specific well."""
|
|
36
35
|
|
|
37
36
|
pass
|
|
@@ -70,14 +69,9 @@ class MoveToWellImplementation(
|
|
|
70
69
|
labware_id = params.labwareId
|
|
71
70
|
well_name = params.wellName
|
|
72
71
|
well_location = params.wellLocation
|
|
73
|
-
|
|
74
|
-
if
|
|
75
|
-
|
|
76
|
-
and well_location.volumeOffset
|
|
77
|
-
):
|
|
78
|
-
raise LabwareIsTipRackError(
|
|
79
|
-
"Cannot specify a WellLocation with a volumeOffset with movement to a tip rack"
|
|
80
|
-
)
|
|
72
|
+
# TODO(cm): implement move_to_well with meniscus + volume offset
|
|
73
|
+
if well_location.volumeOffset and well_location.volumeOffset != 0:
|
|
74
|
+
raise ValueError("volume offset not supported with MoveToWell")
|
|
81
75
|
|
|
82
76
|
move_result = await move_to_well(
|
|
83
77
|
model_utils=self._model_utils,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Pressure Dispense-in-place command request, result, and implementation models."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from typing import TYPE_CHECKING, Optional, Type, Union
|
|
@@ -35,33 +35,33 @@ if TYPE_CHECKING:
|
|
|
35
35
|
from ..state.state import StateView
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
PressureDispenseCommandType = Literal["pressureDispense"]
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
class
|
|
41
|
+
class PressureDispenseParams(
|
|
42
42
|
PipetteIdMixin, DispenseVolumeMixin, FlowRateMixin, LiquidHandlingWellLocationMixin
|
|
43
43
|
):
|
|
44
|
-
"""Payload required to dispense in place."""
|
|
44
|
+
"""Payload required to pressure dispense in place."""
|
|
45
45
|
|
|
46
46
|
pass
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
class
|
|
50
|
-
"""Result data from the execution of a
|
|
49
|
+
class PressureDispenseResult(BaseLiquidHandlingResult):
|
|
50
|
+
"""Result data from the execution of a PressureDispense command."""
|
|
51
51
|
|
|
52
52
|
pass
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
_ExecuteReturn = Union[
|
|
56
|
-
SuccessData[
|
|
56
|
+
SuccessData[PressureDispenseResult],
|
|
57
57
|
DefinedErrorData[StallOrCollisionError],
|
|
58
58
|
]
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
class
|
|
62
|
-
AbstractCommandImpl[
|
|
61
|
+
class PressureDispenseImplementation(
|
|
62
|
+
AbstractCommandImpl[PressureDispenseParams, _ExecuteReturn]
|
|
63
63
|
):
|
|
64
|
-
"""
|
|
64
|
+
"""Pressure dispense command implementation."""
|
|
65
65
|
|
|
66
66
|
def __init__(
|
|
67
67
|
self,
|
|
@@ -78,8 +78,8 @@ class EvotipDispenseImplementation(
|
|
|
78
78
|
self._model_utils = model_utils
|
|
79
79
|
self._movement = movement
|
|
80
80
|
|
|
81
|
-
async def execute(self, params:
|
|
82
|
-
"""Move to and dispense to the requested well."""
|
|
81
|
+
async def execute(self, params: PressureDispenseParams) -> _ExecuteReturn:
|
|
82
|
+
"""Move to and pressure dispense to the requested well."""
|
|
83
83
|
well_location = params.wellLocation
|
|
84
84
|
labware_id = params.labwareId
|
|
85
85
|
well_name = params.wellName
|
|
@@ -121,35 +121,35 @@ class EvotipDispenseImplementation(
|
|
|
121
121
|
message="Overpressure Error during Resin Tip Dispense Command."
|
|
122
122
|
)
|
|
123
123
|
return SuccessData(
|
|
124
|
-
public=
|
|
124
|
+
public=PressureDispenseResult(volume=result.public.volume),
|
|
125
125
|
state_update=StateUpdate.reduce(
|
|
126
126
|
move_result.state_update, result.state_update
|
|
127
127
|
),
|
|
128
128
|
)
|
|
129
129
|
|
|
130
130
|
|
|
131
|
-
class
|
|
131
|
+
class PressureDispense(
|
|
132
132
|
BaseCommand[
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
PressureDispenseParams,
|
|
134
|
+
PressureDispenseResult,
|
|
135
135
|
StallOrCollisionError,
|
|
136
136
|
]
|
|
137
137
|
):
|
|
138
|
-
"""
|
|
138
|
+
"""PressureDispense command model."""
|
|
139
139
|
|
|
140
|
-
commandType:
|
|
141
|
-
params:
|
|
142
|
-
result: Optional[
|
|
140
|
+
commandType: PressureDispenseCommandType = "pressureDispense"
|
|
141
|
+
params: PressureDispenseParams
|
|
142
|
+
result: Optional[PressureDispenseResult] = None
|
|
143
143
|
|
|
144
144
|
_ImplementationCls: Type[
|
|
145
|
-
|
|
146
|
-
] =
|
|
145
|
+
PressureDispenseImplementation
|
|
146
|
+
] = PressureDispenseImplementation
|
|
147
147
|
|
|
148
148
|
|
|
149
|
-
class
|
|
150
|
-
"""
|
|
149
|
+
class PressureDispenseCreate(BaseCommandCreate[PressureDispenseParams]):
|
|
150
|
+
"""PressureDispense command request model."""
|
|
151
151
|
|
|
152
|
-
commandType:
|
|
153
|
-
params:
|
|
152
|
+
commandType: PressureDispenseCommandType = "pressureDispense"
|
|
153
|
+
params: PressureDispenseParams
|
|
154
154
|
|
|
155
|
-
_CommandCls: Type[
|
|
155
|
+
_CommandCls: Type[PressureDispense] = PressureDispense
|