opentrons 8.2.0a4__py2.py3-none-any.whl → 8.3.0__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.
- opentrons/calibration_storage/deck_configuration.py +3 -3
- opentrons/calibration_storage/file_operators.py +3 -3
- opentrons/calibration_storage/helpers.py +3 -1
- opentrons/calibration_storage/ot2/models/v1.py +16 -29
- opentrons/calibration_storage/ot2/tip_length.py +7 -4
- opentrons/calibration_storage/ot3/models/v1.py +14 -23
- opentrons/cli/analyze.py +18 -6
- opentrons/config/defaults_ot3.py +1 -0
- opentrons/drivers/asyncio/communication/__init__.py +2 -0
- opentrons/drivers/asyncio/communication/errors.py +16 -3
- opentrons/drivers/asyncio/communication/serial_connection.py +24 -9
- opentrons/drivers/command_builder.py +2 -2
- opentrons/drivers/flex_stacker/__init__.py +9 -0
- opentrons/drivers/flex_stacker/abstract.py +89 -0
- opentrons/drivers/flex_stacker/driver.py +260 -0
- opentrons/drivers/flex_stacker/simulator.py +109 -0
- opentrons/drivers/flex_stacker/types.py +138 -0
- opentrons/drivers/heater_shaker/driver.py +18 -3
- opentrons/drivers/temp_deck/driver.py +13 -3
- opentrons/drivers/thermocycler/driver.py +17 -3
- opentrons/execute.py +3 -1
- opentrons/hardware_control/__init__.py +1 -2
- opentrons/hardware_control/api.py +33 -21
- opentrons/hardware_control/backends/flex_protocol.py +17 -7
- opentrons/hardware_control/backends/ot3controller.py +213 -63
- opentrons/hardware_control/backends/ot3simulator.py +18 -9
- opentrons/hardware_control/backends/ot3utils.py +43 -15
- opentrons/hardware_control/dev_types.py +4 -0
- opentrons/hardware_control/emulation/heater_shaker.py +4 -0
- opentrons/hardware_control/emulation/module_server/client.py +1 -1
- opentrons/hardware_control/emulation/module_server/server.py +5 -3
- opentrons/hardware_control/emulation/settings.py +3 -4
- opentrons/hardware_control/instruments/ot2/instrument_calibration.py +2 -1
- opentrons/hardware_control/instruments/ot2/pipette.py +15 -22
- opentrons/hardware_control/instruments/ot2/pipette_handler.py +8 -1
- opentrons/hardware_control/instruments/ot3/gripper.py +2 -2
- opentrons/hardware_control/instruments/ot3/pipette.py +23 -22
- opentrons/hardware_control/instruments/ot3/pipette_handler.py +10 -1
- opentrons/hardware_control/modules/mod_abc.py +2 -2
- opentrons/hardware_control/motion_utilities.py +68 -0
- opentrons/hardware_control/nozzle_manager.py +39 -41
- opentrons/hardware_control/ot3_calibration.py +1 -1
- opentrons/hardware_control/ot3api.py +78 -31
- opentrons/hardware_control/protocols/gripper_controller.py +3 -0
- opentrons/hardware_control/protocols/hardware_manager.py +5 -1
- opentrons/hardware_control/protocols/liquid_handler.py +22 -1
- opentrons/hardware_control/protocols/motion_controller.py +7 -0
- opentrons/hardware_control/robot_calibration.py +1 -1
- opentrons/hardware_control/types.py +61 -0
- opentrons/legacy_commands/commands.py +37 -0
- opentrons/legacy_commands/types.py +39 -0
- opentrons/protocol_api/__init__.py +20 -1
- opentrons/protocol_api/_liquid.py +24 -49
- opentrons/protocol_api/_liquid_properties.py +754 -0
- opentrons/protocol_api/_types.py +24 -0
- opentrons/protocol_api/core/common.py +2 -0
- opentrons/protocol_api/core/engine/instrument.py +191 -10
- opentrons/protocol_api/core/engine/labware.py +29 -7
- opentrons/protocol_api/core/engine/protocol.py +130 -5
- opentrons/protocol_api/core/engine/robot.py +139 -0
- opentrons/protocol_api/core/engine/well.py +4 -1
- opentrons/protocol_api/core/instrument.py +73 -4
- opentrons/protocol_api/core/labware.py +13 -4
- opentrons/protocol_api/core/legacy/legacy_instrument_core.py +87 -3
- opentrons/protocol_api/core/legacy/legacy_labware_core.py +13 -4
- opentrons/protocol_api/core/legacy/legacy_protocol_core.py +32 -1
- opentrons/protocol_api/core/legacy/legacy_robot_core.py +0 -0
- opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py +61 -3
- opentrons/protocol_api/core/protocol.py +34 -1
- opentrons/protocol_api/core/robot.py +51 -0
- opentrons/protocol_api/instrument_context.py +299 -44
- opentrons/protocol_api/labware.py +248 -9
- opentrons/protocol_api/module_contexts.py +21 -17
- opentrons/protocol_api/protocol_context.py +125 -4
- opentrons/protocol_api/robot_context.py +204 -32
- opentrons/protocol_api/validation.py +262 -3
- opentrons/protocol_engine/__init__.py +4 -0
- opentrons/protocol_engine/actions/actions.py +2 -3
- opentrons/protocol_engine/clients/sync_client.py +18 -0
- opentrons/protocol_engine/commands/__init__.py +121 -0
- opentrons/protocol_engine/commands/absorbance_reader/close_lid.py +1 -3
- opentrons/protocol_engine/commands/absorbance_reader/initialize.py +20 -6
- opentrons/protocol_engine/commands/absorbance_reader/open_lid.py +1 -2
- opentrons/protocol_engine/commands/absorbance_reader/read.py +36 -10
- opentrons/protocol_engine/commands/air_gap_in_place.py +160 -0
- opentrons/protocol_engine/commands/aspirate.py +103 -53
- opentrons/protocol_engine/commands/aspirate_in_place.py +55 -51
- opentrons/protocol_engine/commands/blow_out.py +44 -39
- opentrons/protocol_engine/commands/blow_out_in_place.py +21 -32
- opentrons/protocol_engine/commands/calibration/calibrate_gripper.py +13 -6
- opentrons/protocol_engine/commands/calibration/calibrate_module.py +1 -1
- opentrons/protocol_engine/commands/calibration/calibrate_pipette.py +3 -3
- opentrons/protocol_engine/commands/calibration/move_to_maintenance_position.py +1 -1
- opentrons/protocol_engine/commands/command.py +73 -66
- opentrons/protocol_engine/commands/command_unions.py +140 -1
- opentrons/protocol_engine/commands/comment.py +1 -1
- opentrons/protocol_engine/commands/configure_for_volume.py +10 -3
- opentrons/protocol_engine/commands/configure_nozzle_layout.py +6 -4
- opentrons/protocol_engine/commands/custom.py +6 -12
- opentrons/protocol_engine/commands/dispense.py +82 -48
- opentrons/protocol_engine/commands/dispense_in_place.py +71 -51
- opentrons/protocol_engine/commands/drop_tip.py +52 -31
- opentrons/protocol_engine/commands/drop_tip_in_place.py +79 -8
- opentrons/protocol_engine/commands/evotip_dispense.py +156 -0
- opentrons/protocol_engine/commands/evotip_seal_pipette.py +331 -0
- opentrons/protocol_engine/commands/evotip_unseal_pipette.py +160 -0
- opentrons/protocol_engine/commands/generate_command_schema.py +4 -11
- opentrons/protocol_engine/commands/get_next_tip.py +134 -0
- opentrons/protocol_engine/commands/get_tip_presence.py +1 -1
- opentrons/protocol_engine/commands/heater_shaker/close_labware_latch.py +1 -1
- opentrons/protocol_engine/commands/heater_shaker/deactivate_heater.py +1 -1
- opentrons/protocol_engine/commands/heater_shaker/deactivate_shaker.py +1 -1
- opentrons/protocol_engine/commands/heater_shaker/open_labware_latch.py +1 -1
- opentrons/protocol_engine/commands/heater_shaker/set_and_wait_for_shake_speed.py +1 -1
- opentrons/protocol_engine/commands/heater_shaker/set_target_temperature.py +1 -1
- opentrons/protocol_engine/commands/heater_shaker/wait_for_temperature.py +10 -4
- opentrons/protocol_engine/commands/home.py +13 -4
- opentrons/protocol_engine/commands/liquid_probe.py +125 -31
- opentrons/protocol_engine/commands/load_labware.py +33 -6
- opentrons/protocol_engine/commands/load_lid.py +146 -0
- opentrons/protocol_engine/commands/load_lid_stack.py +189 -0
- opentrons/protocol_engine/commands/load_liquid.py +12 -4
- opentrons/protocol_engine/commands/load_liquid_class.py +144 -0
- opentrons/protocol_engine/commands/load_module.py +31 -10
- opentrons/protocol_engine/commands/load_pipette.py +19 -8
- opentrons/protocol_engine/commands/magnetic_module/disengage.py +1 -1
- opentrons/protocol_engine/commands/magnetic_module/engage.py +1 -1
- opentrons/protocol_engine/commands/move_labware.py +28 -6
- opentrons/protocol_engine/commands/move_relative.py +35 -25
- opentrons/protocol_engine/commands/move_to_addressable_area.py +40 -27
- opentrons/protocol_engine/commands/move_to_addressable_area_for_drop_tip.py +53 -32
- opentrons/protocol_engine/commands/move_to_coordinates.py +36 -22
- opentrons/protocol_engine/commands/move_to_well.py +40 -24
- opentrons/protocol_engine/commands/movement_common.py +338 -0
- opentrons/protocol_engine/commands/pick_up_tip.py +49 -27
- opentrons/protocol_engine/commands/pipetting_common.py +169 -87
- opentrons/protocol_engine/commands/prepare_to_aspirate.py +24 -33
- opentrons/protocol_engine/commands/reload_labware.py +1 -1
- opentrons/protocol_engine/commands/retract_axis.py +1 -1
- opentrons/protocol_engine/commands/robot/__init__.py +69 -0
- opentrons/protocol_engine/commands/robot/close_gripper_jaw.py +86 -0
- opentrons/protocol_engine/commands/robot/common.py +18 -0
- opentrons/protocol_engine/commands/robot/move_axes_relative.py +101 -0
- opentrons/protocol_engine/commands/robot/move_axes_to.py +100 -0
- opentrons/protocol_engine/commands/robot/move_to.py +94 -0
- opentrons/protocol_engine/commands/robot/open_gripper_jaw.py +77 -0
- opentrons/protocol_engine/commands/save_position.py +14 -5
- opentrons/protocol_engine/commands/set_rail_lights.py +1 -1
- opentrons/protocol_engine/commands/set_status_bar.py +1 -1
- opentrons/protocol_engine/commands/temperature_module/deactivate.py +1 -1
- opentrons/protocol_engine/commands/temperature_module/set_target_temperature.py +1 -1
- opentrons/protocol_engine/commands/temperature_module/wait_for_temperature.py +10 -4
- opentrons/protocol_engine/commands/thermocycler/close_lid.py +1 -1
- opentrons/protocol_engine/commands/thermocycler/deactivate_block.py +1 -1
- opentrons/protocol_engine/commands/thermocycler/deactivate_lid.py +1 -1
- opentrons/protocol_engine/commands/thermocycler/open_lid.py +1 -1
- opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py +9 -3
- opentrons/protocol_engine/commands/thermocycler/run_profile.py +9 -3
- opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py +11 -4
- opentrons/protocol_engine/commands/thermocycler/set_target_lid_temperature.py +1 -1
- opentrons/protocol_engine/commands/thermocycler/wait_for_block_temperature.py +1 -1
- opentrons/protocol_engine/commands/thermocycler/wait_for_lid_temperature.py +1 -1
- opentrons/protocol_engine/commands/touch_tip.py +65 -16
- opentrons/protocol_engine/commands/unsafe/unsafe_blow_out_in_place.py +5 -2
- opentrons/protocol_engine/commands/unsafe/unsafe_drop_tip_in_place.py +13 -4
- opentrons/protocol_engine/commands/unsafe/unsafe_engage_axes.py +2 -5
- opentrons/protocol_engine/commands/unsafe/unsafe_place_labware.py +1 -1
- opentrons/protocol_engine/commands/unsafe/unsafe_ungrip_labware.py +1 -1
- opentrons/protocol_engine/commands/unsafe/update_position_estimators.py +2 -5
- opentrons/protocol_engine/commands/verify_tip_presence.py +11 -4
- opentrons/protocol_engine/commands/wait_for_duration.py +10 -3
- opentrons/protocol_engine/commands/wait_for_resume.py +10 -3
- opentrons/protocol_engine/errors/__init__.py +12 -0
- opentrons/protocol_engine/errors/error_occurrence.py +19 -20
- opentrons/protocol_engine/errors/exceptions.py +76 -0
- opentrons/protocol_engine/execution/command_executor.py +1 -1
- opentrons/protocol_engine/execution/equipment.py +73 -5
- opentrons/protocol_engine/execution/gantry_mover.py +369 -8
- opentrons/protocol_engine/execution/hardware_stopper.py +7 -7
- opentrons/protocol_engine/execution/movement.py +27 -0
- opentrons/protocol_engine/execution/pipetting.py +5 -1
- opentrons/protocol_engine/execution/tip_handler.py +34 -15
- opentrons/protocol_engine/notes/notes.py +1 -1
- opentrons/protocol_engine/protocol_engine.py +7 -6
- opentrons/protocol_engine/resources/labware_data_provider.py +1 -1
- opentrons/protocol_engine/resources/labware_validation.py +18 -0
- opentrons/protocol_engine/resources/module_data_provider.py +1 -1
- opentrons/protocol_engine/resources/pipette_data_provider.py +26 -0
- opentrons/protocol_engine/slot_standardization.py +9 -9
- opentrons/protocol_engine/state/_move_types.py +9 -5
- opentrons/protocol_engine/state/_well_math.py +193 -0
- opentrons/protocol_engine/state/addressable_areas.py +25 -61
- opentrons/protocol_engine/state/command_history.py +12 -0
- opentrons/protocol_engine/state/commands.py +22 -14
- opentrons/protocol_engine/state/files.py +10 -12
- opentrons/protocol_engine/state/fluid_stack.py +138 -0
- opentrons/protocol_engine/state/frustum_helpers.py +63 -69
- opentrons/protocol_engine/state/geometry.py +47 -1
- opentrons/protocol_engine/state/labware.py +92 -26
- opentrons/protocol_engine/state/liquid_classes.py +82 -0
- opentrons/protocol_engine/state/liquids.py +16 -4
- opentrons/protocol_engine/state/modules.py +52 -70
- opentrons/protocol_engine/state/motion.py +6 -1
- opentrons/protocol_engine/state/pipettes.py +149 -58
- opentrons/protocol_engine/state/state.py +21 -2
- opentrons/protocol_engine/state/state_summary.py +4 -2
- opentrons/protocol_engine/state/tips.py +11 -44
- opentrons/protocol_engine/state/update_types.py +343 -48
- opentrons/protocol_engine/state/wells.py +19 -11
- opentrons/protocol_engine/types.py +176 -28
- opentrons/protocol_reader/extract_labware_definitions.py +5 -2
- opentrons/protocol_reader/file_format_validator.py +5 -5
- opentrons/protocol_runner/json_file_reader.py +9 -3
- opentrons/protocol_runner/json_translator.py +51 -25
- opentrons/protocol_runner/legacy_command_mapper.py +66 -64
- opentrons/protocol_runner/protocol_runner.py +35 -4
- opentrons/protocol_runner/python_protocol_wrappers.py +1 -1
- opentrons/protocol_runner/run_orchestrator.py +13 -3
- opentrons/protocols/advanced_control/common.py +38 -0
- opentrons/protocols/advanced_control/mix.py +1 -1
- opentrons/protocols/advanced_control/transfers/__init__.py +0 -0
- opentrons/protocols/advanced_control/transfers/common.py +56 -0
- opentrons/protocols/advanced_control/{transfers.py → transfers/transfer.py} +10 -85
- opentrons/protocols/api_support/definitions.py +1 -1
- opentrons/protocols/api_support/instrument.py +1 -1
- opentrons/protocols/api_support/util.py +10 -0
- opentrons/protocols/labware.py +70 -8
- opentrons/protocols/models/json_protocol.py +5 -9
- opentrons/simulate.py +3 -1
- opentrons/types.py +162 -2
- opentrons/util/entrypoint_util.py +2 -5
- opentrons/util/logging_config.py +1 -1
- {opentrons-8.2.0a4.dist-info → opentrons-8.3.0.dist-info}/METADATA +16 -15
- {opentrons-8.2.0a4.dist-info → opentrons-8.3.0.dist-info}/RECORD +238 -208
- {opentrons-8.2.0a4.dist-info → opentrons-8.3.0.dist-info}/WHEEL +1 -1
- {opentrons-8.2.0a4.dist-info → opentrons-8.3.0.dist-info}/LICENSE +0 -0
- {opentrons-8.2.0a4.dist-info → opentrons-8.3.0.dist-info}/entry_points.txt +0 -0
- {opentrons-8.2.0a4.dist-info → opentrons-8.3.0.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from asyncio import Queue
|
|
1
2
|
import enum
|
|
2
3
|
import logging
|
|
3
4
|
from dataclasses import dataclass
|
|
@@ -712,3 +713,63 @@ class FailedTipStateCheck(RuntimeError):
|
|
|
712
713
|
super().__init__(
|
|
713
714
|
f"Expected tip state {expected_state}, but received {actual_state}."
|
|
714
715
|
)
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
@enum.unique
|
|
719
|
+
class PipetteSensorId(int, enum.Enum):
|
|
720
|
+
"""Sensor IDs available.
|
|
721
|
+
|
|
722
|
+
Not to be confused with SensorType. This is the ID value that separate
|
|
723
|
+
two or more of the same type of sensor within a system.
|
|
724
|
+
|
|
725
|
+
Note that this is a copy of an enum defined in opentrons_hardware.firmware_bindings.constants. That version
|
|
726
|
+
is authoritative; this version is here because this data is exposed above the hardware control layer and
|
|
727
|
+
therefore needs a typing source here so that we don't create a dependency on the internal hardware package.
|
|
728
|
+
"""
|
|
729
|
+
|
|
730
|
+
S0 = 0x0
|
|
731
|
+
S1 = 0x1
|
|
732
|
+
UNUSED = 0x2
|
|
733
|
+
BOTH = 0x3
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
@enum.unique
|
|
737
|
+
class PipetteSensorType(int, enum.Enum):
|
|
738
|
+
"""Sensor types available.
|
|
739
|
+
|
|
740
|
+
Note that this is a copy of an enum defined in opentrons_hardware.firmware_bindings.constants. That version
|
|
741
|
+
is authoritative; this version is here because this data is exposed above the hardware control layer and
|
|
742
|
+
therefore needs a typing source here so that we don't create a dependency on the internal hardware package.
|
|
743
|
+
"""
|
|
744
|
+
|
|
745
|
+
tip = 0x00
|
|
746
|
+
capacitive = 0x01
|
|
747
|
+
environment = 0x02
|
|
748
|
+
pressure = 0x03
|
|
749
|
+
pressure_temperature = 0x04
|
|
750
|
+
humidity = 0x05
|
|
751
|
+
temperature = 0x06
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
@dataclass(frozen=True)
|
|
755
|
+
class PipetteSensorData:
|
|
756
|
+
"""Sensor data from a monitored sensor.
|
|
757
|
+
|
|
758
|
+
Note that this is a copy of an enum defined in opentrons_hardware.firmware_bindings.constants. That version
|
|
759
|
+
is authoritative; this version is here because this data is exposed above the hardware control layer and
|
|
760
|
+
therefore needs a typing source here so that we don't create a dependency on the internal hardware package.
|
|
761
|
+
"""
|
|
762
|
+
|
|
763
|
+
sensor_type: PipetteSensorType
|
|
764
|
+
_as_int: int
|
|
765
|
+
_as_float: float
|
|
766
|
+
|
|
767
|
+
def to_float(self) -> float:
|
|
768
|
+
return self._as_float
|
|
769
|
+
|
|
770
|
+
@property
|
|
771
|
+
def to_int(self) -> int:
|
|
772
|
+
return self._as_int
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
PipetteSensorResponseQueue = Queue[Dict[PipetteSensorId, List[PipetteSensorData]]]
|
|
@@ -299,3 +299,40 @@ def move_to_disposal_location(
|
|
|
299
299
|
"name": command_types.MOVE_TO_DISPOSAL_LOCATION,
|
|
300
300
|
"payload": {"instrument": instrument, "location": location, "text": text},
|
|
301
301
|
}
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
def seal(
|
|
305
|
+
instrument: InstrumentContext,
|
|
306
|
+
location: Well,
|
|
307
|
+
) -> command_types.SealCommand:
|
|
308
|
+
location_text = stringify_location(location)
|
|
309
|
+
text = f"Sealing to {location_text}"
|
|
310
|
+
return {
|
|
311
|
+
"name": command_types.SEAL,
|
|
312
|
+
"payload": {"instrument": instrument, "location": location, "text": text},
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
def unseal(
|
|
317
|
+
instrument: InstrumentContext,
|
|
318
|
+
location: Well,
|
|
319
|
+
) -> command_types.UnsealCommand:
|
|
320
|
+
location_text = stringify_location(location)
|
|
321
|
+
text = f"Unsealing from {location_text}"
|
|
322
|
+
return {
|
|
323
|
+
"name": command_types.UNSEAL,
|
|
324
|
+
"payload": {"instrument": instrument, "location": location, "text": text},
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
def resin_tip_dispense(
|
|
329
|
+
instrument: InstrumentContext,
|
|
330
|
+
flow_rate: float | None,
|
|
331
|
+
) -> command_types.PressurizeCommand:
|
|
332
|
+
if flow_rate is None:
|
|
333
|
+
flow_rate = 10 # The Protocol Engine default for Resin Tip Dispense
|
|
334
|
+
text = f"Pressurize pipette to dispense from resin tip at {flow_rate}uL/s."
|
|
335
|
+
return {
|
|
336
|
+
"name": command_types.PRESSURIZE,
|
|
337
|
+
"payload": {"instrument": instrument, "text": text},
|
|
338
|
+
}
|
|
@@ -43,6 +43,10 @@ TOUCH_TIP: Final = "command.TOUCH_TIP"
|
|
|
43
43
|
RETURN_TIP: Final = "command.RETURN_TIP"
|
|
44
44
|
MOVE_TO: Final = "command.MOVE_TO"
|
|
45
45
|
MOVE_TO_DISPOSAL_LOCATION: Final = "command.MOVE_TO_DISPOSAL_LOCATION"
|
|
46
|
+
SEAL: Final = "command.SEAL"
|
|
47
|
+
UNSEAL: Final = "command.UNSEAL"
|
|
48
|
+
PRESSURIZE: Final = "command.PRESSURIZE"
|
|
49
|
+
|
|
46
50
|
|
|
47
51
|
# Modules #
|
|
48
52
|
|
|
@@ -535,11 +539,40 @@ class MoveLabwareCommandPayload(TextOnlyPayload):
|
|
|
535
539
|
pass
|
|
536
540
|
|
|
537
541
|
|
|
542
|
+
class SealCommandPayload(TextOnlyPayload):
|
|
543
|
+
instrument: InstrumentContext
|
|
544
|
+
location: Union[None, Location, Well]
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
class UnsealCommandPayload(TextOnlyPayload):
|
|
548
|
+
instrument: InstrumentContext
|
|
549
|
+
location: Union[None, Location, Well]
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
class PressurizeCommandPayload(TextOnlyPayload):
|
|
553
|
+
instrument: InstrumentContext
|
|
554
|
+
|
|
555
|
+
|
|
538
556
|
class MoveLabwareCommand(TypedDict):
|
|
539
557
|
name: Literal["command.MOVE_LABWARE"]
|
|
540
558
|
payload: MoveLabwareCommandPayload
|
|
541
559
|
|
|
542
560
|
|
|
561
|
+
class SealCommand(TypedDict):
|
|
562
|
+
name: Literal["command.SEAL"]
|
|
563
|
+
payload: SealCommandPayload
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
class UnsealCommand(TypedDict):
|
|
567
|
+
name: Literal["command.UNSEAL"]
|
|
568
|
+
payload: UnsealCommandPayload
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
class PressurizeCommand(TypedDict):
|
|
572
|
+
name: Literal["command.PRESSURIZE"]
|
|
573
|
+
payload: PressurizeCommandPayload
|
|
574
|
+
|
|
575
|
+
|
|
543
576
|
Command = Union[
|
|
544
577
|
DropTipCommand,
|
|
545
578
|
DropTipInDisposalLocationCommand,
|
|
@@ -588,6 +621,9 @@ Command = Union[
|
|
|
588
621
|
MoveToCommand,
|
|
589
622
|
MoveToDisposalLocationCommand,
|
|
590
623
|
MoveLabwareCommand,
|
|
624
|
+
SealCommand,
|
|
625
|
+
UnsealCommand,
|
|
626
|
+
PressurizeCommand,
|
|
591
627
|
]
|
|
592
628
|
|
|
593
629
|
|
|
@@ -637,6 +673,9 @@ CommandPayload = Union[
|
|
|
637
673
|
MoveToCommandPayload,
|
|
638
674
|
MoveToDisposalLocationCommandPayload,
|
|
639
675
|
MoveLabwareCommandPayload,
|
|
676
|
+
SealCommandPayload,
|
|
677
|
+
UnsealCommandPayload,
|
|
678
|
+
PressurizeCommandPayload,
|
|
640
679
|
]
|
|
641
680
|
|
|
642
681
|
|
|
@@ -30,7 +30,16 @@ from .module_contexts import (
|
|
|
30
30
|
)
|
|
31
31
|
from .disposal_locations import TrashBin, WasteChute
|
|
32
32
|
from ._liquid import Liquid, LiquidClass
|
|
33
|
-
from ._types import
|
|
33
|
+
from ._types import (
|
|
34
|
+
OFF_DECK,
|
|
35
|
+
PLUNGER_BLOWOUT,
|
|
36
|
+
PLUNGER_TOP,
|
|
37
|
+
PLUNGER_BOTTOM,
|
|
38
|
+
PLUNGER_DROPTIP,
|
|
39
|
+
ASPIRATE_ACTION,
|
|
40
|
+
DISPENSE_ACTION,
|
|
41
|
+
BLOWOUT_ACTION,
|
|
42
|
+
)
|
|
34
43
|
from ._nozzle_layout import (
|
|
35
44
|
COLUMN,
|
|
36
45
|
PARTIAL_COLUMN,
|
|
@@ -69,12 +78,22 @@ __all__ = [
|
|
|
69
78
|
"Liquid",
|
|
70
79
|
"LiquidClass",
|
|
71
80
|
"Parameters",
|
|
81
|
+
# Partial Tip types
|
|
72
82
|
"COLUMN",
|
|
73
83
|
"PARTIAL_COLUMN",
|
|
74
84
|
"SINGLE",
|
|
75
85
|
"ROW",
|
|
76
86
|
"ALL",
|
|
87
|
+
# Deck location types
|
|
77
88
|
"OFF_DECK",
|
|
89
|
+
# Pipette plunger types
|
|
90
|
+
"PLUNGER_BLOWOUT",
|
|
91
|
+
"PLUNGER_TOP",
|
|
92
|
+
"PLUNGER_BOTTOM",
|
|
93
|
+
"PLUNGER_DROPTIP",
|
|
94
|
+
"ASPIRATE_ACTION",
|
|
95
|
+
"DISPENSE_ACTION",
|
|
96
|
+
"BLOWOUT_ACTION",
|
|
78
97
|
"RuntimeParameterRequiredError",
|
|
79
98
|
"CSVParameter",
|
|
80
99
|
# For internal Opentrons use only:
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
from dataclasses import dataclass
|
|
2
|
-
from typing import Optional,
|
|
4
|
+
from typing import Optional, Dict
|
|
3
5
|
|
|
4
6
|
from opentrons_shared_data.liquid_classes.liquid_class_definition import (
|
|
5
7
|
LiquidClassSchemaV1,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
from ._liquid_properties import (
|
|
11
|
+
TransferProperties,
|
|
12
|
+
build_transfer_properties,
|
|
11
13
|
)
|
|
12
14
|
|
|
13
15
|
|
|
@@ -29,46 +31,29 @@ class Liquid:
|
|
|
29
31
|
display_color: Optional[str]
|
|
30
32
|
|
|
31
33
|
|
|
32
|
-
# TODO (spp, 2024-10-17): create PAPI-equivalent types for all the properties
|
|
33
|
-
# and have validation on value updates with user-facing error messages
|
|
34
|
-
@dataclass
|
|
35
|
-
class TransferProperties:
|
|
36
|
-
_aspirate: AspirateProperties
|
|
37
|
-
_dispense: SingleDispenseProperties
|
|
38
|
-
_multi_dispense: Optional[MultiDispenseProperties]
|
|
39
|
-
|
|
40
|
-
@property
|
|
41
|
-
def aspirate(self) -> AspirateProperties:
|
|
42
|
-
"""Aspirate properties."""
|
|
43
|
-
return self._aspirate
|
|
44
|
-
|
|
45
|
-
@property
|
|
46
|
-
def dispense(self) -> SingleDispenseProperties:
|
|
47
|
-
"""Single dispense properties."""
|
|
48
|
-
return self._dispense
|
|
49
|
-
|
|
50
|
-
@property
|
|
51
|
-
def multi_dispense(self) -> Optional[MultiDispenseProperties]:
|
|
52
|
-
"""Multi dispense properties."""
|
|
53
|
-
return self._multi_dispense
|
|
54
|
-
|
|
55
|
-
|
|
56
34
|
@dataclass
|
|
57
35
|
class LiquidClass:
|
|
58
36
|
"""A data class that contains properties of a specific class of liquids."""
|
|
59
37
|
|
|
60
38
|
_name: str
|
|
61
39
|
_display_name: str
|
|
62
|
-
_by_pipette_setting:
|
|
40
|
+
_by_pipette_setting: Dict[str, Dict[str, TransferProperties]]
|
|
63
41
|
|
|
64
42
|
@classmethod
|
|
65
43
|
def create(cls, liquid_class_definition: LiquidClassSchemaV1) -> "LiquidClass":
|
|
66
44
|
"""Liquid class factory method."""
|
|
67
45
|
|
|
46
|
+
by_pipette_settings: Dict[str, Dict[str, TransferProperties]] = {}
|
|
47
|
+
for by_pipette in liquid_class_definition.byPipette:
|
|
48
|
+
tip_settings: Dict[str, TransferProperties] = {}
|
|
49
|
+
for tip_type in by_pipette.byTipType:
|
|
50
|
+
tip_settings[tip_type.tiprack] = build_transfer_properties(tip_type)
|
|
51
|
+
by_pipette_settings[by_pipette.pipetteModel] = tip_settings
|
|
52
|
+
|
|
68
53
|
return cls(
|
|
69
54
|
_name=liquid_class_definition.liquidClassName,
|
|
70
55
|
_display_name=liquid_class_definition.displayName,
|
|
71
|
-
_by_pipette_setting=
|
|
56
|
+
_by_pipette_setting=by_pipette_settings,
|
|
72
57
|
)
|
|
73
58
|
|
|
74
59
|
@property
|
|
@@ -81,26 +66,16 @@ class LiquidClass:
|
|
|
81
66
|
|
|
82
67
|
def get_for(self, pipette: str, tiprack: str) -> TransferProperties:
|
|
83
68
|
"""Get liquid class transfer properties for the specified pipette and tip."""
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if pip_setting.pipetteModel == pipette
|
|
88
|
-
]
|
|
89
|
-
if len(settings_for_pipette) == 0:
|
|
69
|
+
try:
|
|
70
|
+
settings_for_pipette = self._by_pipette_setting[pipette]
|
|
71
|
+
except KeyError:
|
|
90
72
|
raise ValueError(
|
|
91
73
|
f"No properties found for {pipette} in {self._name} liquid class"
|
|
92
74
|
)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if tip_setting.tiprack == tiprack
|
|
97
|
-
]
|
|
98
|
-
if len(settings_for_tip) == 0:
|
|
75
|
+
try:
|
|
76
|
+
transfer_properties = settings_for_pipette[tiprack]
|
|
77
|
+
except KeyError:
|
|
99
78
|
raise ValueError(
|
|
100
79
|
f"No properties found for {tiprack} in {self._name} liquid class"
|
|
101
80
|
)
|
|
102
|
-
return
|
|
103
|
-
_aspirate=settings_for_tip[0].aspirate,
|
|
104
|
-
_dispense=settings_for_tip[0].singleDispense,
|
|
105
|
-
_multi_dispense=settings_for_tip[0].multiDispense,
|
|
106
|
-
)
|
|
81
|
+
return transfer_properties
|