opentrons 8.2.0a3__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.
Potentially problematic release.
This version of opentrons might be problematic. Click here for more details.
- 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 +40 -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 +4 -2
- 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 +56 -71
- 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.0a3.dist-info → opentrons-8.3.0.dist-info}/METADATA +16 -15
- {opentrons-8.2.0a3.dist-info → opentrons-8.3.0.dist-info}/RECORD +238 -208
- {opentrons-8.2.0a3.dist-info → opentrons-8.3.0.dist-info}/WHEEL +1 -1
- {opentrons-8.2.0a3.dist-info → opentrons-8.3.0.dist-info}/LICENSE +0 -0
- {opentrons-8.2.0a3.dist-info → opentrons-8.3.0.dist-info}/entry_points.txt +0 -0
- {opentrons-8.2.0a3.dist-info → opentrons-8.3.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""Shared result types for robot API commands."""
|
|
2
|
+
from pydantic import BaseModel, Field
|
|
3
|
+
|
|
4
|
+
from typing import Dict
|
|
5
|
+
from opentrons.protocol_engine.types import MotorAxis
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
MotorAxisMapType = Dict[MotorAxis, float]
|
|
9
|
+
default_position = {ax: 0.0 for ax in MotorAxis}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DestinationRobotPositionResult(BaseModel):
|
|
13
|
+
"""The result dictionary of `MotorAxis` type."""
|
|
14
|
+
|
|
15
|
+
position: MotorAxisMapType = Field(
|
|
16
|
+
default=default_position,
|
|
17
|
+
description="The position of all axes on the robot. If no mount was provided, the last moved mount is used to determine the location.",
|
|
18
|
+
)
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"""Command models for moving any robot axis relative."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from typing import Literal, Type, Optional, TYPE_CHECKING, Any
|
|
5
|
+
|
|
6
|
+
from pydantic import BaseModel, Field
|
|
7
|
+
from pydantic.json_schema import SkipJsonSchema
|
|
8
|
+
from opentrons.hardware_control import HardwareControlAPI
|
|
9
|
+
from opentrons.protocol_engine.resources import ensure_ot3_hardware
|
|
10
|
+
|
|
11
|
+
from .common import MotorAxisMapType, DestinationRobotPositionResult
|
|
12
|
+
|
|
13
|
+
from ..command import (
|
|
14
|
+
AbstractCommandImpl,
|
|
15
|
+
BaseCommand,
|
|
16
|
+
BaseCommandCreate,
|
|
17
|
+
SuccessData,
|
|
18
|
+
)
|
|
19
|
+
from ...errors.error_occurrence import ErrorOccurrence
|
|
20
|
+
|
|
21
|
+
if TYPE_CHECKING:
|
|
22
|
+
from opentrons.protocol_engine.execution import GantryMover
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
MoveAxesRelativeCommandType = Literal["robot/moveAxesRelative"]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _remove_default(s: dict[str, Any]) -> None:
|
|
29
|
+
s.pop("default", None)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class MoveAxesRelativeParams(BaseModel):
|
|
33
|
+
"""Payload required to move axes relative to position."""
|
|
34
|
+
|
|
35
|
+
axis_map: MotorAxisMapType = Field(
|
|
36
|
+
..., description="A dictionary mapping axes to relative movements in mm."
|
|
37
|
+
)
|
|
38
|
+
speed: float | SkipJsonSchema[None] = Field(
|
|
39
|
+
default=None,
|
|
40
|
+
description="The max velocity to move the axes at. Will fall to hardware defaults if none provided.",
|
|
41
|
+
json_schema_extra=_remove_default,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class MoveAxesRelativeResult(DestinationRobotPositionResult):
|
|
46
|
+
"""Result data from the execution of a MoveAxesRelative command."""
|
|
47
|
+
|
|
48
|
+
pass
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class MoveAxesRelativeImplementation(
|
|
52
|
+
AbstractCommandImpl[MoveAxesRelativeParams, SuccessData[MoveAxesRelativeResult]]
|
|
53
|
+
):
|
|
54
|
+
"""MoveAxesRelative command implementation."""
|
|
55
|
+
|
|
56
|
+
def __init__(
|
|
57
|
+
self,
|
|
58
|
+
gantry_mover: GantryMover,
|
|
59
|
+
hardware_api: HardwareControlAPI,
|
|
60
|
+
**kwargs: object,
|
|
61
|
+
) -> None:
|
|
62
|
+
self._gantry_mover = gantry_mover
|
|
63
|
+
self._hardware_api = hardware_api
|
|
64
|
+
|
|
65
|
+
async def execute(
|
|
66
|
+
self, params: MoveAxesRelativeParams
|
|
67
|
+
) -> SuccessData[MoveAxesRelativeResult]:
|
|
68
|
+
"""Move the axes on a flex a relative distance."""
|
|
69
|
+
# TODO (lc 08-16-2024) implement `move_axes` for OT 2 hardware controller
|
|
70
|
+
# and then we can remove this validation.
|
|
71
|
+
ensure_ot3_hardware(self._hardware_api)
|
|
72
|
+
|
|
73
|
+
current_position = await self._gantry_mover.move_axes(
|
|
74
|
+
axis_map=params.axis_map, speed=params.speed, relative_move=True
|
|
75
|
+
)
|
|
76
|
+
return SuccessData(
|
|
77
|
+
public=MoveAxesRelativeResult(position=current_position),
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class MoveAxesRelative(
|
|
82
|
+
BaseCommand[MoveAxesRelativeParams, MoveAxesRelativeResult, ErrorOccurrence]
|
|
83
|
+
):
|
|
84
|
+
"""MoveAxesRelative command model."""
|
|
85
|
+
|
|
86
|
+
commandType: MoveAxesRelativeCommandType = "robot/moveAxesRelative"
|
|
87
|
+
params: MoveAxesRelativeParams
|
|
88
|
+
result: Optional[MoveAxesRelativeResult] = None
|
|
89
|
+
|
|
90
|
+
_ImplementationCls: Type[
|
|
91
|
+
MoveAxesRelativeImplementation
|
|
92
|
+
] = MoveAxesRelativeImplementation
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class MoveAxesRelativeCreate(BaseCommandCreate[MoveAxesRelativeParams]):
|
|
96
|
+
"""MoveAxesRelative command request model."""
|
|
97
|
+
|
|
98
|
+
commandType: MoveAxesRelativeCommandType = "robot/moveAxesRelative"
|
|
99
|
+
params: MoveAxesRelativeParams
|
|
100
|
+
|
|
101
|
+
_CommandCls: Type[MoveAxesRelative] = MoveAxesRelative
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"""Command models for moving any robot axis to an absolute position."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from typing import Literal, Optional, Type, TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from pydantic import Field, BaseModel
|
|
6
|
+
from pydantic.json_schema import SkipJsonSchema
|
|
7
|
+
|
|
8
|
+
from opentrons.hardware_control import HardwareControlAPI
|
|
9
|
+
from opentrons.protocol_engine.resources import ensure_ot3_hardware
|
|
10
|
+
|
|
11
|
+
from .common import MotorAxisMapType, DestinationRobotPositionResult
|
|
12
|
+
from ..command import (
|
|
13
|
+
AbstractCommandImpl,
|
|
14
|
+
BaseCommand,
|
|
15
|
+
BaseCommandCreate,
|
|
16
|
+
SuccessData,
|
|
17
|
+
)
|
|
18
|
+
from ...errors.error_occurrence import ErrorOccurrence
|
|
19
|
+
|
|
20
|
+
if TYPE_CHECKING:
|
|
21
|
+
from opentrons.protocol_engine.execution import GantryMover
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
MoveAxesToCommandType = Literal["robot/moveAxesTo"]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _remove_default(s: dict[str, Any]) -> None:
|
|
28
|
+
s.pop("default", None)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class MoveAxesToParams(BaseModel):
|
|
32
|
+
"""Payload required to move axes to absolute position."""
|
|
33
|
+
|
|
34
|
+
axis_map: MotorAxisMapType = Field(
|
|
35
|
+
..., description="The specified axes to move to an absolute deck position with."
|
|
36
|
+
)
|
|
37
|
+
critical_point: MotorAxisMapType | SkipJsonSchema[None] = Field(
|
|
38
|
+
default=None,
|
|
39
|
+
description="The critical point to move the mount with.",
|
|
40
|
+
json_schema_extra=_remove_default,
|
|
41
|
+
)
|
|
42
|
+
speed: float | SkipJsonSchema[None] = Field(
|
|
43
|
+
default=None,
|
|
44
|
+
description="The max velocity to move the axes at. Will fall to hardware defaults if none provided.",
|
|
45
|
+
json_schema_extra=_remove_default,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class MoveAxesToResult(DestinationRobotPositionResult):
|
|
50
|
+
"""Result data from the execution of a MoveAxesTo command."""
|
|
51
|
+
|
|
52
|
+
pass
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class MoveAxesToImplementation(
|
|
56
|
+
AbstractCommandImpl[MoveAxesToParams, SuccessData[MoveAxesToResult]]
|
|
57
|
+
):
|
|
58
|
+
"""MoveAxesTo command implementation."""
|
|
59
|
+
|
|
60
|
+
def __init__(
|
|
61
|
+
self,
|
|
62
|
+
gantry_mover: GantryMover,
|
|
63
|
+
hardware_api: HardwareControlAPI,
|
|
64
|
+
**kwargs: object,
|
|
65
|
+
) -> None:
|
|
66
|
+
self._gantry_mover = gantry_mover
|
|
67
|
+
self._hardware_api = hardware_api
|
|
68
|
+
|
|
69
|
+
async def execute(self, params: MoveAxesToParams) -> SuccessData[MoveAxesToResult]:
|
|
70
|
+
"""Move the axes on a flex an absolute distance."""
|
|
71
|
+
# TODO (lc 08-16-2024) implement `move_axes` for OT 2 hardware controller
|
|
72
|
+
# and then we can remove this validation.
|
|
73
|
+
ensure_ot3_hardware(self._hardware_api)
|
|
74
|
+
current_position = await self._gantry_mover.move_axes(
|
|
75
|
+
axis_map=params.axis_map,
|
|
76
|
+
speed=params.speed,
|
|
77
|
+
critical_point=params.critical_point,
|
|
78
|
+
)
|
|
79
|
+
return SuccessData(
|
|
80
|
+
public=MoveAxesToResult(position=current_position),
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class MoveAxesTo(BaseCommand[MoveAxesToParams, MoveAxesToResult, ErrorOccurrence]):
|
|
85
|
+
"""MoveAxesTo command model."""
|
|
86
|
+
|
|
87
|
+
commandType: MoveAxesToCommandType = "robot/moveAxesTo"
|
|
88
|
+
params: MoveAxesToParams
|
|
89
|
+
result: Optional[MoveAxesToResult] = None
|
|
90
|
+
|
|
91
|
+
_ImplementationCls: Type[MoveAxesToImplementation] = MoveAxesToImplementation
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class MoveAxesToCreate(BaseCommandCreate[MoveAxesToParams]):
|
|
95
|
+
"""MoveAxesTo command request model."""
|
|
96
|
+
|
|
97
|
+
commandType: MoveAxesToCommandType = "robot/moveAxesTo"
|
|
98
|
+
params: MoveAxesToParams
|
|
99
|
+
|
|
100
|
+
_CommandCls: Type[MoveAxesTo] = MoveAxesTo
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""Command models for moving any robot mount to a destination point."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from typing import Literal, Type, Optional, TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel, Field
|
|
6
|
+
from pydantic.json_schema import SkipJsonSchema
|
|
7
|
+
|
|
8
|
+
from opentrons.types import MountType
|
|
9
|
+
|
|
10
|
+
from ..movement_common import DestinationPositionResult
|
|
11
|
+
from ..command import (
|
|
12
|
+
AbstractCommandImpl,
|
|
13
|
+
BaseCommand,
|
|
14
|
+
BaseCommandCreate,
|
|
15
|
+
SuccessData,
|
|
16
|
+
)
|
|
17
|
+
from opentrons.protocol_engine.types import DeckPoint
|
|
18
|
+
from opentrons.protocol_engine.errors.error_occurrence import ErrorOccurrence
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
if TYPE_CHECKING:
|
|
22
|
+
from opentrons.protocol_engine.execution import MovementHandler
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
MoveToCommandType = Literal["robot/moveTo"]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _remove_default(s: dict[str, Any]) -> None:
|
|
29
|
+
s.pop("default", None)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class MoveToParams(BaseModel):
|
|
33
|
+
"""Payload required to move to a destination position."""
|
|
34
|
+
|
|
35
|
+
mount: MountType = Field(
|
|
36
|
+
...,
|
|
37
|
+
description="The mount to move to the destination point.",
|
|
38
|
+
)
|
|
39
|
+
destination: DeckPoint = Field(
|
|
40
|
+
...,
|
|
41
|
+
description="X, Y and Z coordinates in mm from deck's origin location (left-front-bottom corner of work space)",
|
|
42
|
+
)
|
|
43
|
+
speed: float | SkipJsonSchema[None] = Field(
|
|
44
|
+
default=None,
|
|
45
|
+
description="The max velocity to move the axes at. Will fall to hardware defaults if none provided.",
|
|
46
|
+
json_schema_extra=_remove_default,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class MoveToResult(DestinationPositionResult):
|
|
51
|
+
"""Result data from the execution of a MoveTo command."""
|
|
52
|
+
|
|
53
|
+
pass
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class MoveToImplementation(
|
|
57
|
+
AbstractCommandImpl[MoveToParams, SuccessData[MoveToResult]]
|
|
58
|
+
):
|
|
59
|
+
"""MoveTo command implementation."""
|
|
60
|
+
|
|
61
|
+
def __init__(
|
|
62
|
+
self,
|
|
63
|
+
movement: MovementHandler,
|
|
64
|
+
**kwargs: object,
|
|
65
|
+
) -> None:
|
|
66
|
+
self._movement = movement
|
|
67
|
+
|
|
68
|
+
async def execute(self, params: MoveToParams) -> SuccessData[MoveToResult]:
|
|
69
|
+
"""Move to a given destination on a flex."""
|
|
70
|
+
x, y, z = await self._movement.move_mount_to(
|
|
71
|
+
mount=params.mount, destination=params.destination, speed=params.speed
|
|
72
|
+
)
|
|
73
|
+
return SuccessData(
|
|
74
|
+
public=MoveToResult(position=DeckPoint(x=x, y=y, z=z)),
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class MoveTo(BaseCommand[MoveToParams, MoveToResult, ErrorOccurrence]):
|
|
79
|
+
"""MoveTo command model."""
|
|
80
|
+
|
|
81
|
+
commandType: MoveToCommandType = "robot/moveTo"
|
|
82
|
+
params: MoveToParams
|
|
83
|
+
result: Optional[MoveToResult] = None
|
|
84
|
+
|
|
85
|
+
_ImplementationCls: Type[MoveToImplementation] = MoveToImplementation
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class MoveToCreate(BaseCommandCreate[MoveToParams]):
|
|
89
|
+
"""MoveTo command request model."""
|
|
90
|
+
|
|
91
|
+
commandType: MoveToCommandType = "robot/moveTo"
|
|
92
|
+
params: MoveToParams
|
|
93
|
+
|
|
94
|
+
_CommandCls: Type[MoveTo] = MoveTo
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"""Command models for opening a gripper jaw."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
from typing import Literal, Type, Optional
|
|
4
|
+
from opentrons.hardware_control import HardwareControlAPI
|
|
5
|
+
from opentrons.protocol_engine.resources import ensure_ot3_hardware
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel
|
|
8
|
+
|
|
9
|
+
from ..command import (
|
|
10
|
+
AbstractCommandImpl,
|
|
11
|
+
BaseCommand,
|
|
12
|
+
BaseCommandCreate,
|
|
13
|
+
SuccessData,
|
|
14
|
+
)
|
|
15
|
+
from opentrons.protocol_engine.errors.error_occurrence import ErrorOccurrence
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
openGripperJawCommandType = Literal["robot/openGripperJaw"]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class openGripperJawParams(BaseModel):
|
|
22
|
+
"""Payload required to release a gripper."""
|
|
23
|
+
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class openGripperJawResult(BaseModel):
|
|
28
|
+
"""Result data from the execution of a openGripperJaw command."""
|
|
29
|
+
|
|
30
|
+
pass
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class openGripperJawImplementation(
|
|
34
|
+
AbstractCommandImpl[openGripperJawParams, SuccessData[openGripperJawResult]]
|
|
35
|
+
):
|
|
36
|
+
"""openGripperJaw command implementation."""
|
|
37
|
+
|
|
38
|
+
def __init__(
|
|
39
|
+
self,
|
|
40
|
+
hardware_api: HardwareControlAPI,
|
|
41
|
+
**kwargs: object,
|
|
42
|
+
) -> None:
|
|
43
|
+
self._hardware_api = hardware_api
|
|
44
|
+
|
|
45
|
+
async def execute(
|
|
46
|
+
self, params: openGripperJawParams
|
|
47
|
+
) -> SuccessData[openGripperJawResult]:
|
|
48
|
+
"""Release the gripper."""
|
|
49
|
+
ot3_hardware_api = ensure_ot3_hardware(self._hardware_api)
|
|
50
|
+
|
|
51
|
+
await ot3_hardware_api.home_gripper_jaw()
|
|
52
|
+
return SuccessData(
|
|
53
|
+
public=openGripperJawResult(),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class openGripperJaw(
|
|
58
|
+
BaseCommand[openGripperJawParams, openGripperJawResult, ErrorOccurrence]
|
|
59
|
+
):
|
|
60
|
+
"""openGripperJaw command model."""
|
|
61
|
+
|
|
62
|
+
commandType: openGripperJawCommandType = "robot/openGripperJaw"
|
|
63
|
+
params: openGripperJawParams
|
|
64
|
+
result: Optional[openGripperJawResult] = None
|
|
65
|
+
|
|
66
|
+
_ImplementationCls: Type[
|
|
67
|
+
openGripperJawImplementation
|
|
68
|
+
] = openGripperJawImplementation
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class openGripperJawCreate(BaseCommandCreate[openGripperJawParams]):
|
|
72
|
+
"""openGripperJaw command request model."""
|
|
73
|
+
|
|
74
|
+
commandType: openGripperJawCommandType = "robot/openGripperJaw"
|
|
75
|
+
params: openGripperJawParams
|
|
76
|
+
|
|
77
|
+
_CommandCls: Type[openGripperJaw] = openGripperJaw
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"""Save pipette position command request, result, and implementation models."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
from typing import TYPE_CHECKING, Optional, Type, Any
|
|
5
|
+
|
|
4
6
|
from pydantic import BaseModel, Field
|
|
5
|
-
from
|
|
7
|
+
from pydantic.json_schema import SkipJsonSchema
|
|
6
8
|
from typing_extensions import Literal
|
|
7
9
|
|
|
8
10
|
from ..types import DeckPoint
|
|
@@ -16,19 +18,26 @@ if TYPE_CHECKING:
|
|
|
16
18
|
SavePositionCommandType = Literal["savePosition"]
|
|
17
19
|
|
|
18
20
|
|
|
21
|
+
def _remove_default(s: dict[str, Any]) -> None:
|
|
22
|
+
s.pop("default", None)
|
|
23
|
+
|
|
24
|
+
|
|
19
25
|
class SavePositionParams(BaseModel):
|
|
20
26
|
"""Payload needed to save a pipette's current position."""
|
|
21
27
|
|
|
22
28
|
pipetteId: str = Field(
|
|
23
29
|
..., description="Unique identifier of the pipette in question."
|
|
24
30
|
)
|
|
25
|
-
positionId:
|
|
31
|
+
positionId: str | SkipJsonSchema[None] = Field(
|
|
26
32
|
None,
|
|
27
33
|
description="An optional ID to assign to this command instance. "
|
|
28
34
|
"Auto-assigned if not defined.",
|
|
35
|
+
json_schema_extra=_remove_default,
|
|
29
36
|
)
|
|
30
|
-
failOnNotHomed:
|
|
31
|
-
True,
|
|
37
|
+
failOnNotHomed: bool | SkipJsonSchema[None] = Field(
|
|
38
|
+
True,
|
|
39
|
+
description="Require all axes to be homed before saving position.",
|
|
40
|
+
json_schema_extra=_remove_default,
|
|
32
41
|
)
|
|
33
42
|
|
|
34
43
|
|
|
@@ -86,7 +95,7 @@ class SavePosition(
|
|
|
86
95
|
|
|
87
96
|
commandType: SavePositionCommandType = "savePosition"
|
|
88
97
|
params: SavePositionParams
|
|
89
|
-
result: Optional[SavePositionResult]
|
|
98
|
+
result: Optional[SavePositionResult] = None
|
|
90
99
|
|
|
91
100
|
_ImplementationCls: Type[SavePositionImplementation] = SavePositionImplementation
|
|
92
101
|
|
|
@@ -53,7 +53,7 @@ class SetRailLights(
|
|
|
53
53
|
|
|
54
54
|
commandType: SetRailLightsCommandType = "setRailLights"
|
|
55
55
|
params: SetRailLightsParams
|
|
56
|
-
result: Optional[SetRailLightsResult]
|
|
56
|
+
result: Optional[SetRailLightsResult] = None
|
|
57
57
|
|
|
58
58
|
_ImplementationCls: Type[SetRailLightsImplementation] = SetRailLightsImplementation
|
|
59
59
|
|
|
@@ -75,7 +75,7 @@ class SetStatusBar(
|
|
|
75
75
|
|
|
76
76
|
commandType: SetStatusBarCommandType = "setStatusBar"
|
|
77
77
|
params: SetStatusBarParams
|
|
78
|
-
result: Optional[SetStatusBarResult]
|
|
78
|
+
result: Optional[SetStatusBarResult] = None
|
|
79
79
|
|
|
80
80
|
_ImplementationCls: Type[SetStatusBarImplementation] = SetStatusBarImplementation
|
|
81
81
|
|
|
@@ -72,7 +72,7 @@ class DeactivateTemperature(
|
|
|
72
72
|
commandType: DeactivateTemperatureCommandType = "temperatureModule/deactivate"
|
|
73
73
|
|
|
74
74
|
params: DeactivateTemperatureParams
|
|
75
|
-
result: Optional[DeactivateTemperatureResult]
|
|
75
|
+
result: Optional[DeactivateTemperatureResult] = None
|
|
76
76
|
|
|
77
77
|
_ImplementationCls: Type[DeactivateTemperatureImpl] = DeactivateTemperatureImpl
|
|
78
78
|
|
|
@@ -81,7 +81,7 @@ class SetTargetTemperature(
|
|
|
81
81
|
"temperatureModule/setTargetTemperature"
|
|
82
82
|
)
|
|
83
83
|
params: SetTargetTemperatureParams
|
|
84
|
-
result: Optional[SetTargetTemperatureResult]
|
|
84
|
+
result: Optional[SetTargetTemperatureResult] = None
|
|
85
85
|
|
|
86
86
|
_ImplementationCls: Type[SetTargetTemperatureImpl] = SetTargetTemperatureImpl
|
|
87
87
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"""Command models to wait for target temperature of a Temperature Module."""
|
|
2
2
|
from __future__ import annotations
|
|
3
|
-
from typing import Optional, TYPE_CHECKING
|
|
4
|
-
from typing_extensions import Literal, Type
|
|
3
|
+
from typing import Optional, TYPE_CHECKING, Any
|
|
5
4
|
|
|
5
|
+
from typing_extensions import Literal, Type
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
|
+
from pydantic.json_schema import SkipJsonSchema
|
|
7
8
|
|
|
8
9
|
from ..command import AbstractCommandImpl, BaseCommand, BaseCommandCreate, SuccessData
|
|
9
10
|
from ...errors.error_occurrence import ErrorOccurrence
|
|
@@ -15,11 +16,15 @@ if TYPE_CHECKING:
|
|
|
15
16
|
WaitForTemperatureCommandType = Literal["temperatureModule/waitForTemperature"]
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
def _remove_default(s: dict[str, Any]) -> None:
|
|
20
|
+
s.pop("default", None)
|
|
21
|
+
|
|
22
|
+
|
|
18
23
|
class WaitForTemperatureParams(BaseModel):
|
|
19
24
|
"""Input parameters to wait for a Temperature Module's target temperature."""
|
|
20
25
|
|
|
21
26
|
moduleId: str = Field(..., description="Unique ID of the Temperature Module.")
|
|
22
|
-
celsius:
|
|
27
|
+
celsius: float | SkipJsonSchema[None] = Field(
|
|
23
28
|
None,
|
|
24
29
|
description="Target temperature in °C. If not specified, will "
|
|
25
30
|
"default to the module's target temperature. "
|
|
@@ -27,6 +32,7 @@ class WaitForTemperatureParams(BaseModel):
|
|
|
27
32
|
"could lead to unpredictable behavior and hence is not "
|
|
28
33
|
"recommended for use. This parameter can be removed in a "
|
|
29
34
|
"future version without prior notice.",
|
|
35
|
+
json_schema_extra=_remove_default,
|
|
30
36
|
)
|
|
31
37
|
|
|
32
38
|
|
|
@@ -84,7 +90,7 @@ class WaitForTemperature(
|
|
|
84
90
|
|
|
85
91
|
commandType: WaitForTemperatureCommandType = "temperatureModule/waitForTemperature"
|
|
86
92
|
params: WaitForTemperatureParams
|
|
87
|
-
result: Optional[WaitForTemperatureResult]
|
|
93
|
+
result: Optional[WaitForTemperatureResult] = None
|
|
88
94
|
|
|
89
95
|
_ImplementationCls: Type[WaitForTemperatureImpl] = WaitForTemperatureImpl
|
|
90
96
|
|
|
@@ -73,7 +73,7 @@ class CloseLid(BaseCommand[CloseLidParams, CloseLidResult, ErrorOccurrence]):
|
|
|
73
73
|
|
|
74
74
|
commandType: CloseLidCommandType = "thermocycler/closeLid"
|
|
75
75
|
params: CloseLidParams
|
|
76
|
-
result: Optional[CloseLidResult]
|
|
76
|
+
result: Optional[CloseLidResult] = None
|
|
77
77
|
|
|
78
78
|
_ImplementationCls: Type[CloseLidImpl] = CloseLidImpl
|
|
79
79
|
|
|
@@ -66,7 +66,7 @@ class DeactivateBlock(
|
|
|
66
66
|
|
|
67
67
|
commandType: DeactivateBlockCommandType = "thermocycler/deactivateBlock"
|
|
68
68
|
params: DeactivateBlockParams
|
|
69
|
-
result: Optional[DeactivateBlockResult]
|
|
69
|
+
result: Optional[DeactivateBlockResult] = None
|
|
70
70
|
|
|
71
71
|
_ImplementationCls: Type[DeactivateBlockImpl] = DeactivateBlockImpl
|
|
72
72
|
|
|
@@ -66,7 +66,7 @@ class DeactivateLid(
|
|
|
66
66
|
|
|
67
67
|
commandType: DeactivateLidCommandType = "thermocycler/deactivateLid"
|
|
68
68
|
params: DeactivateLidParams
|
|
69
|
-
result: Optional[DeactivateLidResult]
|
|
69
|
+
result: Optional[DeactivateLidResult] = None
|
|
70
70
|
|
|
71
71
|
_ImplementationCls: Type[DeactivateLidImpl] = DeactivateLidImpl
|
|
72
72
|
|
|
@@ -73,7 +73,7 @@ class OpenLid(BaseCommand[OpenLidParams, OpenLidResult, ErrorOccurrence]):
|
|
|
73
73
|
|
|
74
74
|
commandType: OpenLidCommandType = "thermocycler/openLid"
|
|
75
75
|
params: OpenLidParams
|
|
76
|
-
result: Optional[OpenLidResult]
|
|
76
|
+
result: Optional[OpenLidResult] = None
|
|
77
77
|
|
|
78
78
|
_ImplementationCls: Type[OpenLidImpl] = OpenLidImpl
|
|
79
79
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"""Command models to execute a Thermocycler profile."""
|
|
2
2
|
from __future__ import annotations
|
|
3
|
-
from typing import List, Optional, TYPE_CHECKING, overload, Union
|
|
3
|
+
from typing import List, Optional, TYPE_CHECKING, overload, Union, Any
|
|
4
4
|
from typing_extensions import Literal, Type
|
|
5
5
|
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
|
+
from pydantic.json_schema import SkipJsonSchema
|
|
7
8
|
|
|
8
9
|
from opentrons.hardware_control.modules.types import ThermocyclerStep, ThermocyclerCycle
|
|
9
10
|
|
|
@@ -21,6 +22,10 @@ if TYPE_CHECKING:
|
|
|
21
22
|
RunExtendedProfileCommandType = Literal["thermocycler/runExtendedProfile"]
|
|
22
23
|
|
|
23
24
|
|
|
25
|
+
def _remove_default(s: dict[str, Any]) -> None:
|
|
26
|
+
s.pop("default", None)
|
|
27
|
+
|
|
28
|
+
|
|
24
29
|
class ProfileStep(BaseModel):
|
|
25
30
|
"""An individual step in a Thermocycler extended profile."""
|
|
26
31
|
|
|
@@ -45,10 +50,11 @@ class RunExtendedProfileParams(BaseModel):
|
|
|
45
50
|
...,
|
|
46
51
|
description="Elements of the profile. Each can be either a step or a cycle.",
|
|
47
52
|
)
|
|
48
|
-
blockMaxVolumeUl:
|
|
53
|
+
blockMaxVolumeUl: float | SkipJsonSchema[None] = Field(
|
|
49
54
|
None,
|
|
50
55
|
description="Amount of liquid in uL of the most-full well"
|
|
51
56
|
" in labware loaded onto the thermocycler.",
|
|
57
|
+
json_schema_extra=_remove_default,
|
|
52
58
|
)
|
|
53
59
|
|
|
54
60
|
|
|
@@ -151,7 +157,7 @@ class RunExtendedProfile(
|
|
|
151
157
|
|
|
152
158
|
commandType: RunExtendedProfileCommandType = "thermocycler/runExtendedProfile"
|
|
153
159
|
params: RunExtendedProfileParams
|
|
154
|
-
result: Optional[RunExtendedProfileResult]
|
|
160
|
+
result: Optional[RunExtendedProfileResult] = None
|
|
155
161
|
|
|
156
162
|
_ImplementationCls: Type[RunExtendedProfileImpl] = RunExtendedProfileImpl
|
|
157
163
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"""Command models to execute a Thermocycler profile."""
|
|
2
2
|
from __future__ import annotations
|
|
3
|
-
from typing import List, Optional, TYPE_CHECKING
|
|
3
|
+
from typing import List, Optional, TYPE_CHECKING, Any
|
|
4
4
|
from typing_extensions import Literal, Type
|
|
5
5
|
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
|
+
from pydantic.json_schema import SkipJsonSchema
|
|
7
8
|
|
|
8
9
|
from opentrons.hardware_control.modules.types import ThermocyclerStep
|
|
9
10
|
|
|
@@ -18,6 +19,10 @@ if TYPE_CHECKING:
|
|
|
18
19
|
RunProfileCommandType = Literal["thermocycler/runProfile"]
|
|
19
20
|
|
|
20
21
|
|
|
22
|
+
def _remove_default(s: dict[str, Any]) -> None:
|
|
23
|
+
s.pop("default", None)
|
|
24
|
+
|
|
25
|
+
|
|
21
26
|
class RunProfileStepParams(BaseModel):
|
|
22
27
|
"""Input parameters for an individual Thermocycler profile step."""
|
|
23
28
|
|
|
@@ -35,10 +40,11 @@ class RunProfileParams(BaseModel):
|
|
|
35
40
|
...,
|
|
36
41
|
description="Array of profile steps with target temperature and temperature hold time.",
|
|
37
42
|
)
|
|
38
|
-
blockMaxVolumeUl:
|
|
43
|
+
blockMaxVolumeUl: float | SkipJsonSchema[None] = Field(
|
|
39
44
|
None,
|
|
40
45
|
description="Amount of liquid in uL of the most-full well"
|
|
41
46
|
" in labware loaded onto the thermocycler.",
|
|
47
|
+
json_schema_extra=_remove_default,
|
|
42
48
|
)
|
|
43
49
|
|
|
44
50
|
|
|
@@ -104,7 +110,7 @@ class RunProfile(BaseCommand[RunProfileParams, RunProfileResult, ErrorOccurrence
|
|
|
104
110
|
|
|
105
111
|
commandType: RunProfileCommandType = "thermocycler/runProfile"
|
|
106
112
|
params: RunProfileParams
|
|
107
|
-
result: Optional[RunProfileResult]
|
|
113
|
+
result: Optional[RunProfileResult] = None
|
|
108
114
|
|
|
109
115
|
_ImplementationCls: Type[RunProfileImpl] = RunProfileImpl
|
|
110
116
|
|