opentrons 8.3.2__py2.py3-none-any.whl → 8.4.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.
Potentially problematic release.
This version of opentrons might be problematic. Click here for more details.
- opentrons/calibration_storage/ot2/mark_bad_calibration.py +2 -0
- opentrons/calibration_storage/ot2/tip_length.py +6 -6
- opentrons/config/advanced_settings.py +9 -11
- opentrons/config/feature_flags.py +0 -4
- opentrons/config/reset.py +7 -2
- opentrons/drivers/asyncio/communication/__init__.py +2 -0
- opentrons/drivers/asyncio/communication/async_serial.py +4 -0
- opentrons/drivers/asyncio/communication/errors.py +41 -8
- opentrons/drivers/asyncio/communication/serial_connection.py +36 -10
- opentrons/drivers/flex_stacker/__init__.py +9 -3
- opentrons/drivers/flex_stacker/abstract.py +140 -15
- opentrons/drivers/flex_stacker/driver.py +593 -47
- opentrons/drivers/flex_stacker/errors.py +64 -0
- opentrons/drivers/flex_stacker/simulator.py +222 -24
- opentrons/drivers/flex_stacker/types.py +211 -15
- opentrons/drivers/flex_stacker/utils.py +19 -0
- opentrons/execute.py +4 -2
- opentrons/hardware_control/api.py +5 -0
- opentrons/hardware_control/backends/flex_protocol.py +4 -0
- opentrons/hardware_control/backends/ot3controller.py +12 -1
- opentrons/hardware_control/backends/ot3simulator.py +3 -0
- opentrons/hardware_control/backends/subsystem_manager.py +8 -4
- opentrons/hardware_control/instruments/ot2/instrument_calibration.py +10 -6
- opentrons/hardware_control/instruments/ot3/pipette_handler.py +59 -6
- opentrons/hardware_control/modules/__init__.py +12 -1
- opentrons/hardware_control/modules/absorbance_reader.py +11 -9
- opentrons/hardware_control/modules/flex_stacker.py +498 -0
- opentrons/hardware_control/modules/heater_shaker.py +12 -10
- opentrons/hardware_control/modules/magdeck.py +5 -1
- opentrons/hardware_control/modules/tempdeck.py +5 -1
- opentrons/hardware_control/modules/thermocycler.py +15 -14
- opentrons/hardware_control/modules/types.py +191 -1
- opentrons/hardware_control/modules/utils.py +3 -0
- opentrons/hardware_control/motion_utilities.py +20 -0
- opentrons/hardware_control/ot3api.py +145 -15
- opentrons/hardware_control/protocols/liquid_handler.py +47 -1
- opentrons/hardware_control/types.py +6 -0
- opentrons/legacy_commands/commands.py +102 -5
- opentrons/legacy_commands/helpers.py +74 -1
- opentrons/legacy_commands/types.py +33 -2
- opentrons/protocol_api/__init__.py +2 -0
- opentrons/protocol_api/_liquid.py +39 -8
- opentrons/protocol_api/_liquid_properties.py +20 -19
- opentrons/protocol_api/_transfer_liquid_validation.py +91 -0
- opentrons/protocol_api/core/common.py +3 -1
- opentrons/protocol_api/core/engine/deck_conflict.py +11 -1
- opentrons/protocol_api/core/engine/instrument.py +1356 -107
- opentrons/protocol_api/core/engine/labware.py +8 -4
- opentrons/protocol_api/core/engine/load_labware_params.py +68 -10
- opentrons/protocol_api/core/engine/module_core.py +118 -2
- opentrons/protocol_api/core/engine/pipette_movement_conflict.py +6 -14
- opentrons/protocol_api/core/engine/protocol.py +253 -11
- opentrons/protocol_api/core/engine/stringify.py +19 -8
- opentrons/protocol_api/core/engine/transfer_components_executor.py +858 -0
- opentrons/protocol_api/core/engine/well.py +73 -5
- opentrons/protocol_api/core/instrument.py +71 -21
- opentrons/protocol_api/core/labware.py +6 -2
- opentrons/protocol_api/core/legacy/labware_offset_provider.py +7 -3
- opentrons/protocol_api/core/legacy/legacy_instrument_core.py +76 -49
- opentrons/protocol_api/core/legacy/legacy_labware_core.py +8 -4
- opentrons/protocol_api/core/legacy/legacy_protocol_core.py +36 -0
- opentrons/protocol_api/core/legacy/legacy_well_core.py +27 -2
- opentrons/protocol_api/core/legacy/load_info.py +4 -12
- opentrons/protocol_api/core/legacy/module_geometry.py +6 -1
- opentrons/protocol_api/core/legacy/well_geometry.py +3 -3
- opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py +73 -23
- opentrons/protocol_api/core/module.py +43 -0
- opentrons/protocol_api/core/protocol.py +33 -0
- opentrons/protocol_api/core/well.py +23 -2
- opentrons/protocol_api/instrument_context.py +454 -150
- opentrons/protocol_api/labware.py +98 -50
- opentrons/protocol_api/module_contexts.py +140 -0
- opentrons/protocol_api/protocol_context.py +163 -19
- opentrons/protocol_api/validation.py +51 -41
- opentrons/protocol_engine/__init__.py +21 -2
- opentrons/protocol_engine/actions/actions.py +5 -5
- opentrons/protocol_engine/clients/sync_client.py +6 -0
- opentrons/protocol_engine/commands/__init__.py +66 -36
- opentrons/protocol_engine/commands/absorbance_reader/__init__.py +0 -1
- opentrons/protocol_engine/commands/air_gap_in_place.py +3 -2
- opentrons/protocol_engine/commands/aspirate.py +6 -2
- opentrons/protocol_engine/commands/aspirate_in_place.py +3 -1
- opentrons/protocol_engine/commands/aspirate_while_tracking.py +210 -0
- opentrons/protocol_engine/commands/blow_out.py +2 -0
- opentrons/protocol_engine/commands/blow_out_in_place.py +4 -1
- opentrons/protocol_engine/commands/command_unions.py +102 -33
- opentrons/protocol_engine/commands/configure_for_volume.py +3 -0
- opentrons/protocol_engine/commands/dispense.py +3 -1
- opentrons/protocol_engine/commands/dispense_in_place.py +3 -0
- opentrons/protocol_engine/commands/dispense_while_tracking.py +204 -0
- opentrons/protocol_engine/commands/drop_tip.py +23 -1
- opentrons/protocol_engine/commands/flex_stacker/__init__.py +106 -0
- opentrons/protocol_engine/commands/flex_stacker/close_latch.py +72 -0
- opentrons/protocol_engine/commands/flex_stacker/common.py +15 -0
- opentrons/protocol_engine/commands/flex_stacker/empty.py +161 -0
- opentrons/protocol_engine/commands/flex_stacker/fill.py +164 -0
- opentrons/protocol_engine/commands/flex_stacker/open_latch.py +70 -0
- opentrons/protocol_engine/commands/flex_stacker/prepare_shuttle.py +112 -0
- opentrons/protocol_engine/commands/flex_stacker/retrieve.py +394 -0
- opentrons/protocol_engine/commands/flex_stacker/set_stored_labware.py +190 -0
- opentrons/protocol_engine/commands/flex_stacker/store.py +291 -0
- opentrons/protocol_engine/commands/generate_command_schema.py +31 -2
- opentrons/protocol_engine/commands/labware_handling_common.py +29 -0
- opentrons/protocol_engine/commands/liquid_probe.py +27 -13
- opentrons/protocol_engine/commands/load_labware.py +42 -39
- opentrons/protocol_engine/commands/load_lid.py +21 -13
- opentrons/protocol_engine/commands/load_lid_stack.py +130 -47
- opentrons/protocol_engine/commands/load_module.py +18 -17
- opentrons/protocol_engine/commands/load_pipette.py +3 -0
- opentrons/protocol_engine/commands/move_labware.py +139 -20
- opentrons/protocol_engine/commands/move_to_well.py +5 -11
- opentrons/protocol_engine/commands/pick_up_tip.py +5 -2
- opentrons/protocol_engine/commands/pipetting_common.py +159 -8
- opentrons/protocol_engine/commands/prepare_to_aspirate.py +15 -5
- opentrons/protocol_engine/commands/{evotip_dispense.py → pressure_dispense.py} +33 -34
- opentrons/protocol_engine/commands/reload_labware.py +6 -19
- opentrons/protocol_engine/commands/{evotip_seal_pipette.py → seal_pipette_to_tip.py} +97 -76
- opentrons/protocol_engine/commands/unsafe/unsafe_blow_out_in_place.py +3 -1
- opentrons/protocol_engine/commands/unsafe/unsafe_drop_tip_in_place.py +6 -1
- opentrons/protocol_engine/commands/{evotip_unseal_pipette.py → unseal_pipette_from_tip.py} +31 -40
- opentrons/protocol_engine/errors/__init__.py +10 -0
- opentrons/protocol_engine/errors/exceptions.py +62 -0
- opentrons/protocol_engine/execution/equipment.py +123 -106
- opentrons/protocol_engine/execution/labware_movement.py +8 -6
- opentrons/protocol_engine/execution/pipetting.py +235 -25
- opentrons/protocol_engine/execution/tip_handler.py +82 -32
- opentrons/protocol_engine/labware_offset_standardization.py +194 -0
- opentrons/protocol_engine/protocol_engine.py +22 -13
- opentrons/protocol_engine/resources/deck_configuration_provider.py +98 -2
- opentrons/protocol_engine/resources/deck_data_provider.py +1 -1
- opentrons/protocol_engine/resources/labware_data_provider.py +32 -12
- opentrons/protocol_engine/resources/labware_validation.py +7 -5
- opentrons/protocol_engine/slot_standardization.py +11 -23
- opentrons/protocol_engine/state/addressable_areas.py +84 -46
- opentrons/protocol_engine/state/frustum_helpers.py +36 -14
- opentrons/protocol_engine/state/geometry.py +892 -227
- opentrons/protocol_engine/state/labware.py +252 -55
- opentrons/protocol_engine/state/module_substates/__init__.py +4 -0
- opentrons/protocol_engine/state/module_substates/flex_stacker_substate.py +68 -0
- opentrons/protocol_engine/state/module_substates/heater_shaker_module_substate.py +22 -0
- opentrons/protocol_engine/state/module_substates/temperature_module_substate.py +13 -0
- opentrons/protocol_engine/state/module_substates/thermocycler_module_substate.py +20 -0
- opentrons/protocol_engine/state/modules.py +210 -67
- opentrons/protocol_engine/state/pipettes.py +54 -0
- opentrons/protocol_engine/state/state.py +1 -1
- opentrons/protocol_engine/state/tips.py +14 -0
- opentrons/protocol_engine/state/update_types.py +180 -25
- opentrons/protocol_engine/state/wells.py +55 -9
- opentrons/protocol_engine/types/__init__.py +300 -0
- opentrons/protocol_engine/types/automatic_tip_selection.py +39 -0
- opentrons/protocol_engine/types/command_annotations.py +53 -0
- opentrons/protocol_engine/types/deck_configuration.py +72 -0
- opentrons/protocol_engine/types/execution.py +96 -0
- opentrons/protocol_engine/types/hardware_passthrough.py +25 -0
- opentrons/protocol_engine/types/instrument.py +47 -0
- opentrons/protocol_engine/types/instrument_sensors.py +47 -0
- opentrons/protocol_engine/types/labware.py +111 -0
- opentrons/protocol_engine/types/labware_movement.py +22 -0
- opentrons/protocol_engine/types/labware_offset_location.py +111 -0
- opentrons/protocol_engine/types/labware_offset_vector.py +33 -0
- opentrons/protocol_engine/types/liquid.py +40 -0
- opentrons/protocol_engine/types/liquid_class.py +59 -0
- opentrons/protocol_engine/types/liquid_handling.py +13 -0
- opentrons/protocol_engine/types/liquid_level_detection.py +131 -0
- opentrons/protocol_engine/types/location.py +194 -0
- opentrons/protocol_engine/types/module.py +301 -0
- opentrons/protocol_engine/types/partial_tip_configuration.py +76 -0
- opentrons/protocol_engine/types/run_time_parameters.py +133 -0
- opentrons/protocol_engine/types/tip.py +18 -0
- opentrons/protocol_engine/types/util.py +21 -0
- opentrons/protocol_engine/types/well_position.py +124 -0
- opentrons/protocol_reader/extract_labware_definitions.py +7 -3
- opentrons/protocol_reader/file_format_validator.py +5 -3
- opentrons/protocol_runner/json_translator.py +4 -2
- opentrons/protocol_runner/legacy_command_mapper.py +6 -2
- opentrons/protocol_runner/run_orchestrator.py +4 -1
- opentrons/protocols/advanced_control/transfers/common.py +48 -1
- opentrons/protocols/advanced_control/transfers/transfer_liquid_utils.py +204 -0
- opentrons/protocols/api_support/definitions.py +1 -1
- opentrons/protocols/api_support/instrument.py +16 -3
- opentrons/protocols/labware.py +27 -23
- opentrons/protocols/models/__init__.py +0 -21
- opentrons/simulate.py +4 -2
- opentrons/types.py +20 -7
- opentrons/util/logging_config.py +94 -25
- opentrons/util/logging_queue_handler.py +61 -0
- {opentrons-8.3.2.dist-info → opentrons-8.4.0.dist-info}/METADATA +4 -4
- {opentrons-8.3.2.dist-info → opentrons-8.4.0.dist-info}/RECORD +192 -151
- opentrons/calibration_storage/ot2/models/defaults.py +0 -0
- opentrons/calibration_storage/ot3/models/defaults.py +0 -0
- opentrons/protocol_api/core/legacy/legacy_robot_core.py +0 -0
- opentrons/protocol_engine/types.py +0 -1311
- {opentrons-8.3.2.dist-info → opentrons-8.4.0.dist-info}/LICENSE +0 -0
- {opentrons-8.3.2.dist-info → opentrons-8.4.0.dist-info}/WHEEL +0 -0
- {opentrons-8.3.2.dist-info → opentrons-8.4.0.dist-info}/entry_points.txt +0 -0
- {opentrons-8.3.2.dist-info → opentrons-8.4.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
"""Public protocol engine value types and models."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
from opentrons_shared_data.pipette.types import LabwareUri
|
|
7
|
+
from opentrons.hardware_control.modules import ModuleType
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
from .run_time_parameters import (
|
|
11
|
+
NumberParameter,
|
|
12
|
+
BooleanParameter,
|
|
13
|
+
EnumParameter,
|
|
14
|
+
CSVParameter,
|
|
15
|
+
RunTimeParameter,
|
|
16
|
+
PrimitiveRunTimeParamValuesType,
|
|
17
|
+
CSVRunTimeParamFilesType,
|
|
18
|
+
CSVRuntimeParamPaths,
|
|
19
|
+
FileInfo,
|
|
20
|
+
EnumChoice,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
from .command_annotations import (
|
|
24
|
+
SecondOrderCommandAnnotation,
|
|
25
|
+
CustomCommandAnnotation,
|
|
26
|
+
CommandAnnotation,
|
|
27
|
+
)
|
|
28
|
+
from .partial_tip_configuration import (
|
|
29
|
+
AllNozzleLayoutConfiguration,
|
|
30
|
+
SingleNozzleLayoutConfiguration,
|
|
31
|
+
RowNozzleLayoutConfiguration,
|
|
32
|
+
ColumnNozzleLayoutConfiguration,
|
|
33
|
+
QuadrantNozzleLayoutConfiguration,
|
|
34
|
+
NozzleLayoutConfigurationType,
|
|
35
|
+
PRIMARY_NOZZLE_LITERAL,
|
|
36
|
+
)
|
|
37
|
+
from .automatic_tip_selection import NextTipInfo, NoTipReason, NoTipAvailable
|
|
38
|
+
from .instrument_sensors import InstrumentSensorId, TipPresenceStatus
|
|
39
|
+
from .deck_configuration import (
|
|
40
|
+
AddressableOffsetVector,
|
|
41
|
+
PotentialCutoutFixture,
|
|
42
|
+
AreaType,
|
|
43
|
+
AddressableArea,
|
|
44
|
+
DeckConfigurationType,
|
|
45
|
+
DeckType,
|
|
46
|
+
)
|
|
47
|
+
from .liquid_class import LiquidClassRecord, LiquidClassRecordWithId
|
|
48
|
+
from .module import (
|
|
49
|
+
ModuleModel,
|
|
50
|
+
TemperatureModuleModel,
|
|
51
|
+
MagneticModuleModel,
|
|
52
|
+
ThermocyclerModuleModel,
|
|
53
|
+
HeaterShakerModuleModel,
|
|
54
|
+
MagneticBlockModel,
|
|
55
|
+
AbsorbanceReaderModel,
|
|
56
|
+
FlexStackerModuleModel,
|
|
57
|
+
ModuleDimensions,
|
|
58
|
+
ModuleCalibrationPoint,
|
|
59
|
+
ModuleDefinition,
|
|
60
|
+
LoadedModule,
|
|
61
|
+
SpeedRange,
|
|
62
|
+
TemperatureRange,
|
|
63
|
+
HeaterShakerLatchStatus,
|
|
64
|
+
HeaterShakerMovementRestrictors,
|
|
65
|
+
ABSMeasureMode,
|
|
66
|
+
ModuleOffsetVector,
|
|
67
|
+
ModuleOffsetData,
|
|
68
|
+
StackerFillEmptyStrategy,
|
|
69
|
+
)
|
|
70
|
+
from .location import (
|
|
71
|
+
DeckSlotLocation,
|
|
72
|
+
StagingSlotLocation,
|
|
73
|
+
AddressableAreaLocation,
|
|
74
|
+
ModuleLocation,
|
|
75
|
+
OnLabwareLocation,
|
|
76
|
+
OFF_DECK_LOCATION,
|
|
77
|
+
SYSTEM_LOCATION,
|
|
78
|
+
LabwareLocation,
|
|
79
|
+
OnDeckLabwareLocation,
|
|
80
|
+
NonStackedLocation,
|
|
81
|
+
DeckPoint,
|
|
82
|
+
InStackerHopperLocation,
|
|
83
|
+
OnLabwareLocationSequenceComponent,
|
|
84
|
+
OnModuleLocationSequenceComponent,
|
|
85
|
+
OnAddressableAreaLocationSequenceComponent,
|
|
86
|
+
NotOnDeckLocationSequenceComponent,
|
|
87
|
+
OnCutoutFixtureLocationSequenceComponent,
|
|
88
|
+
LabwareLocationSequence,
|
|
89
|
+
LoadableLabwareLocation,
|
|
90
|
+
labware_location_is_system,
|
|
91
|
+
labware_location_is_off_deck,
|
|
92
|
+
)
|
|
93
|
+
from .labware import (
|
|
94
|
+
OverlapOffset,
|
|
95
|
+
LabwareOffset,
|
|
96
|
+
LabwareOffsetCreate,
|
|
97
|
+
LegacyLabwareOffsetCreate,
|
|
98
|
+
LabwareOffsetCreateInternal,
|
|
99
|
+
LoadedLabware,
|
|
100
|
+
)
|
|
101
|
+
from .liquid import HexColor, EmptyLiquidId, LiquidId, Liquid, FluidKind, AspiratedFluid
|
|
102
|
+
from .labware_offset_location import (
|
|
103
|
+
LegacyLabwareOffsetLocation,
|
|
104
|
+
LabwareOffsetLocationSequence,
|
|
105
|
+
OnLabwareOffsetLocationSequenceComponent,
|
|
106
|
+
OnModuleOffsetLocationSequenceComponent,
|
|
107
|
+
OnAddressableAreaOffsetLocationSequenceComponent,
|
|
108
|
+
LabwareOffsetLocationSequenceComponents,
|
|
109
|
+
)
|
|
110
|
+
from .labware_offset_vector import LabwareOffsetVector
|
|
111
|
+
from .well_position import (
|
|
112
|
+
WellOrigin,
|
|
113
|
+
PickUpTipWellOrigin,
|
|
114
|
+
DropTipWellOrigin,
|
|
115
|
+
WellOffset,
|
|
116
|
+
WellLocation,
|
|
117
|
+
LiquidHandlingWellLocation,
|
|
118
|
+
PickUpTipWellLocation,
|
|
119
|
+
DropTipWellLocation,
|
|
120
|
+
WellLocationType,
|
|
121
|
+
WellLocationFunction,
|
|
122
|
+
)
|
|
123
|
+
from .instrument import (
|
|
124
|
+
LoadedPipette,
|
|
125
|
+
CurrentAddressableArea,
|
|
126
|
+
CurrentWell,
|
|
127
|
+
CurrentPipetteLocation,
|
|
128
|
+
InstrumentOffsetVector,
|
|
129
|
+
)
|
|
130
|
+
from .execution import EngineStatus, PostRunHardwareState
|
|
131
|
+
from .liquid_level_detection import (
|
|
132
|
+
LoadedVolumeInfo,
|
|
133
|
+
ProbedHeightInfo,
|
|
134
|
+
ProbedVolumeInfo,
|
|
135
|
+
WellInfoSummary,
|
|
136
|
+
WellLiquidInfo,
|
|
137
|
+
LiquidTrackingType,
|
|
138
|
+
SimulatedProbeResult,
|
|
139
|
+
)
|
|
140
|
+
from .liquid_handling import FlowRates
|
|
141
|
+
from .labware_movement import LabwareMovementStrategy, LabwareMovementOffsetData
|
|
142
|
+
from .tip import TipGeometry
|
|
143
|
+
from .hardware_passthrough import MovementAxis, MotorAxis
|
|
144
|
+
from .util import Vec3f, Dimensions
|
|
145
|
+
|
|
146
|
+
__all__ = [
|
|
147
|
+
# Runtime parameters
|
|
148
|
+
"NumberParameter",
|
|
149
|
+
"BooleanParameter",
|
|
150
|
+
"EnumParameter",
|
|
151
|
+
"EnumChoice",
|
|
152
|
+
"CSVParameter",
|
|
153
|
+
"PrimitiveRunTimeParamValuesType",
|
|
154
|
+
"CSVRunTimeParamFilesType",
|
|
155
|
+
"CSVRuntimeParamPaths",
|
|
156
|
+
"FileInfo",
|
|
157
|
+
"RunTimeParameter",
|
|
158
|
+
# Command annotations
|
|
159
|
+
"SecondOrderCommandAnnotation",
|
|
160
|
+
"CustomCommandAnnotation",
|
|
161
|
+
"CommandAnnotation",
|
|
162
|
+
# Partial tip handling
|
|
163
|
+
"AllNozzleLayoutConfiguration",
|
|
164
|
+
"SingleNozzleLayoutConfiguration",
|
|
165
|
+
"RowNozzleLayoutConfiguration",
|
|
166
|
+
"ColumnNozzleLayoutConfiguration",
|
|
167
|
+
"QuadrantNozzleLayoutConfiguration",
|
|
168
|
+
"NozzleLayoutConfigurationType",
|
|
169
|
+
"PRIMARY_NOZZLE_LITERAL",
|
|
170
|
+
# Automatic tip selection
|
|
171
|
+
"NextTipInfo",
|
|
172
|
+
"NoTipReason",
|
|
173
|
+
"NoTipAvailable",
|
|
174
|
+
# Instrument sensors
|
|
175
|
+
"InstrumentSensorId",
|
|
176
|
+
"TipPresenceStatus",
|
|
177
|
+
# Deck configuration
|
|
178
|
+
"AddressableOffsetVector",
|
|
179
|
+
"PotentialCutoutFixture",
|
|
180
|
+
"AreaType",
|
|
181
|
+
"AddressableArea",
|
|
182
|
+
"DeckConfigurationType",
|
|
183
|
+
"DeckType",
|
|
184
|
+
# Liquid classes
|
|
185
|
+
"LiquidClassRecord",
|
|
186
|
+
"LiquidClassRecordWithId",
|
|
187
|
+
# Modules
|
|
188
|
+
"ModuleModel",
|
|
189
|
+
"ModuleType",
|
|
190
|
+
"TemperatureModuleModel",
|
|
191
|
+
"MagneticModuleModel",
|
|
192
|
+
"ThermocyclerModuleModel",
|
|
193
|
+
"HeaterShakerModuleModel",
|
|
194
|
+
"MagneticBlockModel",
|
|
195
|
+
"AbsorbanceReaderModel",
|
|
196
|
+
"FlexStackerModuleModel",
|
|
197
|
+
"ModuleDimensions",
|
|
198
|
+
"ModuleCalibrationPoint",
|
|
199
|
+
"ModuleDefinition",
|
|
200
|
+
"LoadedModule",
|
|
201
|
+
"SpeedRange",
|
|
202
|
+
"TemperatureRange",
|
|
203
|
+
"HeaterShakerLatchStatus",
|
|
204
|
+
"HeaterShakerMovementRestrictors",
|
|
205
|
+
"ABSMeasureMode",
|
|
206
|
+
"ModuleOffsetVector",
|
|
207
|
+
"ModuleOffsetData",
|
|
208
|
+
"StackerFillEmptyStrategy",
|
|
209
|
+
# Locations of things on deck
|
|
210
|
+
"DeckSlotLocation",
|
|
211
|
+
"StagingSlotLocation",
|
|
212
|
+
"AddressableAreaLocation",
|
|
213
|
+
"ModuleLocation",
|
|
214
|
+
"OnLabwareLocation",
|
|
215
|
+
"OFF_DECK_LOCATION",
|
|
216
|
+
"SYSTEM_LOCATION",
|
|
217
|
+
"LabwareLocation",
|
|
218
|
+
"OnDeckLabwareLocation",
|
|
219
|
+
"NonStackedLocation",
|
|
220
|
+
"DeckPoint",
|
|
221
|
+
"OffDeckLocationType",
|
|
222
|
+
"SystemLocationType",
|
|
223
|
+
"InStackerHopperLocation",
|
|
224
|
+
"OnLabwareLocationSequenceComponent",
|
|
225
|
+
"OnModuleLocationSequenceComponent",
|
|
226
|
+
"OnAddressableAreaLocationSequenceComponent",
|
|
227
|
+
"NotOnDeckLocationSequenceComponent",
|
|
228
|
+
"OnCutoutFixtureLocationSequenceComponent",
|
|
229
|
+
"LabwareLocationSequence",
|
|
230
|
+
"LoadableLabwareLocation",
|
|
231
|
+
"labware_location_is_off_deck",
|
|
232
|
+
"labware_location_is_system",
|
|
233
|
+
# Labware offset location
|
|
234
|
+
"LegacyLabwareOffsetLocation",
|
|
235
|
+
"LabwareOffsetLocationSequence",
|
|
236
|
+
"LabwareOffsetLocationSequenceComponents",
|
|
237
|
+
"OnLabwareOffsetLocationSequenceComponent",
|
|
238
|
+
"OnModuleOffsetLocationSequenceComponent",
|
|
239
|
+
"OnAddressableAreaOffsetLocationSequenceComponent",
|
|
240
|
+
# Labware offset vector
|
|
241
|
+
"LabwareOffsetVector",
|
|
242
|
+
# Labware
|
|
243
|
+
"OverlapOffset",
|
|
244
|
+
"LabwareOffset",
|
|
245
|
+
"LabwareOffsetCreate",
|
|
246
|
+
"LegacyLabwareOffsetCreate",
|
|
247
|
+
"LabwareOffsetCreateInternal",
|
|
248
|
+
"LoadedLabware",
|
|
249
|
+
"LabwareOffsetVector",
|
|
250
|
+
# Liquids
|
|
251
|
+
"HexColor",
|
|
252
|
+
"EmptyLiquidId",
|
|
253
|
+
"LiquidId",
|
|
254
|
+
"Liquid",
|
|
255
|
+
"FluidKind",
|
|
256
|
+
"AspiratedFluid",
|
|
257
|
+
# Well locations
|
|
258
|
+
"WellOrigin",
|
|
259
|
+
"PickUpTipWellOrigin",
|
|
260
|
+
"DropTipWellOrigin",
|
|
261
|
+
"WellOffset",
|
|
262
|
+
"WellLocation",
|
|
263
|
+
"LiquidHandlingWellLocation",
|
|
264
|
+
"PickUpTipWellLocation",
|
|
265
|
+
"DropTipWellLocation",
|
|
266
|
+
"WellLocationType",
|
|
267
|
+
"WellLocationFunction",
|
|
268
|
+
# Execution
|
|
269
|
+
"EngineStatus",
|
|
270
|
+
"PostRunHardwareState",
|
|
271
|
+
# Instruments
|
|
272
|
+
"LoadedPipette",
|
|
273
|
+
"CurrentAddressableArea",
|
|
274
|
+
"CurrentWell",
|
|
275
|
+
"CurrentPipetteLocation",
|
|
276
|
+
"InstrumentOffsetVector",
|
|
277
|
+
# Liquid level detection types
|
|
278
|
+
"LoadedVolumeInfo",
|
|
279
|
+
"ProbedHeightInfo",
|
|
280
|
+
"ProbedVolumeInfo",
|
|
281
|
+
"WellInfoSummary",
|
|
282
|
+
"WellLiquidInfo",
|
|
283
|
+
"LiquidTrackingType",
|
|
284
|
+
"SimulatedProbeResult",
|
|
285
|
+
# Liquid handling
|
|
286
|
+
"FlowRates",
|
|
287
|
+
# Labware movement
|
|
288
|
+
"LabwareMovementStrategy",
|
|
289
|
+
"LabwareMovementOffsetData",
|
|
290
|
+
# Tips
|
|
291
|
+
"TipGeometry",
|
|
292
|
+
# Hardware passthrough
|
|
293
|
+
"MovementAxis",
|
|
294
|
+
"MotorAxis",
|
|
295
|
+
# Utility types
|
|
296
|
+
"Vec3f",
|
|
297
|
+
"Dimensions",
|
|
298
|
+
# Convenience re-export
|
|
299
|
+
"LabwareUri",
|
|
300
|
+
]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Protocol engine types dealing with automatic tip selection."""
|
|
2
|
+
from enum import Enum
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import (
|
|
6
|
+
BaseModel,
|
|
7
|
+
Field,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class NextTipInfo(BaseModel):
|
|
12
|
+
"""Next available tip labware and well name data."""
|
|
13
|
+
|
|
14
|
+
labwareId: str = Field(
|
|
15
|
+
...,
|
|
16
|
+
description="The labware ID of the tip rack where the next available tip(s) are located.",
|
|
17
|
+
)
|
|
18
|
+
tipStartingWell: str = Field(
|
|
19
|
+
..., description="The (starting) well name of the next available tip(s)."
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class NoTipReason(Enum):
|
|
24
|
+
"""The cause of no tip being available for a pipette and tip rack(s)."""
|
|
25
|
+
|
|
26
|
+
NO_AVAILABLE_TIPS = "noAvailableTips"
|
|
27
|
+
STARTING_TIP_WITH_PARTIAL = "startingTipWithPartial"
|
|
28
|
+
INCOMPATIBLE_CONFIGURATION = "incompatibleConfiguration"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class NoTipAvailable(BaseModel):
|
|
32
|
+
"""No available next tip data."""
|
|
33
|
+
|
|
34
|
+
noTipReason: NoTipReason = Field(
|
|
35
|
+
..., description="The reason why no next available tip could be provided."
|
|
36
|
+
)
|
|
37
|
+
message: Optional[str] = Field(
|
|
38
|
+
None, description="Optional message explaining why a tip wasn't available."
|
|
39
|
+
)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Protocol Engine types dealing with command annotations."""
|
|
2
|
+
|
|
3
|
+
from typing import List, Literal, Dict, Any, Optional, Union
|
|
4
|
+
from pydantic import (
|
|
5
|
+
ConfigDict,
|
|
6
|
+
BaseModel,
|
|
7
|
+
Field,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class BaseCommandAnnotation(BaseModel):
|
|
12
|
+
"""Optional annotations for protocol engine commands."""
|
|
13
|
+
|
|
14
|
+
commandKeys: List[str] = Field(
|
|
15
|
+
..., description="Command keys to which this annotation applies"
|
|
16
|
+
)
|
|
17
|
+
annotationType: str = Field(
|
|
18
|
+
..., description="The type of annotation (for machine parsing)"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class SecondOrderCommandAnnotation(BaseCommandAnnotation):
|
|
23
|
+
"""Annotates a group of atomic commands which were the direct result of a second order command.
|
|
24
|
+
|
|
25
|
+
Examples of second order commands would be transfer, consolidate, mix, etc.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
annotationType: Literal["secondOrderCommand"] = "secondOrderCommand"
|
|
29
|
+
params: Dict[str, Any] = Field(
|
|
30
|
+
...,
|
|
31
|
+
description="Key value pairs of the parameters passed to the second order command that this annotates.",
|
|
32
|
+
)
|
|
33
|
+
machineReadableName: str = Field(
|
|
34
|
+
...,
|
|
35
|
+
description="The name of the second order command in the form that the generating software refers to it",
|
|
36
|
+
)
|
|
37
|
+
userSpecifiedName: Optional[str] = Field(
|
|
38
|
+
None, description="The optional user-specified name of the second order command"
|
|
39
|
+
)
|
|
40
|
+
userSpecifiedDescription: Optional[str] = Field(
|
|
41
|
+
None,
|
|
42
|
+
description="The optional user-specified description of the second order command",
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class CustomCommandAnnotation(BaseCommandAnnotation):
|
|
47
|
+
"""Annotates a group of atomic commands in some manner that Opentrons software does not anticipate or originate."""
|
|
48
|
+
|
|
49
|
+
annotationType: Literal["custom"] = "custom"
|
|
50
|
+
model_config = ConfigDict(extra="allow")
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
CommandAnnotation = Union[SecondOrderCommandAnnotation, CustomCommandAnnotation]
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""Protocol engine types to do with deck configuration."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from typing import FrozenSet, List, Tuple, Optional
|
|
5
|
+
from enum import Enum
|
|
6
|
+
|
|
7
|
+
from opentrons.types import DeckSlotName
|
|
8
|
+
|
|
9
|
+
from opentrons_shared_data.module.types import ModuleType as SharedDataModuleType
|
|
10
|
+
|
|
11
|
+
from .util import Vec3f, Dimensions
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class AddressableOffsetVector(Vec3f):
|
|
15
|
+
"""Offset, in deck coordinates, from nominal to actual position of an addressable area."""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@dataclass(frozen=True)
|
|
19
|
+
class PotentialCutoutFixture:
|
|
20
|
+
"""Cutout and cutout fixture id associated with a potential cutout fixture that can be on the deck."""
|
|
21
|
+
|
|
22
|
+
cutout_id: str
|
|
23
|
+
cutout_fixture_id: str
|
|
24
|
+
provided_addressable_areas: FrozenSet[str]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class AreaType(Enum):
|
|
28
|
+
"""The type of addressable area."""
|
|
29
|
+
|
|
30
|
+
SLOT = "slot"
|
|
31
|
+
STAGING_SLOT = "stagingSlot"
|
|
32
|
+
MOVABLE_TRASH = "movableTrash"
|
|
33
|
+
FIXED_TRASH = "fixedTrash"
|
|
34
|
+
WASTE_CHUTE = "wasteChute"
|
|
35
|
+
THERMOCYCLER = "thermocycler"
|
|
36
|
+
HEATER_SHAKER = "heaterShaker"
|
|
37
|
+
TEMPERATURE = "temperatureModule"
|
|
38
|
+
MAGNETICBLOCK = "magneticBlock"
|
|
39
|
+
ABSORBANCE_READER = "absorbanceReader"
|
|
40
|
+
FLEX_STACKER = "flexStacker"
|
|
41
|
+
LID_DOCK = "lidDock"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@dataclass(frozen=True)
|
|
45
|
+
class AddressableArea:
|
|
46
|
+
"""Addressable area that has been loaded."""
|
|
47
|
+
|
|
48
|
+
area_name: str
|
|
49
|
+
area_type: AreaType
|
|
50
|
+
base_slot: DeckSlotName
|
|
51
|
+
display_name: str
|
|
52
|
+
bounding_box: Dimensions
|
|
53
|
+
position: AddressableOffsetVector
|
|
54
|
+
compatible_module_types: List[SharedDataModuleType]
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# TODO make the below some sort of better type
|
|
58
|
+
# TODO This should instead contain a proper cutout fixture type
|
|
59
|
+
DeckConfigurationType = List[
|
|
60
|
+
Tuple[str, str, Optional[str]]
|
|
61
|
+
] # cutout_id, cutout_fixture_id, opentrons_module_serial_number
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# TODO(mm, 2023-05-10): Deduplicate with constants in
|
|
65
|
+
# opentrons.protocols.api_support.deck_type
|
|
66
|
+
# and consider moving to shared-data.
|
|
67
|
+
class DeckType(str, Enum):
|
|
68
|
+
"""Types of deck available."""
|
|
69
|
+
|
|
70
|
+
OT2_STANDARD = "ot2_standard"
|
|
71
|
+
OT2_SHORT_TRASH = "ot2_short_trash"
|
|
72
|
+
OT3_STANDARD = "ot3_standard"
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"""Protocol engine types to do with engine execution."""
|
|
2
|
+
from enum import Enum
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
# todo(mm, 2024-06-24): This monolithic status field is getting to be a bit much.
|
|
6
|
+
# We should consider splitting this up into multiple fields.
|
|
7
|
+
class EngineStatus(str, Enum):
|
|
8
|
+
"""Current execution status of a ProtocolEngine.
|
|
9
|
+
|
|
10
|
+
This is a high-level summary of what the robot is doing and what interactions are
|
|
11
|
+
appropriate.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
# Statuses for an ongoing run:
|
|
15
|
+
|
|
16
|
+
IDLE = "idle"
|
|
17
|
+
"""The protocol has not been started yet.
|
|
18
|
+
|
|
19
|
+
The robot may truly be idle, or it may be executing commands with `intent: "setup"`.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
RUNNING = "running"
|
|
23
|
+
"""The engine is actively running the protocol."""
|
|
24
|
+
|
|
25
|
+
PAUSED = "paused"
|
|
26
|
+
"""A pause has been requested. Activity is paused, or will pause soon.
|
|
27
|
+
|
|
28
|
+
(There is currently no way to tell which.)
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
BLOCKED_BY_OPEN_DOOR = "blocked-by-open-door"
|
|
32
|
+
"""The robot's door is open. Activity is paused, or will pause soon."""
|
|
33
|
+
|
|
34
|
+
STOP_REQUESTED = "stop-requested"
|
|
35
|
+
"""A stop has been requested. Activity will stop soon."""
|
|
36
|
+
|
|
37
|
+
FINISHING = "finishing"
|
|
38
|
+
"""The robot is doing post-run cleanup, like homing and dropping tips."""
|
|
39
|
+
|
|
40
|
+
# Statuses for error recovery mode:
|
|
41
|
+
|
|
42
|
+
AWAITING_RECOVERY = "awaiting-recovery"
|
|
43
|
+
"""The engine is waiting for external input to recover from a nonfatal error.
|
|
44
|
+
|
|
45
|
+
New commands with `intent: "fixit"` may be enqueued, which will run immediately.
|
|
46
|
+
The run can't be paused in this state, but it can be canceled, or resumed from the
|
|
47
|
+
next protocol command if recovery is complete.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
AWAITING_RECOVERY_PAUSED = "awaiting-recovery-paused"
|
|
51
|
+
"""The engine is paused while in error recovery mode. Activity is paused, or will pause soon.
|
|
52
|
+
|
|
53
|
+
This state is not possible to enter manually. It happens when an open door
|
|
54
|
+
gets closed during error recovery.
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
AWAITING_RECOVERY_BLOCKED_BY_OPEN_DOOR = "awaiting-recovery-blocked-by-open-door"
|
|
58
|
+
"""The robot's door is open while in recovery mode. Activity is paused, or will pause soon."""
|
|
59
|
+
|
|
60
|
+
# Terminal statuses:
|
|
61
|
+
|
|
62
|
+
STOPPED = "stopped"
|
|
63
|
+
"""All activity is over; it was stopped by an explicit external request."""
|
|
64
|
+
|
|
65
|
+
FAILED = "failed"
|
|
66
|
+
"""All activity is over; there was a fatal error."""
|
|
67
|
+
|
|
68
|
+
SUCCEEDED = "succeeded"
|
|
69
|
+
"""All activity is over; things completed without any fatal error."""
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class PostRunHardwareState(Enum):
|
|
73
|
+
"""State of robot gantry & motors after a stop is performed and the hardware API is reset.
|
|
74
|
+
|
|
75
|
+
HOME_AND_STAY_ENGAGED: home the gantry and keep all motors engaged. This allows the
|
|
76
|
+
robot to continue performing movement actions without re-homing
|
|
77
|
+
HOME_THEN_DISENGAGE: home the gantry and then disengage motors.
|
|
78
|
+
Reduces current consumption of the motors and prevents coil heating.
|
|
79
|
+
Re-homing is required to re-engage the motors and resume robot movement.
|
|
80
|
+
STAY_ENGAGED_IN_PLACE: do not home after the stop and keep the motors engaged.
|
|
81
|
+
Keeps gantry in the same position as prior to `stop()` execution
|
|
82
|
+
and allows the robot to execute movement commands without requiring to re-home first.
|
|
83
|
+
DISENGAGE_IN_PLACE: disengage motors and do not home the robot
|
|
84
|
+
Probable states for pipette:
|
|
85
|
+
- for 1- or 8-channel:
|
|
86
|
+
- HOME_AND_STAY_ENGAGED after protocol runs
|
|
87
|
+
- STAY_ENGAGED_IN_PLACE after maintenance runs
|
|
88
|
+
- for 96-channel:
|
|
89
|
+
- HOME_THEN_DISENGAGE after protocol runs
|
|
90
|
+
- DISENGAGE_IN_PLACE after maintenance runs
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
HOME_AND_STAY_ENGAGED = "homeAndStayEngaged"
|
|
94
|
+
HOME_THEN_DISENGAGE = "homeThenDisengage"
|
|
95
|
+
STAY_ENGAGED_IN_PLACE = "stayEngagedInPlace"
|
|
96
|
+
DISENGAGE_IN_PLACE = "disengageInPlace"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Protocol Engine types for hardware passthrough."""
|
|
2
|
+
|
|
3
|
+
from enum import Enum
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class MovementAxis(str, Enum):
|
|
7
|
+
"""Axis on which to issue a relative movement."""
|
|
8
|
+
|
|
9
|
+
X = "x"
|
|
10
|
+
Y = "y"
|
|
11
|
+
Z = "z"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class MotorAxis(str, Enum):
|
|
15
|
+
"""Motor axis on which to issue a home command."""
|
|
16
|
+
|
|
17
|
+
X = "x"
|
|
18
|
+
Y = "y"
|
|
19
|
+
LEFT_Z = "leftZ"
|
|
20
|
+
RIGHT_Z = "rightZ"
|
|
21
|
+
LEFT_PLUNGER = "leftPlunger"
|
|
22
|
+
RIGHT_PLUNGER = "rightPlunger"
|
|
23
|
+
EXTENSION_Z = "extensionZ"
|
|
24
|
+
EXTENSION_JAW = "extensionJaw"
|
|
25
|
+
AXIS_96_CHANNEL_CAM = "axis96ChannelCam"
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Protocol Engine types to do with instruments."""
|
|
2
|
+
|
|
3
|
+
from typing import Union
|
|
4
|
+
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel
|
|
8
|
+
|
|
9
|
+
from opentrons.types import MountType
|
|
10
|
+
from opentrons_shared_data.pipette.types import PipetteNameType
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class LoadedPipette(BaseModel):
|
|
14
|
+
"""A pipette that has been loaded."""
|
|
15
|
+
|
|
16
|
+
id: str
|
|
17
|
+
pipetteName: PipetteNameType
|
|
18
|
+
mount: MountType
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@dataclass(frozen=True)
|
|
22
|
+
class CurrentAddressableArea:
|
|
23
|
+
"""The latest addressable area the robot has accessed."""
|
|
24
|
+
|
|
25
|
+
pipette_id: str
|
|
26
|
+
addressable_area_name: str
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass(frozen=True)
|
|
30
|
+
class CurrentWell:
|
|
31
|
+
"""The latest well that the robot has accessed."""
|
|
32
|
+
|
|
33
|
+
pipette_id: str
|
|
34
|
+
labware_id: str
|
|
35
|
+
well_name: str
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
CurrentPipetteLocation = Union[CurrentWell, CurrentAddressableArea]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# TODO(mm, 2022-11-07): Deduplicate with Vec3f.
|
|
42
|
+
class InstrumentOffsetVector(BaseModel):
|
|
43
|
+
"""Instrument Offset from home position to robot deck."""
|
|
44
|
+
|
|
45
|
+
x: float
|
|
46
|
+
y: float
|
|
47
|
+
z: float
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Protocol engine types involving instrument sensors."""
|
|
2
|
+
from enum import Enum
|
|
3
|
+
|
|
4
|
+
from opentrons.hardware_control.types import (
|
|
5
|
+
TipStateType as HwTipStateType,
|
|
6
|
+
InstrumentProbeType,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class InstrumentSensorId(str, Enum):
|
|
11
|
+
"""Primary and secondary sensor ids."""
|
|
12
|
+
|
|
13
|
+
PRIMARY = "primary"
|
|
14
|
+
SECONDARY = "secondary"
|
|
15
|
+
BOTH = "both"
|
|
16
|
+
|
|
17
|
+
def to_instrument_probe_type(self) -> InstrumentProbeType:
|
|
18
|
+
"""Convert to InstrumentProbeType."""
|
|
19
|
+
return {
|
|
20
|
+
InstrumentSensorId.PRIMARY: InstrumentProbeType.PRIMARY,
|
|
21
|
+
InstrumentSensorId.SECONDARY: InstrumentProbeType.SECONDARY,
|
|
22
|
+
InstrumentSensorId.BOTH: InstrumentProbeType.BOTH,
|
|
23
|
+
}[self]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class TipPresenceStatus(str, Enum):
|
|
27
|
+
"""Tip presence status reported by a pipette."""
|
|
28
|
+
|
|
29
|
+
PRESENT = "present"
|
|
30
|
+
ABSENT = "absent"
|
|
31
|
+
UNKNOWN = "unknown"
|
|
32
|
+
|
|
33
|
+
def to_hw_state(self) -> HwTipStateType:
|
|
34
|
+
"""Convert to hardware tip state."""
|
|
35
|
+
assert self != TipPresenceStatus.UNKNOWN
|
|
36
|
+
return {
|
|
37
|
+
TipPresenceStatus.PRESENT: HwTipStateType.PRESENT,
|
|
38
|
+
TipPresenceStatus.ABSENT: HwTipStateType.ABSENT,
|
|
39
|
+
}[self]
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def from_hw_state(cls, state: HwTipStateType) -> "TipPresenceStatus":
|
|
43
|
+
"""Convert from hardware tip state."""
|
|
44
|
+
return {
|
|
45
|
+
HwTipStateType.PRESENT: TipPresenceStatus.PRESENT,
|
|
46
|
+
HwTipStateType.ABSENT: TipPresenceStatus.ABSENT,
|
|
47
|
+
}[state]
|