opentrons 8.2.0a4__py2.py3-none-any.whl → 8.3.0a1__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.
Files changed (229) hide show
  1. opentrons/calibration_storage/deck_configuration.py +3 -3
  2. opentrons/calibration_storage/file_operators.py +3 -3
  3. opentrons/calibration_storage/helpers.py +3 -1
  4. opentrons/calibration_storage/ot2/models/v1.py +16 -29
  5. opentrons/calibration_storage/ot2/tip_length.py +7 -4
  6. opentrons/calibration_storage/ot3/models/v1.py +14 -23
  7. opentrons/cli/analyze.py +18 -6
  8. opentrons/config/defaults_ot3.py +1 -0
  9. opentrons/drivers/asyncio/communication/__init__.py +2 -0
  10. opentrons/drivers/asyncio/communication/errors.py +16 -3
  11. opentrons/drivers/asyncio/communication/serial_connection.py +24 -9
  12. opentrons/drivers/command_builder.py +2 -2
  13. opentrons/drivers/flex_stacker/__init__.py +9 -0
  14. opentrons/drivers/flex_stacker/abstract.py +89 -0
  15. opentrons/drivers/flex_stacker/driver.py +260 -0
  16. opentrons/drivers/flex_stacker/simulator.py +109 -0
  17. opentrons/drivers/flex_stacker/types.py +138 -0
  18. opentrons/drivers/heater_shaker/driver.py +18 -3
  19. opentrons/drivers/temp_deck/driver.py +13 -3
  20. opentrons/drivers/thermocycler/driver.py +17 -3
  21. opentrons/execute.py +3 -1
  22. opentrons/hardware_control/__init__.py +1 -2
  23. opentrons/hardware_control/api.py +28 -20
  24. opentrons/hardware_control/backends/flex_protocol.py +17 -7
  25. opentrons/hardware_control/backends/ot3controller.py +213 -63
  26. opentrons/hardware_control/backends/ot3simulator.py +18 -9
  27. opentrons/hardware_control/backends/ot3utils.py +43 -15
  28. opentrons/hardware_control/dev_types.py +4 -0
  29. opentrons/hardware_control/emulation/heater_shaker.py +4 -0
  30. opentrons/hardware_control/emulation/module_server/client.py +1 -1
  31. opentrons/hardware_control/emulation/module_server/server.py +5 -3
  32. opentrons/hardware_control/emulation/settings.py +3 -4
  33. opentrons/hardware_control/instruments/ot2/instrument_calibration.py +2 -1
  34. opentrons/hardware_control/instruments/ot2/pipette.py +15 -22
  35. opentrons/hardware_control/instruments/ot2/pipette_handler.py +8 -1
  36. opentrons/hardware_control/instruments/ot3/gripper.py +2 -2
  37. opentrons/hardware_control/instruments/ot3/pipette.py +23 -22
  38. opentrons/hardware_control/instruments/ot3/pipette_handler.py +10 -1
  39. opentrons/hardware_control/modules/mod_abc.py +2 -2
  40. opentrons/hardware_control/motion_utilities.py +68 -0
  41. opentrons/hardware_control/nozzle_manager.py +39 -41
  42. opentrons/hardware_control/ot3_calibration.py +1 -1
  43. opentrons/hardware_control/ot3api.py +60 -23
  44. opentrons/hardware_control/protocols/gripper_controller.py +3 -0
  45. opentrons/hardware_control/protocols/hardware_manager.py +5 -1
  46. opentrons/hardware_control/protocols/liquid_handler.py +18 -0
  47. opentrons/hardware_control/protocols/motion_controller.py +6 -0
  48. opentrons/hardware_control/robot_calibration.py +1 -1
  49. opentrons/hardware_control/types.py +61 -0
  50. opentrons/protocol_api/__init__.py +20 -1
  51. opentrons/protocol_api/_liquid.py +24 -49
  52. opentrons/protocol_api/_liquid_properties.py +754 -0
  53. opentrons/protocol_api/_types.py +24 -0
  54. opentrons/protocol_api/core/common.py +2 -0
  55. opentrons/protocol_api/core/engine/instrument.py +82 -10
  56. opentrons/protocol_api/core/engine/labware.py +29 -7
  57. opentrons/protocol_api/core/engine/protocol.py +130 -5
  58. opentrons/protocol_api/core/engine/robot.py +139 -0
  59. opentrons/protocol_api/core/engine/well.py +4 -1
  60. opentrons/protocol_api/core/instrument.py +46 -4
  61. opentrons/protocol_api/core/labware.py +13 -4
  62. opentrons/protocol_api/core/legacy/legacy_instrument_core.py +37 -3
  63. opentrons/protocol_api/core/legacy/legacy_labware_core.py +13 -4
  64. opentrons/protocol_api/core/legacy/legacy_protocol_core.py +32 -1
  65. opentrons/protocol_api/core/legacy/legacy_robot_core.py +0 -0
  66. opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py +37 -3
  67. opentrons/protocol_api/core/protocol.py +34 -1
  68. opentrons/protocol_api/core/robot.py +51 -0
  69. opentrons/protocol_api/instrument_context.py +158 -44
  70. opentrons/protocol_api/labware.py +231 -7
  71. opentrons/protocol_api/module_contexts.py +21 -17
  72. opentrons/protocol_api/protocol_context.py +125 -4
  73. opentrons/protocol_api/robot_context.py +204 -32
  74. opentrons/protocol_api/validation.py +262 -3
  75. opentrons/protocol_engine/__init__.py +4 -0
  76. opentrons/protocol_engine/actions/actions.py +2 -3
  77. opentrons/protocol_engine/clients/sync_client.py +18 -0
  78. opentrons/protocol_engine/commands/__init__.py +81 -0
  79. opentrons/protocol_engine/commands/absorbance_reader/close_lid.py +0 -2
  80. opentrons/protocol_engine/commands/absorbance_reader/initialize.py +19 -5
  81. opentrons/protocol_engine/commands/absorbance_reader/open_lid.py +0 -1
  82. opentrons/protocol_engine/commands/absorbance_reader/read.py +32 -9
  83. opentrons/protocol_engine/commands/air_gap_in_place.py +160 -0
  84. opentrons/protocol_engine/commands/aspirate.py +103 -53
  85. opentrons/protocol_engine/commands/aspirate_in_place.py +55 -51
  86. opentrons/protocol_engine/commands/blow_out.py +44 -39
  87. opentrons/protocol_engine/commands/blow_out_in_place.py +21 -32
  88. opentrons/protocol_engine/commands/calibration/calibrate_gripper.py +13 -6
  89. opentrons/protocol_engine/commands/calibration/calibrate_module.py +1 -1
  90. opentrons/protocol_engine/commands/calibration/calibrate_pipette.py +3 -3
  91. opentrons/protocol_engine/commands/calibration/move_to_maintenance_position.py +1 -1
  92. opentrons/protocol_engine/commands/command.py +73 -66
  93. opentrons/protocol_engine/commands/command_unions.py +101 -1
  94. opentrons/protocol_engine/commands/comment.py +1 -1
  95. opentrons/protocol_engine/commands/configure_for_volume.py +10 -3
  96. opentrons/protocol_engine/commands/configure_nozzle_layout.py +6 -4
  97. opentrons/protocol_engine/commands/custom.py +6 -12
  98. opentrons/protocol_engine/commands/dispense.py +82 -48
  99. opentrons/protocol_engine/commands/dispense_in_place.py +71 -51
  100. opentrons/protocol_engine/commands/drop_tip.py +52 -31
  101. opentrons/protocol_engine/commands/drop_tip_in_place.py +13 -3
  102. opentrons/protocol_engine/commands/generate_command_schema.py +4 -11
  103. opentrons/protocol_engine/commands/get_next_tip.py +134 -0
  104. opentrons/protocol_engine/commands/get_tip_presence.py +1 -1
  105. opentrons/protocol_engine/commands/heater_shaker/close_labware_latch.py +1 -1
  106. opentrons/protocol_engine/commands/heater_shaker/deactivate_heater.py +1 -1
  107. opentrons/protocol_engine/commands/heater_shaker/deactivate_shaker.py +1 -1
  108. opentrons/protocol_engine/commands/heater_shaker/open_labware_latch.py +1 -1
  109. opentrons/protocol_engine/commands/heater_shaker/set_and_wait_for_shake_speed.py +1 -1
  110. opentrons/protocol_engine/commands/heater_shaker/set_target_temperature.py +1 -1
  111. opentrons/protocol_engine/commands/heater_shaker/wait_for_temperature.py +10 -4
  112. opentrons/protocol_engine/commands/home.py +13 -4
  113. opentrons/protocol_engine/commands/liquid_probe.py +67 -24
  114. opentrons/protocol_engine/commands/load_labware.py +29 -7
  115. opentrons/protocol_engine/commands/load_lid.py +146 -0
  116. opentrons/protocol_engine/commands/load_lid_stack.py +189 -0
  117. opentrons/protocol_engine/commands/load_liquid.py +12 -4
  118. opentrons/protocol_engine/commands/load_liquid_class.py +144 -0
  119. opentrons/protocol_engine/commands/load_module.py +31 -10
  120. opentrons/protocol_engine/commands/load_pipette.py +19 -8
  121. opentrons/protocol_engine/commands/magnetic_module/disengage.py +1 -1
  122. opentrons/protocol_engine/commands/magnetic_module/engage.py +1 -1
  123. opentrons/protocol_engine/commands/move_labware.py +19 -6
  124. opentrons/protocol_engine/commands/move_relative.py +35 -25
  125. opentrons/protocol_engine/commands/move_to_addressable_area.py +40 -27
  126. opentrons/protocol_engine/commands/move_to_addressable_area_for_drop_tip.py +53 -32
  127. opentrons/protocol_engine/commands/move_to_coordinates.py +36 -22
  128. opentrons/protocol_engine/commands/move_to_well.py +40 -24
  129. opentrons/protocol_engine/commands/movement_common.py +338 -0
  130. opentrons/protocol_engine/commands/pick_up_tip.py +49 -27
  131. opentrons/protocol_engine/commands/pipetting_common.py +169 -87
  132. opentrons/protocol_engine/commands/prepare_to_aspirate.py +24 -33
  133. opentrons/protocol_engine/commands/reload_labware.py +1 -1
  134. opentrons/protocol_engine/commands/retract_axis.py +1 -1
  135. opentrons/protocol_engine/commands/robot/__init__.py +69 -0
  136. opentrons/protocol_engine/commands/robot/close_gripper_jaw.py +86 -0
  137. opentrons/protocol_engine/commands/robot/common.py +18 -0
  138. opentrons/protocol_engine/commands/robot/move_axes_relative.py +101 -0
  139. opentrons/protocol_engine/commands/robot/move_axes_to.py +100 -0
  140. opentrons/protocol_engine/commands/robot/move_to.py +94 -0
  141. opentrons/protocol_engine/commands/robot/open_gripper_jaw.py +77 -0
  142. opentrons/protocol_engine/commands/save_position.py +14 -5
  143. opentrons/protocol_engine/commands/set_rail_lights.py +1 -1
  144. opentrons/protocol_engine/commands/set_status_bar.py +1 -1
  145. opentrons/protocol_engine/commands/temperature_module/deactivate.py +1 -1
  146. opentrons/protocol_engine/commands/temperature_module/set_target_temperature.py +1 -1
  147. opentrons/protocol_engine/commands/temperature_module/wait_for_temperature.py +10 -4
  148. opentrons/protocol_engine/commands/thermocycler/close_lid.py +1 -1
  149. opentrons/protocol_engine/commands/thermocycler/deactivate_block.py +1 -1
  150. opentrons/protocol_engine/commands/thermocycler/deactivate_lid.py +1 -1
  151. opentrons/protocol_engine/commands/thermocycler/open_lid.py +1 -1
  152. opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py +8 -2
  153. opentrons/protocol_engine/commands/thermocycler/run_profile.py +9 -3
  154. opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py +11 -4
  155. opentrons/protocol_engine/commands/thermocycler/set_target_lid_temperature.py +1 -1
  156. opentrons/protocol_engine/commands/thermocycler/wait_for_block_temperature.py +1 -1
  157. opentrons/protocol_engine/commands/thermocycler/wait_for_lid_temperature.py +1 -1
  158. opentrons/protocol_engine/commands/touch_tip.py +65 -16
  159. opentrons/protocol_engine/commands/unsafe/unsafe_blow_out_in_place.py +4 -1
  160. opentrons/protocol_engine/commands/unsafe/unsafe_drop_tip_in_place.py +12 -3
  161. opentrons/protocol_engine/commands/unsafe/unsafe_engage_axes.py +1 -4
  162. opentrons/protocol_engine/commands/unsafe/update_position_estimators.py +1 -4
  163. opentrons/protocol_engine/commands/verify_tip_presence.py +11 -4
  164. opentrons/protocol_engine/commands/wait_for_duration.py +10 -3
  165. opentrons/protocol_engine/commands/wait_for_resume.py +10 -3
  166. opentrons/protocol_engine/errors/__init__.py +8 -0
  167. opentrons/protocol_engine/errors/error_occurrence.py +19 -20
  168. opentrons/protocol_engine/errors/exceptions.py +50 -0
  169. opentrons/protocol_engine/execution/command_executor.py +1 -1
  170. opentrons/protocol_engine/execution/equipment.py +73 -5
  171. opentrons/protocol_engine/execution/gantry_mover.py +364 -8
  172. opentrons/protocol_engine/execution/movement.py +27 -0
  173. opentrons/protocol_engine/execution/pipetting.py +5 -1
  174. opentrons/protocol_engine/execution/tip_handler.py +4 -6
  175. opentrons/protocol_engine/notes/notes.py +1 -1
  176. opentrons/protocol_engine/protocol_engine.py +7 -6
  177. opentrons/protocol_engine/resources/labware_data_provider.py +1 -1
  178. opentrons/protocol_engine/resources/labware_validation.py +5 -0
  179. opentrons/protocol_engine/resources/module_data_provider.py +1 -1
  180. opentrons/protocol_engine/resources/pipette_data_provider.py +26 -0
  181. opentrons/protocol_engine/slot_standardization.py +9 -9
  182. opentrons/protocol_engine/state/_move_types.py +9 -5
  183. opentrons/protocol_engine/state/_well_math.py +193 -0
  184. opentrons/protocol_engine/state/addressable_areas.py +25 -61
  185. opentrons/protocol_engine/state/command_history.py +12 -0
  186. opentrons/protocol_engine/state/commands.py +17 -13
  187. opentrons/protocol_engine/state/files.py +10 -12
  188. opentrons/protocol_engine/state/fluid_stack.py +138 -0
  189. opentrons/protocol_engine/state/frustum_helpers.py +57 -32
  190. opentrons/protocol_engine/state/geometry.py +47 -1
  191. opentrons/protocol_engine/state/labware.py +79 -25
  192. opentrons/protocol_engine/state/liquid_classes.py +82 -0
  193. opentrons/protocol_engine/state/liquids.py +16 -4
  194. opentrons/protocol_engine/state/modules.py +52 -70
  195. opentrons/protocol_engine/state/motion.py +6 -1
  196. opentrons/protocol_engine/state/pipettes.py +144 -58
  197. opentrons/protocol_engine/state/state.py +21 -2
  198. opentrons/protocol_engine/state/state_summary.py +4 -2
  199. opentrons/protocol_engine/state/tips.py +11 -44
  200. opentrons/protocol_engine/state/update_types.py +343 -48
  201. opentrons/protocol_engine/state/wells.py +19 -11
  202. opentrons/protocol_engine/types.py +176 -28
  203. opentrons/protocol_reader/extract_labware_definitions.py +5 -2
  204. opentrons/protocol_reader/file_format_validator.py +5 -5
  205. opentrons/protocol_runner/json_file_reader.py +9 -3
  206. opentrons/protocol_runner/json_translator.py +51 -25
  207. opentrons/protocol_runner/legacy_command_mapper.py +66 -64
  208. opentrons/protocol_runner/protocol_runner.py +35 -4
  209. opentrons/protocol_runner/python_protocol_wrappers.py +1 -1
  210. opentrons/protocol_runner/run_orchestrator.py +13 -3
  211. opentrons/protocols/advanced_control/common.py +38 -0
  212. opentrons/protocols/advanced_control/mix.py +1 -1
  213. opentrons/protocols/advanced_control/transfers/__init__.py +0 -0
  214. opentrons/protocols/advanced_control/transfers/common.py +56 -0
  215. opentrons/protocols/advanced_control/{transfers.py → transfers/transfer.py} +10 -85
  216. opentrons/protocols/api_support/definitions.py +1 -1
  217. opentrons/protocols/api_support/instrument.py +1 -1
  218. opentrons/protocols/api_support/util.py +10 -0
  219. opentrons/protocols/labware.py +39 -6
  220. opentrons/protocols/models/json_protocol.py +5 -9
  221. opentrons/simulate.py +3 -1
  222. opentrons/types.py +162 -2
  223. opentrons/util/logging_config.py +1 -1
  224. {opentrons-8.2.0a4.dist-info → opentrons-8.3.0a1.dist-info}/METADATA +16 -15
  225. {opentrons-8.2.0a4.dist-info → opentrons-8.3.0a1.dist-info}/RECORD +229 -202
  226. {opentrons-8.2.0a4.dist-info → opentrons-8.3.0a1.dist-info}/WHEEL +1 -1
  227. {opentrons-8.2.0a4.dist-info → opentrons-8.3.0a1.dist-info}/LICENSE +0 -0
  228. {opentrons-8.2.0a4.dist-info → opentrons-8.3.0a1.dist-info}/entry_points.txt +0 -0
  229. {opentrons-8.2.0a4.dist-info → opentrons-8.3.0a1.dist-info}/top_level.txt +0 -0
