From 4e6c7c76fbc3fa34ae0e01af7c41782455d0ddd2 Mon Sep 17 00:00:00 2001 From: CaseyBatten Date: Wed, 29 Jan 2025 14:18:23 -0500 Subject: [PATCH] Engine behavior clean up and removal of unnecessary parameters --- api/src/opentrons/hardware_control/api.py | 7 +- api/src/opentrons/hardware_control/ot3api.py | 12 +- .../protocols/motion_controller.py | 2 +- api/src/opentrons/legacy_commands/commands.py | 4 +- api/src/opentrons/legacy_commands/types.py | 8 +- .../protocol_api/core/engine/instrument.py | 6 +- .../opentrons/protocol_api/core/instrument.py | 1 - .../core/legacy/legacy_instrument_core.py | 3 +- .../legacy_instrument_core.py | 3 +- .../protocol_api/instrument_context.py | 5 +- .../commands/evotip_dispense.py | 43 +---- .../commands/evotip_seal_pipette.py | 176 +++++++++--------- .../commands/evotip_unseal_pipette.py | 11 +- .../protocol_engine/execution/gantry_mover.py | 8 +- .../hardware_control/test_ot3_api.py | 8 +- .../execution/test_gantry_mover.py | 4 +- .../execution/test_tip_handler.py | 4 +- 17 files changed, 138 insertions(+), 167 deletions(-) diff --git a/api/src/opentrons/hardware_control/api.py b/api/src/opentrons/hardware_control/api.py index 7b3a8cb3258..8f1fce95224 100644 --- a/api/src/opentrons/hardware_control/api.py +++ b/api/src/opentrons/hardware_control/api.py @@ -778,7 +778,7 @@ async def move_axes( position: Mapping[Axis, float], speed: Optional[float] = None, max_speeds: Optional[Dict[Axis, float]] = None, - _expect_stalls: bool = False, + expect_stalls: bool = False, ) -> None: """Moves the effectors of the specified axis to the specified position. The effector of the x,y axis is the center of the carriage. @@ -1249,7 +1249,10 @@ async def pick_up_tip( await self.prepare_for_aspirate(mount) async def tip_drop_moves( - self, mount: top_types.Mount, home_after: bool = True + self, + mount: top_types.Mount, + home_after: bool = True, + ignore_plunger: Optional[bool] = False, ) -> None: spec, _ = self.plan_check_drop_tip(mount, home_after) diff --git a/api/src/opentrons/hardware_control/ot3api.py b/api/src/opentrons/hardware_control/ot3api.py index 634e71fcc74..89d04d165b4 100644 --- a/api/src/opentrons/hardware_control/ot3api.py +++ b/api/src/opentrons/hardware_control/ot3api.py @@ -1189,7 +1189,7 @@ async def move_to( speed: Optional[float] = None, critical_point: Optional[CriticalPoint] = None, max_speeds: Union[None, Dict[Axis, float], OT3AxisMap[float]] = None, - _expect_stalls: bool = False, + expect_stalls: bool = False, ) -> None: """Move the critical point of the specified mount to a location relative to the deck, at the specified speed.""" @@ -1233,7 +1233,7 @@ async def move_to( target_position, speed=speed, max_speeds=checked_max, - expect_stalls=_expect_stalls, + expect_stalls=expect_stalls, ) async def move_axes( # noqa: C901 @@ -1241,7 +1241,7 @@ async def move_axes( # noqa: C901 position: Mapping[Axis, float], speed: Optional[float] = None, max_speeds: Optional[Dict[Axis, float]] = None, - _expect_stalls: bool = False, + expect_stalls: bool = False, ) -> None: """Moves the effectors of the specified axis to the specified position. The effector of the x,y axis is the center of the carriage. @@ -1300,7 +1300,7 @@ async def move_axes( # noqa: C901 await self._move( target_position=absolute_positions, speed=speed, - expect_stalls=_expect_stalls, + expect_stalls=expect_stalls, ) async def move_rel( @@ -1311,7 +1311,7 @@ async def move_rel( max_speeds: Union[None, Dict[Axis, float], OT3AxisMap[float]] = None, check_bounds: MotionChecks = MotionChecks.NONE, fail_on_not_homed: bool = False, - _expect_stalls: bool = False, + expect_stalls: bool = False, ) -> None: """Move the critical point of the specified mount by a specified displacement in a specified direction, at the specified speed.""" @@ -1353,7 +1353,7 @@ async def move_rel( speed=speed, max_speeds=checked_max, check_bounds=check_bounds, - expect_stalls=_expect_stalls, + expect_stalls=expect_stalls, ) async def _cache_and_maybe_retract_mount(self, mount: OT3Mount) -> None: diff --git a/api/src/opentrons/hardware_control/protocols/motion_controller.py b/api/src/opentrons/hardware_control/protocols/motion_controller.py index 639efa37a8a..77f78506506 100644 --- a/api/src/opentrons/hardware_control/protocols/motion_controller.py +++ b/api/src/opentrons/hardware_control/protocols/motion_controller.py @@ -171,7 +171,7 @@ async def move_axes( position: Mapping[Axis, float], speed: Optional[float] = None, max_speeds: Optional[Dict[Axis, float]] = None, - _expect_stalls: bool = False, + expect_stalls: bool = False, ) -> None: """Moves the effectors of the specified axis to the specified position. The effector of the x,y axis is the center of the carriage. diff --git a/api/src/opentrons/legacy_commands/commands.py b/api/src/opentrons/legacy_commands/commands.py index a522a9d1d4a..4c14121bfc0 100755 --- a/api/src/opentrons/legacy_commands/commands.py +++ b/api/src/opentrons/legacy_commands/commands.py @@ -327,8 +327,10 @@ def unseal( def resin_tip_dispense( instrument: InstrumentContext, - flow_rate: float, + flow_rate: float | None, ) -> command_types.PressurizeCommand: + if flow_rate is None: + flow_rate = 10 # The Protocol Engine default for Resin Tip Dispense text = f"Pressurize pipette to dispense from resin tip at {flow_rate}uL/s." return { "name": command_types.PRESSURIZE, diff --git a/api/src/opentrons/legacy_commands/types.py b/api/src/opentrons/legacy_commands/types.py index aa99bc8d813..61302985c2c 100755 --- a/api/src/opentrons/legacy_commands/types.py +++ b/api/src/opentrons/legacy_commands/types.py @@ -540,15 +540,17 @@ class MoveLabwareCommandPayload(TextOnlyPayload): class SealCommandPayload(TextOnlyPayload): - pass + instrument: InstrumentContext + location: Union[None, Location, Well] class UnsealCommandPayload(TextOnlyPayload): - pass + instrument: InstrumentContext + location: Union[None, Location, Well] class PressurizeCommandPayload(TextOnlyPayload): - pass + instrument: InstrumentContext class MoveLabwareCommand(TypedDict): diff --git a/api/src/opentrons/protocol_api/core/engine/instrument.py b/api/src/opentrons/protocol_api/core/engine/instrument.py index ae76d263e2c..9cc0648665b 100644 --- a/api/src/opentrons/protocol_api/core/engine/instrument.py +++ b/api/src/opentrons/protocol_api/core/engine/instrument.py @@ -701,9 +701,7 @@ def resin_tip_seal( ) ) - def resin_tip_unseal( - self, location: Location, well_core: WellCore, home_after: Optional[bool] - ) -> None: + def resin_tip_unseal(self, location: Location, well_core: WellCore) -> None: well_name = well_core.get_name() labware_id = well_core.labware_id @@ -736,7 +734,6 @@ def resin_tip_unseal( labwareId=labware_id, wellName=well_name, wellLocation=well_location, - homeAfter=home_after, ) ) @@ -790,7 +787,6 @@ def resin_tip_dispense( wellLocation=well_location, volume=volume, flowRate=flow_rate, - pushOut=push_out, ) ) diff --git a/api/src/opentrons/protocol_api/core/instrument.py b/api/src/opentrons/protocol_api/core/instrument.py index 2cf797cbf6b..16da9bc724d 100644 --- a/api/src/opentrons/protocol_api/core/instrument.py +++ b/api/src/opentrons/protocol_api/core/instrument.py @@ -195,7 +195,6 @@ def resin_tip_unseal( self, location: types.Location, well_core: WellCoreType, - home_after: Optional[bool], ) -> None: ... diff --git a/api/src/opentrons/protocol_api/core/legacy/legacy_instrument_core.py b/api/src/opentrons/protocol_api/core/legacy/legacy_instrument_core.py index 21fe472d0a5..6efb2ddc973 100644 --- a/api/src/opentrons/protocol_api/core/legacy/legacy_instrument_core.py +++ b/api/src/opentrons/protocol_api/core/legacy/legacy_instrument_core.py @@ -320,7 +320,6 @@ def resin_tip_unseal( self, location: types.Location, well_core: WellCore, - home_after: Optional[bool], ) -> None: raise APIVersionError(api_element="Unsealing resin tips.") @@ -333,7 +332,7 @@ def resin_tip_dispense( push_out: Optional[float] = None, ) -> None: raise APIVersionError(api_element="Dispensing liquid from resin tips.") - + def home(self) -> None: """Home the mount""" self._protocol_interface.get_hardware().home_z( diff --git a/api/src/opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py b/api/src/opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py index b1a06325868..d260de36a74 100644 --- a/api/src/opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py +++ b/api/src/opentrons/protocol_api/core/legacy_simulator/legacy_instrument_core.py @@ -288,7 +288,6 @@ def resin_tip_unseal( self, location: types.Location, well_core: WellCore, - home_after: Optional[bool], ) -> None: raise APIVersionError(api_element="Unsealing resin tips.") @@ -301,7 +300,7 @@ def resin_tip_dispense( push_out: Optional[float] = None, ) -> None: raise APIVersionError(api_element="Dispensing liquid from resin tips.") - + def home(self) -> None: self._protocol_interface.set_last_location(None) diff --git a/api/src/opentrons/protocol_api/instrument_context.py b/api/src/opentrons/protocol_api/instrument_context.py index 9a504ed0d39..5ba0e3adcf0 100644 --- a/api/src/opentrons/protocol_api/instrument_context.py +++ b/api/src/opentrons/protocol_api/instrument_context.py @@ -1751,7 +1751,6 @@ def resin_tip_seal( def resin_tip_unseal( self, location: Union[labware.Well, labware.Labware], - home_after: Optional[bool] = None, ) -> InstrumentContext: """Release resin tips from the pipette. @@ -1784,9 +1783,7 @@ def resin_tip_unseal( location=well, ), ): - self._core.evotip_unseal( - location=well.top(), well_core=well._core, home_after=home_after - ) + self._core.resin_tip_unseal(location=well.top(), well_core=well._core) return self diff --git a/api/src/opentrons/protocol_engine/commands/evotip_dispense.py b/api/src/opentrons/protocol_engine/commands/evotip_dispense.py index ea634935568..2009171753a 100644 --- a/api/src/opentrons/protocol_engine/commands/evotip_dispense.py +++ b/api/src/opentrons/protocol_engine/commands/evotip_dispense.py @@ -44,10 +44,7 @@ class EvotipDispenseParams( ): """Payload required to dispense in place.""" - pushOut: Optional[float] = Field( - None, - description="Push the plunger a small amount farther than necessary for accurate low-volume dispensing", - ) + pass class EvotipDispenseResult(BaseLiquidHandlingResult): @@ -110,7 +107,7 @@ async def execute(self, params: EvotipDispenseParams) -> _ExecuteReturn: pipette_id=params.pipetteId, volume=params.volume, flow_rate=params.flowRate, - push_out=params.pushOut, + push_out=None, location_if_error={ "retryLocation": ( current_position.x, @@ -122,38 +119,10 @@ async def execute(self, params: EvotipDispenseParams) -> _ExecuteReturn: model_utils=self._model_utils, ) - if ( - isinstance(current_location, CurrentWell) - and current_location.pipette_id == params.pipetteId - ): - volume_added = ( - self._state_view.pipettes.get_liquid_dispensed_by_ejecting_volume( - pipette_id=params.pipetteId, volume=result.public.volume - ) - ) - if volume_added is not None: - volume_added *= self._state_view.geometry.get_nozzles_per_well( - current_location.labware_id, - current_location.well_name, - params.pipetteId, - ) - return SuccessData( - public=EvotipDispenseResult(volume=result.public.volume), - state_update=result.state_update.set_liquid_operated( - labware_id=current_location.labware_id, - well_names=self._state_view.geometry.get_wells_covered_by_pipette_with_active_well( - current_location.labware_id, - current_location.well_name, - params.pipetteId, - ), - volume_added=volume_added if volume_added is not None else CLEAR, - ), - ) - else: - return SuccessData( - public=EvotipDispenseResult(volume=result.public.volume), - state_update=result.state_update, - ) + return SuccessData( + public=EvotipDispenseResult(volume=result.public.volume), + state_update=result.state_update, + ) class EvotipDispense( diff --git a/api/src/opentrons/protocol_engine/commands/evotip_seal_pipette.py b/api/src/opentrons/protocol_engine/commands/evotip_seal_pipette.py index 105556dc0e4..12a87f95f65 100644 --- a/api/src/opentrons/protocol_engine/commands/evotip_seal_pipette.py +++ b/api/src/opentrons/protocol_engine/commands/evotip_seal_pipette.py @@ -38,23 +38,25 @@ TipHandler, GantryMover, PipettingHandler, - Had, ) from ..notes import CommandNoteAdder EvotipSealPipetteCommandType = Literal["evotipSealPipette"] +_PREP_DISTANCE_DEFAULT = 8.25 +_PRESS_DISTANCE_DEFAULT = 3.5 +_EJECTOR_PUSH_MM_DEFAULT = 7.0 class TipPickUpParams(BaseModel): prepDistance: float = Field( - default=8.25, description="The distance to move down to fit the tips on." + default=0, description="The distance to move down to fit the tips on." ) pressDistance: float = Field( - default=3.5, description="The distance to press on tips." + default=0, description="The distance to press on tips." ) - ejectorPushmm: float = Field( - default=7.0, + ejectorPushMm: float = Field( + default=0, description="The distance to back off to ensure that the tip presence sensors are not triggered.", ) @@ -129,81 +131,82 @@ def __init__( async def relative_pickup_tip( self, - pipette_id: str, - tip_geometry: TipGeometry, tip_pick_up_params: TipPickUpParams, mount: MountType, - press_fit: bool, - current_volume: float, ) -> None: prep_distance = tip_pick_up_params.prepDistance press_distance = tip_pick_up_params.pressDistance - ejector_push_mm = tip_pick_up_params.ejectorPushmm retract_distance = -1 * (prep_distance + press_distance) mount_axis = MotorAxis.LEFT_Z if mount == MountType.LEFT else MotorAxis.RIGHT_Z - if press_fit: - await self._gantry_mover.move_axes( - axis_map={mount_axis: prep_distance}, speed=10, relative_move=True - ) + # TODO chb, 2025-01-29): Factor out the movement constants and relocate this logic into the hardware controller + await self._gantry_mover.move_axes( + axis_map={mount_axis: prep_distance}, speed=10, relative_move=True + ) - # Drive mount down for press-fit - await self._gantry_mover.move_axes( - axis_map={mount_axis: press_distance}, - speed=10.0, - relative_move=True, - _expect_stalls=True, - ) - # retract cam : 11.05 - await self._gantry_mover.move_axes( - axis_map={mount_axis: retract_distance}, speed=5.5, relative_move=True - ) - else: - await self._gantry_mover.move_axes( - axis_map={mount_axis: -6}, speed=10, relative_move=True - ) + # Drive mount down for press-fit + await self._gantry_mover.move_axes( + axis_map={mount_axis: press_distance}, + speed=10.0, + relative_move=True, + expect_stalls=True, + ) + # retract cam : 11.05 + await self._gantry_mover.move_axes( + axis_map={mount_axis: retract_distance}, speed=5.5, relative_move=True + ) - # Drive Q down 3mm at fast speed - look into the pick up tip fuinction to find slow and fast: 10.0 - await self._gantry_mover.move_axes( - axis_map={MotorAxis.AXIS_96_CHANNEL_CAM: prep_distance}, - speed=10.0, - relative_move=True, - ) - # 2.8mm at slow speed - cam action pickup speed: 5.5 - await self._gantry_mover.move_axes( - axis_map={MotorAxis.AXIS_96_CHANNEL_CAM: press_distance}, - speed=5.5, - relative_move=True, - ) - # retract cam : 11.05 - await self._gantry_mover.move_axes( - axis_map={MotorAxis.AXIS_96_CHANNEL_CAM: retract_distance}, - speed=5.5, - relative_move=True, - ) + async def cam_action_relative_pickup_tip( + self, + tip_pick_up_params: TipPickUpParams, + mount: MountType, + ) -> None: + prep_distance = tip_pick_up_params.prepDistance + press_distance = tip_pick_up_params.pressDistance + ejector_push_mm = tip_pick_up_params.ejectorPushMm + retract_distance = -1 * (prep_distance + press_distance) - # Lower tip presence - await self._gantry_mover.move_axes( - axis_map={mount_axis: 2}, speed=10, relative_move=True - ) - await self._gantry_mover.move_axes( - axis_map={MotorAxis.AXIS_96_CHANNEL_CAM: ejector_push_mm}, - speed=5.5, - relative_move=True, - ) - await self._gantry_mover.move_axes( - axis_map={MotorAxis.AXIS_96_CHANNEL_CAM: -1 * ejector_push_mm}, - speed=5.5, - relative_move=True, - ) + mount_axis = MotorAxis.LEFT_Z if mount == MountType.LEFT else MotorAxis.RIGHT_Z - # cache_tip - if self._state_view.config.use_virtual_pipettes is False: - self._tip_handler.cache_tip(pipette_id, tip_geometry) - self._hardware_api.hardware_instruments[ - mount.to_hw_mount() - ].set_current_volume(current_volume) + # TODO chb, 2025-01-29): Factor out the movement constants and relocate this logic into the hardware controller + await self._gantry_mover.move_axes( + axis_map={mount_axis: -6}, speed=10, relative_move=True + ) + + # Drive Q down 3mm at fast speed - look into the pick up tip fuinction to find slow and fast: 10.0 + await self._gantry_mover.move_axes( + axis_map={MotorAxis.AXIS_96_CHANNEL_CAM: prep_distance}, + speed=10.0, + relative_move=True, + ) + # 2.8mm at slow speed - cam action pickup speed: 5.5 + await self._gantry_mover.move_axes( + axis_map={MotorAxis.AXIS_96_CHANNEL_CAM: press_distance}, + speed=5.5, + relative_move=True, + ) + # retract cam : 11.05 + await self._gantry_mover.move_axes( + axis_map={MotorAxis.AXIS_96_CHANNEL_CAM: retract_distance}, + speed=5.5, + relative_move=True, + ) + + # Lower tip presence + await self._gantry_mover.move_axes( + axis_map={mount_axis: 2}, speed=10, relative_move=True + ) + await self._gantry_mover.move_axes( + axis_map={MotorAxis.AXIS_96_CHANNEL_CAM: ejector_push_mm}, + speed=5.5, + relative_move=True, + ) + await self._gantry_mover.move_axes( + axis_map={MotorAxis.AXIS_96_CHANNEL_CAM: -1 * ejector_push_mm}, + speed=5.5, + relative_move=True, + ) async def execute( self, params: EvotipSealPipetteParams @@ -239,34 +242,31 @@ async def execute( ) maximum_volume = self._state_view.pipettes.get_maximum_volume(pipette_id) if self._state_view.pipettes.get_mount(pipette_id) == MountType.LEFT: - self._hardware_api.home(axes=[Axis.P_L]) + await self._hardware_api.home(axes=[Axis.P_L]) else: - self._hardware_api.home(axes=[Axis.P_R]) + await self._hardware_api.home(axes=[Axis.P_R]) # Begin relative pickup steps for the resin tips channels = self._state_view.tips.get_pipette_active_channels(pipette_id) mount = self._state_view.pipettes.get_mount(pipette_id) - if params.tipPickUpParams and channels != 96: + tip_pick_up_params = params.tipPickUpParams + if tip_pick_up_params is None: + tip_pick_up_params = TipPickUpParams( + prepDistance=_PREP_DISTANCE_DEFAULT, + pressDistance=_PRESS_DISTANCE_DEFAULT, + ejectorPushMm=_EJECTOR_PUSH_MM_DEFAULT, + ) + + if channels != 96: await self.relative_pickup_tip( - pipette_id=pipette_id, - tip_geometry=tip_geometry, - tip_pick_up_params=params.tipPickUpParams, + tip_pick_up_params=tip_pick_up_params, mount=mount, - press_fit=True, - current_volume=maximum_volume, ) elif channels == 96: - pick_up_params = ( - params.tipPickUpParams if params.tipPickUpParams else TipPickUpParams() - ) - await self.relative_pickup_tip( - pipette_id=pipette_id, - tip_geometry=tip_geometry, - tip_pick_up_params=pick_up_params, + await self.cam_action_relative_pickup_tip( + tip_pick_up_params=tip_pick_up_params, mount=mount, - press_fit=False, - current_volume=maximum_volume, ) else: tip_geometry = await self._tip_handler.pick_up_tip( @@ -275,6 +275,14 @@ async def execute( well_name=well_name, do_not_ignore_tip_presence=True, ) + + # cache_tip + if self._state_view.config.use_virtual_pipettes is False: + self._tip_handler.cache_tip(pipette_id, tip_geometry) + hw_instr = self._hardware_api.hardware_instruments[mount.to_hw_mount()] + if hw_instr is not None: + hw_instr.set_current_volume(maximum_volume) + state_update = StateUpdate() state_update.update_pipette_tip_state( pipette_id=pipette_id, diff --git a/api/src/opentrons/protocol_engine/commands/evotip_unseal_pipette.py b/api/src/opentrons/protocol_engine/commands/evotip_unseal_pipette.py index 5b6581d7723..6a3b9371d2c 100644 --- a/api/src/opentrons/protocol_engine/commands/evotip_unseal_pipette.py +++ b/api/src/opentrons/protocol_engine/commands/evotip_unseal_pipette.py @@ -46,14 +46,6 @@ class EvotipUnsealPipetteParams(PipetteIdMixin): default_factory=DropTipWellLocation, description="Relative well location at which to drop the tip.", ) - homeAfter: Optional[bool] = Field( - None, - description=( - "Whether to home this pipette after dropping the tip." - " You should normally leave this unspecified to let the robot choose" - " a safe default depending on its hardware." - ), - ) class EvotipUnsealPipetteResult(DestinationPositionResult): @@ -92,7 +84,6 @@ async def execute(self, params: EvotipUnsealPipetteParams) -> _ExecuteReturn: pipette_id = params.pipetteId labware_id = params.labwareId well_name = params.wellName - home_after = params.homeAfter well_location = params.wellLocation labware_definition = self._state_view.labware.get_definition(params.labwareId) @@ -131,7 +122,7 @@ async def execute(self, params: EvotipUnsealPipetteParams) -> _ExecuteReturn: await self._tip_handler.drop_tip( pipette_id=pipette_id, - home_after=home_after, + home_after=None, do_not_ignore_tip_presence=False, ignore_plunger=True, ) diff --git a/api/src/opentrons/protocol_engine/execution/gantry_mover.py b/api/src/opentrons/protocol_engine/execution/gantry_mover.py index f435c09ae8c..e301275a3f7 100644 --- a/api/src/opentrons/protocol_engine/execution/gantry_mover.py +++ b/api/src/opentrons/protocol_engine/execution/gantry_mover.py @@ -114,7 +114,7 @@ async def move_axes( critical_point: Optional[Dict[MotorAxis, float]] = None, speed: Optional[float] = None, relative_move: bool = False, - _expect_stalls: bool = False, + expect_stalls: bool = False, ) -> Dict[MotorAxis, float]: """Move a set of axes a given distance.""" ... @@ -342,7 +342,7 @@ async def move_axes( critical_point: Optional[Dict[MotorAxis, float]] = None, speed: Optional[float] = None, relative_move: bool = False, - _expect_stalls: bool = False, + expect_stalls: bool = False, ) -> Dict[MotorAxis, float]: """Move a set of axes a given distance. @@ -387,7 +387,7 @@ async def move_axes( await self._hardware_api.move_axes( position=absolute_pos, speed=speed, - _expect_stalls=_expect_stalls, + expect_stalls=expect_stalls, ) except PositionUnknownError as e: @@ -591,7 +591,7 @@ async def move_axes( critical_point: Optional[Dict[MotorAxis, float]] = None, speed: Optional[float] = None, relative_move: bool = False, - _expect_stalls: bool = False, + expect_stalls: bool = False, ) -> Dict[MotorAxis, float]: """Move the give axes map. No-op in virtual implementation.""" mount = self.pick_mount_from_axis_map(axis_map) diff --git a/api/tests/opentrons/hardware_control/test_ot3_api.py b/api/tests/opentrons/hardware_control/test_ot3_api.py index c06858a1a8b..cbb5838c266 100644 --- a/api/tests/opentrons/hardware_control/test_ot3_api.py +++ b/api/tests/opentrons/hardware_control/test_ot3_api.py @@ -1895,7 +1895,9 @@ async def test_move_axes( await ot3_hardware.move_axes(position=input_position) mock_check_motor.return_value = True - mock_move.assert_called_once_with(target_position=expected_move_pos, speed=None, expect_stalls=False) + mock_move.assert_called_once_with( + target_position=expected_move_pos, speed=None, expect_stalls=False + ) async def test_move_gripper_mount_without_gripper_attached( @@ -1913,14 +1915,14 @@ async def test_move_expect_stall_flag( expected = HWStopCondition.stall if expect_stalls else HWStopCondition.none - await ot3_hardware.move_to(Mount.LEFT, Point(0, 0, 0), _expect_stalls=expect_stalls) + await ot3_hardware.move_to(Mount.LEFT, Point(0, 0, 0), expect_stalls=expect_stalls) mock_backend_move.assert_called_once() _, _, _, condition = mock_backend_move.call_args_list[0][0] assert condition == expected mock_backend_move.reset_mock() await ot3_hardware.move_rel( - Mount.LEFT, Point(10, 0, 0), _expect_stalls=expect_stalls + Mount.LEFT, Point(10, 0, 0), expect_stalls=expect_stalls ) mock_backend_move.assert_called_once() _, _, _, condition = mock_backend_move.call_args_list[0][0] diff --git a/api/tests/opentrons/protocol_engine/execution/test_gantry_mover.py b/api/tests/opentrons/protocol_engine/execution/test_gantry_mover.py index 1fca36db045..caa8d0cc3b6 100644 --- a/api/tests/opentrons/protocol_engine/execution/test_gantry_mover.py +++ b/api/tests/opentrons/protocol_engine/execution/test_gantry_mover.py @@ -568,7 +568,9 @@ def _current_position(mount: Mount, refresh: bool) -> Dict[HardwareAxis, float]: pos = await subject.move_axes(axis_map, critical_point, 100, relative_move) decoy.verify( - await ot3_hardware_api.move_axes(position=call_to_hw, speed=100, _expect_stalls=False), + await ot3_hardware_api.move_axes( + position=call_to_hw, speed=100, expect_stalls=False + ), times=1, ) assert pos == { diff --git a/api/tests/opentrons/protocol_engine/execution/test_tip_handler.py b/api/tests/opentrons/protocol_engine/execution/test_tip_handler.py index f17ce79e78c..b0f5d618361 100644 --- a/api/tests/opentrons/protocol_engine/execution/test_tip_handler.py +++ b/api/tests/opentrons/protocol_engine/execution/test_tip_handler.py @@ -257,7 +257,9 @@ async def test_drop_tip( await subject.drop_tip(pipette_id="pipette-id", home_after=True) decoy.verify( - await mock_hardware_api.tip_drop_moves(mount=Mount.RIGHT, ignore_plunger=False, home_after=True) + await mock_hardware_api.tip_drop_moves( + mount=Mount.RIGHT, ignore_plunger=False, home_after=True + ) ) decoy.verify(mock_hardware_api.remove_tip(mount=Mount.RIGHT)) decoy.verify(