@@ -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]
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]
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]
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 typing import TYPE_CHECKING, Optional, Type
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: Optional[str] = Field(
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: Optional[bool] = Field(
31
- True, descrption="Require all axes to be homed before saving position."
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: Optional[float] = Field(
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: Optional[float] = Field(
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
 
@@ -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: Optional[float] = Field(
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
 
@@ -1,9 +1,10 @@
1
1
  """Command models to start heating a Thermocycler's block."""
2
2
  from __future__ import annotations
3
- from typing import Optional, TYPE_CHECKING
3
+ from typing import 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 ..command import AbstractCommandImpl, BaseCommand, BaseCommandCreate, SuccessData
9
10
  from ...errors.error_occurrence import ErrorOccurrence
@@ -16,21 +17,27 @@ if TYPE_CHECKING:
16
17
  SetTargetBlockTemperatureCommandType = Literal["thermocycler/setTargetBlockTemperature"]
17
18
 
18
19
 
20
+ def _remove_default(s: dict[str, Any]) -> None:
21
+ s.pop("default", None)
22
+
23
+
19
24
  class SetTargetBlockTemperatureParams(BaseModel):
20
25
  """Input parameters to set a Thermocycler's target block temperature."""
21
26
 
22
27
  moduleId: str = Field(..., description="Unique ID of the Thermocycler Module.")
23
28
  celsius: float = Field(..., description="Target temperature in °C.")
24
- blockMaxVolumeUl: Optional[float] = Field(
29
+ blockMaxVolumeUl: float | SkipJsonSchema[None] = Field(
25
30
  None,
26
31
  description="Amount of liquid in uL of the most-full well"
27
32
  " in labware loaded onto the thermocycler.",
33
+ json_schema_extra=_remove_default,
28
34
  )
29
- holdTimeSeconds: Optional[float] = Field(
35
+ holdTimeSeconds: float | SkipJsonSchema[None] = Field(
30
36
  None,
31
37
  description="Amount of time, in seconds, to hold the temperature for."
32
38
  " If specified, a waitForBlockTemperature command will block until"
33
39
  " the given hold time has elapsed.",
40
+ json_schema_extra=_remove_default,
34
41
  )
35
42
 
36
43
 
@@ -113,7 +120,7 @@ class SetTargetBlockTemperature(
113
120
  "thermocycler/setTargetBlockTemperature"
114
121
  )
115
122
  params: SetTargetBlockTemperatureParams
116
- result: Optional[SetTargetBlockTemperatureResult]
123
+ result: Optional[SetTargetBlockTemperatureResult] = None
117
124
 
118
125
  _ImplementationCls: Type[
119
126
  SetTargetBlockTemperatureImpl
@@ -84,7 +84,7 @@ class SetTargetLidTemperature(
84
84
  "thermocycler/setTargetLidTemperature"
85
85
  )
86
86
  params: SetTargetLidTemperatureParams
87
- result: Optional[SetTargetLidTemperatureResult]
87
+ result: Optional[SetTargetLidTemperatureResult] = None
88
88
 
89
89
  _ImplementationCls: Type[SetTargetLidTemperatureImpl] = SetTargetLidTemperatureImpl
90
90
 
@@ -77,7 +77,7 @@ class WaitForBlockTemperature(
77
77
  "thermocycler/waitForBlockTemperature"
78
78
  )
79
79
  params: WaitForBlockTemperatureParams
80
- result: Optional[WaitForBlockTemperatureResult]
80
+ result: Optional[WaitForBlockTemperatureResult] = None
81
81
 
82
82
  _ImplementationCls: Type[WaitForBlockTemperatureImpl] = WaitForBlockTemperatureImpl
83
83
 
@@ -75,7 +75,7 @@ class WaitForLidTemperature(
75
75
 
76
76
  commandType: WaitForLidTemperatureCommandType = "thermocycler/waitForLidTemperature"
77
77
  params: WaitForLidTemperatureParams
78
- result: Optional[WaitForLidTemperatureResult]
78
+ result: Optional[WaitForLidTemperatureResult] = None
79
79
 
80
80
  _ImplementationCls: Type[WaitForLidTemperatureImpl] = WaitForLidTemperatureImpl
81
81