From 965bdf21eeb1a3016c1831122450ba5ba813a348 Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Tue, 29 Oct 2024 11:40:55 -0400 Subject: [PATCH] refactor(api): Delete dead `private_result` supporting code (#16621) --- .../protocol_engine/actions/actions.py | 5 -- .../protocol_engine/commands/__init__.py | 1 - .../commands/absorbance_reader/close_lid.py | 9 +- .../commands/absorbance_reader/initialize.py | 7 +- .../commands/absorbance_reader/open_lid.py | 5 +- .../commands/absorbance_reader/read.py | 6 +- .../protocol_engine/commands/aspirate.py | 3 +- .../commands/aspirate_in_place.py | 3 +- .../protocol_engine/commands/blow_out.py | 3 +- .../commands/blow_out_in_place.py | 6 +- .../commands/calibration/calibrate_gripper.py | 7 +- .../commands/calibration/calibrate_module.py | 5 +- .../commands/calibration/calibrate_pipette.py | 7 +- .../move_to_maintenance_position.py | 8 +- .../protocol_engine/commands/command.py | 14 +--- .../commands/command_unions.py | 5 +- .../protocol_engine/commands/comment.py | 8 +- .../commands/configure_for_volume.py | 5 +- .../commands/configure_nozzle_layout.py | 5 +- .../protocol_engine/commands/custom.py | 8 +- .../protocol_engine/commands/dispense.py | 3 +- .../commands/dispense_in_place.py | 3 +- .../protocol_engine/commands/drop_tip.py | 3 +- .../commands/drop_tip_in_place.py | 7 +- .../commands/get_tip_presence.py | 8 +- .../heater_shaker/close_labware_latch.py | 10 +-- .../heater_shaker/deactivate_heater.py | 10 +-- .../heater_shaker/deactivate_shaker.py | 10 +-- .../heater_shaker/open_labware_latch.py | 7 +- .../set_and_wait_for_shake_speed.py | 5 +- .../heater_shaker/set_target_temperature.py | 8 +- .../heater_shaker/wait_for_temperature.py | 10 +-- .../protocol_engine/commands/home.py | 8 +- .../protocol_engine/commands/liquid_probe.py | 6 +- .../protocol_engine/commands/load_labware.py | 5 +- .../protocol_engine/commands/load_liquid.py | 10 +-- .../protocol_engine/commands/load_module.py | 7 +- .../protocol_engine/commands/load_pipette.py | 5 +- .../commands/magnetic_module/disengage.py | 10 +-- .../commands/magnetic_module/engage.py | 8 +- .../protocol_engine/commands/move_labware.py | 5 +- .../protocol_engine/commands/move_relative.py | 5 +- .../commands/move_to_addressable_area.py | 5 +- .../move_to_addressable_area_for_drop_tip.py | 5 +- .../commands/move_to_coordinates.py | 7 +- .../protocol_engine/commands/move_to_well.py | 7 +- .../protocol_engine/commands/pick_up_tip.py | 5 +- .../commands/prepare_to_aspirate.py | 6 +- .../commands/reload_labware.py | 5 +- .../protocol_engine/commands/retract_axis.py | 8 +- .../protocol_engine/commands/save_position.py | 5 +- .../commands/set_rail_lights.py | 8 +- .../commands/set_status_bar.py | 8 +- .../commands/temperature_module/deactivate.py | 8 +- .../set_target_temperature.py | 5 +- .../wait_for_temperature.py | 10 +-- .../commands/thermocycler/close_lid.py | 12 +-- .../commands/thermocycler/deactivate_block.py | 8 +- .../commands/thermocycler/deactivate_lid.py | 8 +- .../commands/thermocycler/open_lid.py | 8 +- .../thermocycler/run_extended_profile.py | 11 ++- .../commands/thermocycler/run_profile.py | 10 +-- .../set_target_block_temperature.py | 5 +- .../set_target_lid_temperature.py | 5 +- .../wait_for_block_temperature.py | 8 +- .../thermocycler/wait_for_lid_temperature.py | 8 +- .../protocol_engine/commands/touch_tip.py | 7 +- .../unsafe/unsafe_blow_out_in_place.py | 8 +- .../unsafe/unsafe_drop_tip_in_place.py | 6 +- .../commands/unsafe/unsafe_engage_axes.py | 8 +- .../commands/unsafe/unsafe_ungrip_labware.py | 8 +- .../unsafe/update_position_estimators.py | 8 +- .../commands/verify_tip_presence.py | 10 +-- .../commands/wait_for_duration.py | 8 +- .../commands/wait_for_resume.py | 8 +- .../execution/command_executor.py | 1 - .../protocol_runner/legacy_command_mapper.py | 5 +- .../calibration/test_calibrate_gripper.py | 1 - .../calibration/test_calibrate_module.py | 1 - .../calibration/test_calibrate_pipette.py | 1 - .../test_move_to_maintenance_position.py | 12 ++- .../heater_shaker/test_close_labware_latch.py | 4 +- .../heater_shaker/test_deactivate_heater.py | 2 +- .../heater_shaker/test_deactivate_shaker.py | 4 +- .../heater_shaker/test_open_labware_latch.py | 1 - .../test_set_and_wait_for_shake_speed.py | 1 - .../test_set_target_temperature.py | 2 +- .../test_wait_for_temperature.py | 2 +- .../magnetic_module/test_disengage.py | 2 +- .../commands/magnetic_module/test_engage.py | 2 +- .../temperature_module/test_deactivate.py | 2 +- .../test_set_target_temperature.py | 1 - .../test_wait_for_temperature.py | 4 +- .../protocol_engine/commands/test_aspirate.py | 3 - .../commands/test_aspirate_in_place.py | 2 - .../protocol_engine/commands/test_blow_out.py | 1 - .../commands/test_blow_out_in_place.py | 2 +- .../protocol_engine/commands/test_comment.py | 2 +- .../commands/test_configure_for_volume.py | 1 - .../commands/test_configure_nozzle_layout.py | 1 - .../protocol_engine/commands/test_dispense.py | 1 - .../commands/test_dispense_in_place.py | 2 - .../protocol_engine/commands/test_drop_tip.py | 2 - .../commands/test_drop_tip_in_place.py | 1 - .../commands/test_get_tip_presence.py | 2 +- .../protocol_engine/commands/test_home.py | 4 - .../commands/test_liquid_probe.py | 2 - .../commands/test_load_labware.py | 2 - .../commands/test_load_liquid.py | 1 - .../commands/test_load_module.py | 3 - .../commands/test_load_pipette.py | 2 - .../commands/test_move_labware.py | 4 - .../commands/test_move_relative.py | 1 - .../commands/test_move_to_addressable_area.py | 2 - ...t_move_to_addressable_area_for_drop_tip.py | 1 - .../commands/test_move_to_coordinates.py | 1 - .../commands/test_move_to_well.py | 1 - .../commands/test_pick_up_tip.py | 1 - .../commands/test_prepare_to_aspirate.py | 2 +- .../commands/test_reload_labware.py | 1 - .../commands/test_retract_axis.py | 1 - .../commands/test_save_position.py | 1 - .../commands/test_set_rail_lights.py | 2 +- .../commands/test_set_status_bar.py | 4 +- .../commands/test_touch_tip.py | 1 - .../commands/test_verify_tip_presence.py | 2 +- .../commands/test_wait_for_duration.py | 2 +- .../commands/test_wait_for_resume.py | 2 +- .../commands/thermocycler/test_close_lid.py | 1 - .../thermocycler/test_deactivate_block.py | 2 +- .../thermocycler/test_deactivate_lid.py | 2 +- .../commands/thermocycler/test_open_lid.py | 1 - .../thermocycler/test_run_extended_profile.py | 2 +- .../commands/thermocycler/test_run_profile.py | 2 +- .../test_set_target_block_temperature.py | 2 +- .../test_set_target_lid_temperature.py | 2 +- .../test_wait_for_block_temperature.py | 2 +- .../test_wait_for_lid_temperature.py | 2 +- .../commands/unsafe/test_engage_axes.py | 2 +- .../commands/unsafe/test_ungrip_labware.py | 2 +- .../unsafe/test_unsafe_blow_out_in_place.py | 2 +- .../unsafe/test_unsafe_drop_tip_in_place.py | 1 - .../unsafe/test_update_position_estimators.py | 2 +- .../execution/test_command_executor.py | 8 +- .../state/test_addressable_area_store.py | 6 +- .../state/test_command_store_old.py | 4 - .../state/test_geometry_view.py | 7 -- .../state/test_labware_store.py | 7 -- .../state/test_module_store.py | 82 +++++-------------- .../state/test_pipette_store.py | 62 +++----------- .../protocol_engine/state/test_tip_state.py | 31 +------ .../protocol_engine/state/test_well_store.py | 7 -- .../test_legacy_command_mapper.py | 7 -- .../test_legacy_context_plugin.py | 14 +--- 154 files changed, 316 insertions(+), 576 deletions(-) diff --git a/api/src/opentrons/protocol_engine/actions/actions.py b/api/src/opentrons/protocol_engine/actions/actions.py index 4cdcb771616..6260a6d4614 100644 --- a/api/src/opentrons/protocol_engine/actions/actions.py +++ b/api/src/opentrons/protocol_engine/actions/actions.py @@ -18,7 +18,6 @@ Command, CommandCreate, CommandDefinedErrorData, - CommandPrivateResult, ) from ..error_recovery_policy import ErrorRecoveryPolicy, ErrorRecoveryType from ..notes.notes import CommandNote @@ -146,10 +145,6 @@ class SucceedCommandAction: command: Command """The command in its new succeeded state.""" - # todo(mm, 2024-08-26): Remove when no state stores use this anymore. - # https://opentrons.atlassian.net/browse/EXEC-639 - private_result: CommandPrivateResult - state_update: StateUpdate = dataclasses.field( # todo(mm, 2024-08-26): This has a default only to make it easier to transition # old tests while https://opentrons.atlassian.net/browse/EXEC-639 is in diff --git a/api/src/opentrons/protocol_engine/commands/__init__.py b/api/src/opentrons/protocol_engine/commands/__init__.py index 3be0917b835..649bb4b6507 100644 --- a/api/src/opentrons/protocol_engine/commands/__init__.py +++ b/api/src/opentrons/protocol_engine/commands/__init__.py @@ -38,7 +38,6 @@ CommandCreate, CommandResult, CommandType, - CommandPrivateResult, CommandDefinedErrorData, ) diff --git a/api/src/opentrons/protocol_engine/commands/absorbance_reader/close_lid.py b/api/src/opentrons/protocol_engine/commands/absorbance_reader/close_lid.py index b5131d76bcf..2f7f96d9523 100644 --- a/api/src/opentrons/protocol_engine/commands/absorbance_reader/close_lid.py +++ b/api/src/opentrons/protocol_engine/commands/absorbance_reader/close_lid.py @@ -37,9 +37,7 @@ class CloseLidResult(BaseModel): """Result data from closing the lid on an aborbance reading.""" -class CloseLidImpl( - AbstractCommandImpl[CloseLidParams, SuccessData[CloseLidResult, None]] -): +class CloseLidImpl(AbstractCommandImpl[CloseLidParams, SuccessData[CloseLidResult]]): """Execution implementation of closing the lid on an Absorbance Reader.""" def __init__( @@ -53,9 +51,7 @@ def __init__( self._equipment = equipment self._labware_movement = labware_movement - async def execute( - self, params: CloseLidParams - ) -> SuccessData[CloseLidResult, None]: + async def execute(self, params: CloseLidParams) -> SuccessData[CloseLidResult]: """Execute the close lid command.""" mod_substate = self._state_view.modules.get_absorbance_reader_substate( module_id=params.moduleId @@ -142,7 +138,6 @@ async def execute( return SuccessData( public=CloseLidResult(), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/absorbance_reader/initialize.py b/api/src/opentrons/protocol_engine/commands/absorbance_reader/initialize.py index 314645b39b2..4b28154ed17 100644 --- a/api/src/opentrons/protocol_engine/commands/absorbance_reader/initialize.py +++ b/api/src/opentrons/protocol_engine/commands/absorbance_reader/initialize.py @@ -37,7 +37,7 @@ class InitializeResult(BaseModel): class InitializeImpl( - AbstractCommandImpl[InitializeParams, SuccessData[InitializeResult, None]] + AbstractCommandImpl[InitializeParams, SuccessData[InitializeResult]] ): """Execution implementation of initializing an Absorbance Reader.""" @@ -50,9 +50,7 @@ def __init__( self._state_view = state_view self._equipment = equipment - async def execute( - self, params: InitializeParams - ) -> SuccessData[InitializeResult, None]: + async def execute(self, params: InitializeParams) -> SuccessData[InitializeResult]: """Initiate a single absorbance measurement.""" abs_reader_substate = self._state_view.modules.get_absorbance_reader_substate( module_id=params.moduleId @@ -105,7 +103,6 @@ async def execute( return SuccessData( public=InitializeResult(), - private=None, ) diff --git a/api/src/opentrons/protocol_engine/commands/absorbance_reader/open_lid.py b/api/src/opentrons/protocol_engine/commands/absorbance_reader/open_lid.py index 7a048a69b52..5f3eed57199 100644 --- a/api/src/opentrons/protocol_engine/commands/absorbance_reader/open_lid.py +++ b/api/src/opentrons/protocol_engine/commands/absorbance_reader/open_lid.py @@ -38,7 +38,7 @@ class OpenLidResult(BaseModel): """Result data from opening the lid on an aborbance reading.""" -class OpenLidImpl(AbstractCommandImpl[OpenLidParams, SuccessData[OpenLidResult, None]]): +class OpenLidImpl(AbstractCommandImpl[OpenLidParams, SuccessData[OpenLidResult]]): """Execution implementation of opening the lid on an Absorbance Reader.""" def __init__( @@ -52,7 +52,7 @@ def __init__( self._equipment = equipment self._labware_movement = labware_movement - async def execute(self, params: OpenLidParams) -> SuccessData[OpenLidResult, None]: + async def execute(self, params: OpenLidParams) -> SuccessData[OpenLidResult]: """Move the absorbance reader lid from the module to the lid dock.""" mod_substate = self._state_view.modules.get_absorbance_reader_substate( module_id=params.moduleId @@ -137,7 +137,6 @@ async def execute(self, params: OpenLidParams) -> SuccessData[OpenLidResult, Non return SuccessData( public=OpenLidResult(), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/absorbance_reader/read.py b/api/src/opentrons/protocol_engine/commands/absorbance_reader/read.py index caf8a738f09..8743fd1383b 100644 --- a/api/src/opentrons/protocol_engine/commands/absorbance_reader/read.py +++ b/api/src/opentrons/protocol_engine/commands/absorbance_reader/read.py @@ -48,7 +48,7 @@ class ReadAbsorbanceResult(BaseModel): class ReadAbsorbanceImpl( - AbstractCommandImpl[ReadAbsorbanceParams, SuccessData[ReadAbsorbanceResult, None]] + AbstractCommandImpl[ReadAbsorbanceParams, SuccessData[ReadAbsorbanceResult]] ): """Execution implementation of an Absorbance Reader measurement.""" @@ -65,7 +65,7 @@ def __init__( async def execute( # noqa: C901 self, params: ReadAbsorbanceParams - ) -> SuccessData[ReadAbsorbanceResult, None]: + ) -> SuccessData[ReadAbsorbanceResult]: """Initiate an absorbance measurement.""" abs_reader_substate = self._state_view.modules.get_absorbance_reader_substate( module_id=params.moduleId @@ -168,12 +168,10 @@ async def execute( # noqa: C901 public=ReadAbsorbanceResult( data=asbsorbance_result, fileIds=file_ids ), - private=None, ) return SuccessData( public=ReadAbsorbanceResult(data=asbsorbance_result, fileIds=file_ids), - private=None, ) diff --git a/api/src/opentrons/protocol_engine/commands/aspirate.py b/api/src/opentrons/protocol_engine/commands/aspirate.py index bbeb089182d..00d57a93e9a 100644 --- a/api/src/opentrons/protocol_engine/commands/aspirate.py +++ b/api/src/opentrons/protocol_engine/commands/aspirate.py @@ -52,7 +52,7 @@ class AspirateResult(BaseLiquidHandlingResult, DestinationPositionResult): _ExecuteReturn = Union[ - SuccessData[AspirateResult, None], + SuccessData[AspirateResult], DefinedErrorData[OverpressureError], ] @@ -167,7 +167,6 @@ async def execute(self, params: AspirateParams) -> _ExecuteReturn: volume=volume_aspirated, position=deck_point, ), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/aspirate_in_place.py b/api/src/opentrons/protocol_engine/commands/aspirate_in_place.py index 23d331cd19b..4c7ab2cc01c 100644 --- a/api/src/opentrons/protocol_engine/commands/aspirate_in_place.py +++ b/api/src/opentrons/protocol_engine/commands/aspirate_in_place.py @@ -49,7 +49,7 @@ class AspirateInPlaceResult(BaseLiquidHandlingResult): _ExecuteReturn = Union[ - SuccessData[AspirateInPlaceResult, None], + SuccessData[AspirateInPlaceResult], DefinedErrorData[OverpressureError], ] @@ -150,7 +150,6 @@ async def execute(self, params: AspirateInPlaceParams) -> _ExecuteReturn: ) return SuccessData( public=AspirateInPlaceResult(volume=volume), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/blow_out.py b/api/src/opentrons/protocol_engine/commands/blow_out.py index c8a6b65ce63..e13378b5541 100644 --- a/api/src/opentrons/protocol_engine/commands/blow_out.py +++ b/api/src/opentrons/protocol_engine/commands/blow_out.py @@ -48,7 +48,7 @@ class BlowOutResult(DestinationPositionResult): _ExecuteReturn = Union[ - SuccessData[BlowOutResult, None], + SuccessData[BlowOutResult], DefinedErrorData[OverpressureError], ] @@ -116,7 +116,6 @@ async def execute(self, params: BlowOutParams) -> _ExecuteReturn: else: return SuccessData( public=BlowOutResult(position=deck_point), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/blow_out_in_place.py b/api/src/opentrons/protocol_engine/commands/blow_out_in_place.py index 38165a4a626..0b9aaec77b2 100644 --- a/api/src/opentrons/protocol_engine/commands/blow_out_in_place.py +++ b/api/src/opentrons/protocol_engine/commands/blow_out_in_place.py @@ -45,7 +45,7 @@ class BlowOutInPlaceResult(BaseModel): _ExecuteReturn = Union[ - SuccessData[BlowOutInPlaceResult, None], + SuccessData[BlowOutInPlaceResult], DefinedErrorData[OverpressureError], ] @@ -99,7 +99,9 @@ async def execute(self, params: BlowOutInPlaceParams) -> _ExecuteReturn: ), ) else: - return SuccessData(public=BlowOutInPlaceResult(), private=None) + return SuccessData( + public=BlowOutInPlaceResult(), + ) class BlowOutInPlace( diff --git a/api/src/opentrons/protocol_engine/commands/calibration/calibrate_gripper.py b/api/src/opentrons/protocol_engine/commands/calibration/calibrate_gripper.py index b400e2dd33a..0333a171077 100644 --- a/api/src/opentrons/protocol_engine/commands/calibration/calibrate_gripper.py +++ b/api/src/opentrons/protocol_engine/commands/calibration/calibrate_gripper.py @@ -71,9 +71,7 @@ class CalibrateGripperResult(BaseModel): class CalibrateGripperImplementation( - AbstractCommandImpl[ - CalibrateGripperParams, SuccessData[CalibrateGripperResult, None] - ] + AbstractCommandImpl[CalibrateGripperParams, SuccessData[CalibrateGripperResult]] ): """The implementation of a `calibrateGripper` command.""" @@ -87,7 +85,7 @@ def __init__( async def execute( self, params: CalibrateGripperParams - ) -> SuccessData[CalibrateGripperResult, None]: + ) -> SuccessData[CalibrateGripperResult]: """Execute a `calibrateGripper` command. 1. Move from the current location to the calibration area on the deck. @@ -126,7 +124,6 @@ async def execute( ), savedCalibration=calibration_data, ), - private=None, ) @staticmethod diff --git a/api/src/opentrons/protocol_engine/commands/calibration/calibrate_module.py b/api/src/opentrons/protocol_engine/commands/calibration/calibrate_module.py index 8eee75c6207..f488e8eab97 100644 --- a/api/src/opentrons/protocol_engine/commands/calibration/calibrate_module.py +++ b/api/src/opentrons/protocol_engine/commands/calibration/calibrate_module.py @@ -49,7 +49,7 @@ class CalibrateModuleResult(BaseModel): class CalibrateModuleImplementation( - AbstractCommandImpl[CalibrateModuleParams, SuccessData[CalibrateModuleResult, None]] + AbstractCommandImpl[CalibrateModuleParams, SuccessData[CalibrateModuleResult]] ): """CalibrateModule command implementation.""" @@ -64,7 +64,7 @@ def __init__( async def execute( self, params: CalibrateModuleParams - ) -> SuccessData[CalibrateModuleResult, None]: + ) -> SuccessData[CalibrateModuleResult]: """Execute calibrate-module command.""" ot3_api = ensure_ot3_hardware( self._hardware_api, @@ -91,7 +91,6 @@ async def execute( ), location=slot, ), - private=None, ) diff --git a/api/src/opentrons/protocol_engine/commands/calibration/calibrate_pipette.py b/api/src/opentrons/protocol_engine/commands/calibration/calibrate_pipette.py index 4369f88a9c5..fbe754f6389 100644 --- a/api/src/opentrons/protocol_engine/commands/calibration/calibrate_pipette.py +++ b/api/src/opentrons/protocol_engine/commands/calibration/calibrate_pipette.py @@ -34,9 +34,7 @@ class CalibratePipetteResult(BaseModel): class CalibratePipetteImplementation( - AbstractCommandImpl[ - CalibratePipetteParams, SuccessData[CalibratePipetteResult, None] - ] + AbstractCommandImpl[CalibratePipetteParams, SuccessData[CalibratePipetteResult]] ): """CalibratePipette command implementation.""" @@ -49,7 +47,7 @@ def __init__( async def execute( self, params: CalibratePipetteParams - ) -> SuccessData[CalibratePipetteResult, None]: + ) -> SuccessData[CalibratePipetteResult]: """Execute calibrate-pipette command.""" # TODO (tz, 20-9-22): Add a better solution to determine if a command can be executed on an OT-3/OT-2 ot3_api = ensure_ot3_hardware( @@ -72,7 +70,6 @@ async def execute( x=pipette_offset.x, y=pipette_offset.y, z=pipette_offset.z ) ), - private=None, ) diff --git a/api/src/opentrons/protocol_engine/commands/calibration/move_to_maintenance_position.py b/api/src/opentrons/protocol_engine/commands/calibration/move_to_maintenance_position.py index 73a0a8c2511..afb178cae99 100644 --- a/api/src/opentrons/protocol_engine/commands/calibration/move_to_maintenance_position.py +++ b/api/src/opentrons/protocol_engine/commands/calibration/move_to_maintenance_position.py @@ -57,7 +57,7 @@ class MoveToMaintenancePositionResult(BaseModel): class MoveToMaintenancePositionImplementation( AbstractCommandImpl[ MoveToMaintenancePositionParams, - SuccessData[MoveToMaintenancePositionResult, None], + SuccessData[MoveToMaintenancePositionResult], ] ): """Calibration set up position command implementation.""" @@ -73,7 +73,7 @@ def __init__( async def execute( self, params: MoveToMaintenancePositionParams - ) -> SuccessData[MoveToMaintenancePositionResult, None]: + ) -> SuccessData[MoveToMaintenancePositionResult]: """Move the requested mount to a maintenance deck slot.""" ot3_api = ensure_ot3_hardware( self._hardware_api, @@ -118,7 +118,9 @@ async def execute( ) await ot3_api.disengage_axes([Axis.Z_R]) - return SuccessData(public=MoveToMaintenancePositionResult(), private=None) + return SuccessData( + public=MoveToMaintenancePositionResult(), + ) class MoveToMaintenancePosition( diff --git a/api/src/opentrons/protocol_engine/commands/command.py b/api/src/opentrons/protocol_engine/commands/command.py index 813a038d7ec..1fefcbf7315 100644 --- a/api/src/opentrons/protocol_engine/commands/command.py +++ b/api/src/opentrons/protocol_engine/commands/command.py @@ -39,7 +39,6 @@ _ResultT_co = TypeVar("_ResultT_co", bound=BaseModel, covariant=True) _ErrorT = TypeVar("_ErrorT", bound=ErrorOccurrence) _ErrorT_co = TypeVar("_ErrorT_co", bound=ErrorOccurrence, covariant=True) -_PrivateResultT_co = TypeVar("_PrivateResultT_co", covariant=True) class CommandStatus(str, Enum): @@ -108,19 +107,12 @@ class BaseCommandCreate( @dataclasses.dataclass(frozen=True) -class SuccessData(Generic[_ResultT_co, _PrivateResultT_co]): +class SuccessData(Generic[_ResultT_co]): """Data from the successful completion of a command.""" public: _ResultT_co """Public result data. Exposed over HTTP and stored in databases.""" - private: _PrivateResultT_co - """Additional result data, only given to `opentrons.protocol_engine` internals. - - Deprecated: - Use `state_update` instead. - """ - state_update: StateUpdate = dataclasses.field( # todo(mm, 2024-08-22): Remove the default once all command implementations # use this, to make it harder to forget in new command implementations. @@ -239,8 +231,6 @@ class BaseCommand( # Our _ImplementationCls must return public result data that can fit # in our `result` field: _ResultT, - # But we don't care (here) what kind of private result data it returns: - object, ], DefinedErrorData[ # Our _ImplementationCls must return public error data that can fit @@ -255,7 +245,7 @@ class BaseCommand( _ExecuteReturnT_co = TypeVar( "_ExecuteReturnT_co", bound=Union[ - SuccessData[BaseModel, object], + SuccessData[BaseModel], DefinedErrorData[ErrorOccurrence], ], covariant=True, diff --git a/api/src/opentrons/protocol_engine/commands/command_unions.py b/api/src/opentrons/protocol_engine/commands/command_unions.py index c86724c1124..146b688253f 100644 --- a/api/src/opentrons/protocol_engine/commands/command_unions.py +++ b/api/src/opentrons/protocol_engine/commands/command_unions.py @@ -1,7 +1,7 @@ """Union types of concrete command definitions.""" from collections.abc import Collection -from typing import Annotated, Literal, Type, Union, get_type_hints +from typing import Annotated, Type, Union, get_type_hints from pydantic import Field @@ -699,9 +699,6 @@ unsafe.UnsafeUngripLabwareResult, ] -# todo(mm, 2024-10-28): This has been obsoleted by StateUpdate. Delete this. -# https://opentrons.atlassian.net/browse/EXEC-639 -CommandPrivateResult = Literal[None] # All `DefinedErrorData`s that implementations will actually return in practice. CommandDefinedErrorData = Union[ diff --git a/api/src/opentrons/protocol_engine/commands/comment.py b/api/src/opentrons/protocol_engine/commands/comment.py index d411b6b4047..5cd0b0c3113 100644 --- a/api/src/opentrons/protocol_engine/commands/comment.py +++ b/api/src/opentrons/protocol_engine/commands/comment.py @@ -24,16 +24,18 @@ class CommentResult(BaseModel): class CommentImplementation( - AbstractCommandImpl[CommentParams, SuccessData[CommentResult, None]] + AbstractCommandImpl[CommentParams, SuccessData[CommentResult]] ): """Comment command implementation.""" def __init__(self, **kwargs: object) -> None: pass - async def execute(self, params: CommentParams) -> SuccessData[CommentResult, None]: + async def execute(self, params: CommentParams) -> SuccessData[CommentResult]: """No operation taken other than capturing message in command.""" - return SuccessData(public=CommentResult(), private=None) + return SuccessData( + public=CommentResult(), + ) class Comment(BaseCommand[CommentParams, CommentResult, ErrorOccurrence]): diff --git a/api/src/opentrons/protocol_engine/commands/configure_for_volume.py b/api/src/opentrons/protocol_engine/commands/configure_for_volume.py index f4caee72c7f..1c8aa21f491 100644 --- a/api/src/opentrons/protocol_engine/commands/configure_for_volume.py +++ b/api/src/opentrons/protocol_engine/commands/configure_for_volume.py @@ -43,7 +43,7 @@ class ConfigureForVolumeResult(BaseModel): class ConfigureForVolumeImplementation( AbstractCommandImpl[ ConfigureForVolumeParams, - SuccessData[ConfigureForVolumeResult, None], + SuccessData[ConfigureForVolumeResult], ] ): """Configure for volume command implementation.""" @@ -53,7 +53,7 @@ def __init__(self, equipment: EquipmentHandler, **kwargs: object) -> None: async def execute( self, params: ConfigureForVolumeParams - ) -> SuccessData[ConfigureForVolumeResult, None]: + ) -> SuccessData[ConfigureForVolumeResult]: """Check that requested pipette can be configured for the given volume.""" pipette_result = await self._equipment.configure_for_volume( pipette_id=params.pipetteId, @@ -70,7 +70,6 @@ async def execute( return SuccessData( public=ConfigureForVolumeResult(), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/configure_nozzle_layout.py b/api/src/opentrons/protocol_engine/commands/configure_nozzle_layout.py index d04eee55c94..f78839773ec 100644 --- a/api/src/opentrons/protocol_engine/commands/configure_nozzle_layout.py +++ b/api/src/opentrons/protocol_engine/commands/configure_nozzle_layout.py @@ -46,7 +46,7 @@ class ConfigureNozzleLayoutResult(BaseModel): class ConfigureNozzleLayoutImplementation( AbstractCommandImpl[ ConfigureNozzleLayoutParams, - SuccessData[ConfigureNozzleLayoutResult, None], + SuccessData[ConfigureNozzleLayoutResult], ] ): """Configure nozzle layout command implementation.""" @@ -59,7 +59,7 @@ def __init__( async def execute( self, params: ConfigureNozzleLayoutParams - ) -> SuccessData[ConfigureNozzleLayoutResult, None]: + ) -> SuccessData[ConfigureNozzleLayoutResult]: """Check that requested pipette can support the requested nozzle layout.""" primary_nozzle = params.configurationParams.dict().get("primaryNozzle") front_right_nozzle = params.configurationParams.dict().get("frontRightNozzle") @@ -84,7 +84,6 @@ async def execute( return SuccessData( public=ConfigureNozzleLayoutResult(), - private=None, state_update=update_state, ) diff --git a/api/src/opentrons/protocol_engine/commands/custom.py b/api/src/opentrons/protocol_engine/commands/custom.py index 2ceebda764c..1bdf07084be 100644 --- a/api/src/opentrons/protocol_engine/commands/custom.py +++ b/api/src/opentrons/protocol_engine/commands/custom.py @@ -40,16 +40,18 @@ class Config: class CustomImplementation( - AbstractCommandImpl[CustomParams, SuccessData[CustomResult, None]] + AbstractCommandImpl[CustomParams, SuccessData[CustomResult]] ): """Custom command implementation.""" # TODO(mm, 2022-11-09): figure out how a plugin can specify a custom command # implementation. For now, always no-op, so we can use custom commands as containers # for legacy RPC (pre-ProtocolEngine) payloads. - async def execute(self, params: CustomParams) -> SuccessData[CustomResult, None]: + async def execute(self, params: CustomParams) -> SuccessData[CustomResult]: """A custom command does nothing when executed directly.""" - return SuccessData(public=CustomResult.construct(), private=None) + return SuccessData( + public=CustomResult.construct(), + ) class Custom(BaseCommand[CustomParams, CustomResult, ErrorOccurrence]): diff --git a/api/src/opentrons/protocol_engine/commands/dispense.py b/api/src/opentrons/protocol_engine/commands/dispense.py index ad57cb1882f..a7fee20c762 100644 --- a/api/src/opentrons/protocol_engine/commands/dispense.py +++ b/api/src/opentrons/protocol_engine/commands/dispense.py @@ -54,7 +54,7 @@ class DispenseResult(BaseLiquidHandlingResult, DestinationPositionResult): _ExecuteReturn = Union[ - SuccessData[DispenseResult, None], + SuccessData[DispenseResult], DefinedErrorData[OverpressureError], ] @@ -135,7 +135,6 @@ async def execute(self, params: DispenseParams) -> _ExecuteReturn: ) return SuccessData( public=DispenseResult(volume=volume, position=deck_point), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/dispense_in_place.py b/api/src/opentrons/protocol_engine/commands/dispense_in_place.py index b6eac561559..7df9471b038 100644 --- a/api/src/opentrons/protocol_engine/commands/dispense_in_place.py +++ b/api/src/opentrons/protocol_engine/commands/dispense_in_place.py @@ -49,7 +49,7 @@ class DispenseInPlaceResult(BaseLiquidHandlingResult): _ExecuteReturn = Union[ - SuccessData[DispenseInPlaceResult, None], + SuccessData[DispenseInPlaceResult], DefinedErrorData[OverpressureError], ] @@ -129,7 +129,6 @@ async def execute(self, params: DispenseInPlaceParams) -> _ExecuteReturn: ) return SuccessData( public=DispenseInPlaceResult(volume=volume), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/drop_tip.py b/api/src/opentrons/protocol_engine/commands/drop_tip.py index 114a97b0467..81a34a5ad39 100644 --- a/api/src/opentrons/protocol_engine/commands/drop_tip.py +++ b/api/src/opentrons/protocol_engine/commands/drop_tip.py @@ -68,7 +68,7 @@ class DropTipResult(DestinationPositionResult): _ExecuteReturn = ( - SuccessData[DropTipResult, None] | DefinedErrorData[TipPhysicallyAttachedError] + SuccessData[DropTipResult] | DefinedErrorData[TipPhysicallyAttachedError] ) @@ -161,7 +161,6 @@ async def execute(self, params: DropTipParams) -> _ExecuteReturn: ) return SuccessData( public=DropTipResult(position=deck_point), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/drop_tip_in_place.py b/api/src/opentrons/protocol_engine/commands/drop_tip_in_place.py index 49d44d6b563..aa40384ac6a 100644 --- a/api/src/opentrons/protocol_engine/commands/drop_tip_in_place.py +++ b/api/src/opentrons/protocol_engine/commands/drop_tip_in_place.py @@ -44,8 +44,7 @@ class DropTipInPlaceResult(BaseModel): _ExecuteReturn = ( - SuccessData[DropTipInPlaceResult, None] - | DefinedErrorData[TipPhysicallyAttachedError] + SuccessData[DropTipInPlaceResult] | DefinedErrorData[TipPhysicallyAttachedError] ) @@ -96,9 +95,7 @@ async def execute(self, params: DropTipInPlaceParams) -> _ExecuteReturn: state_update.update_pipette_tip_state( pipette_id=params.pipetteId, tip_geometry=None ) - return SuccessData( - public=DropTipInPlaceResult(), private=None, state_update=state_update - ) + return SuccessData(public=DropTipInPlaceResult(), state_update=state_update) class DropTipInPlace( diff --git a/api/src/opentrons/protocol_engine/commands/get_tip_presence.py b/api/src/opentrons/protocol_engine/commands/get_tip_presence.py index 6c4eea93a84..6bbe5fa2fe3 100644 --- a/api/src/opentrons/protocol_engine/commands/get_tip_presence.py +++ b/api/src/opentrons/protocol_engine/commands/get_tip_presence.py @@ -38,7 +38,7 @@ class GetTipPresenceResult(BaseModel): class GetTipPresenceImplementation( - AbstractCommandImpl[GetTipPresenceParams, SuccessData[GetTipPresenceResult, None]] + AbstractCommandImpl[GetTipPresenceParams, SuccessData[GetTipPresenceResult]] ): """GetTipPresence command implementation.""" @@ -51,7 +51,7 @@ def __init__( async def execute( self, params: GetTipPresenceParams - ) -> SuccessData[GetTipPresenceResult, None]: + ) -> SuccessData[GetTipPresenceResult]: """Verify if tip presence is as expected for the requested pipette.""" pipette_id = params.pipetteId @@ -59,7 +59,9 @@ async def execute( pipette_id=pipette_id, ) - return SuccessData(public=GetTipPresenceResult(status=result), private=None) + return SuccessData( + public=GetTipPresenceResult(status=result), + ) class GetTipPresence( diff --git a/api/src/opentrons/protocol_engine/commands/heater_shaker/close_labware_latch.py b/api/src/opentrons/protocol_engine/commands/heater_shaker/close_labware_latch.py index f9af6438958..2151fb05877 100644 --- a/api/src/opentrons/protocol_engine/commands/heater_shaker/close_labware_latch.py +++ b/api/src/opentrons/protocol_engine/commands/heater_shaker/close_labware_latch.py @@ -27,9 +27,7 @@ class CloseLabwareLatchResult(BaseModel): class CloseLabwareLatchImpl( - AbstractCommandImpl[ - CloseLabwareLatchParams, SuccessData[CloseLabwareLatchResult, None] - ] + AbstractCommandImpl[CloseLabwareLatchParams, SuccessData[CloseLabwareLatchResult]] ): """Execution implementation of a Heater-Shaker's close labware latch command.""" @@ -44,7 +42,7 @@ def __init__( async def execute( self, params: CloseLabwareLatchParams - ) -> SuccessData[CloseLabwareLatchResult, None]: + ) -> SuccessData[CloseLabwareLatchResult]: """Close a Heater-Shaker's labware latch.""" # Allow propagation of ModuleNotLoadedError and WrongModuleTypeError. hs_module_substate = self._state_view.modules.get_heater_shaker_module_substate( @@ -59,7 +57,9 @@ async def execute( if hs_hardware_module is not None: await hs_hardware_module.close_labware_latch() - return SuccessData(public=CloseLabwareLatchResult(), private=None) + return SuccessData( + public=CloseLabwareLatchResult(), + ) class CloseLabwareLatch( diff --git a/api/src/opentrons/protocol_engine/commands/heater_shaker/deactivate_heater.py b/api/src/opentrons/protocol_engine/commands/heater_shaker/deactivate_heater.py index fb512b72319..3932f1d6490 100644 --- a/api/src/opentrons/protocol_engine/commands/heater_shaker/deactivate_heater.py +++ b/api/src/opentrons/protocol_engine/commands/heater_shaker/deactivate_heater.py @@ -27,9 +27,7 @@ class DeactivateHeaterResult(BaseModel): class DeactivateHeaterImpl( - AbstractCommandImpl[ - DeactivateHeaterParams, SuccessData[DeactivateHeaterResult, None] - ] + AbstractCommandImpl[DeactivateHeaterParams, SuccessData[DeactivateHeaterResult]] ): """Execution implementation of a Heater-Shaker's deactivate heater command.""" @@ -44,7 +42,7 @@ def __init__( async def execute( self, params: DeactivateHeaterParams - ) -> SuccessData[DeactivateHeaterResult, None]: + ) -> SuccessData[DeactivateHeaterResult]: """Unset a Heater-Shaker's target temperature.""" hs_module_substate = self._state_view.modules.get_heater_shaker_module_substate( module_id=params.moduleId @@ -58,7 +56,9 @@ async def execute( if hs_hardware_module is not None: await hs_hardware_module.deactivate_heater() - return SuccessData(public=DeactivateHeaterResult(), private=None) + return SuccessData( + public=DeactivateHeaterResult(), + ) class DeactivateHeater( diff --git a/api/src/opentrons/protocol_engine/commands/heater_shaker/deactivate_shaker.py b/api/src/opentrons/protocol_engine/commands/heater_shaker/deactivate_shaker.py index bc06b9767c4..b259745ea3d 100644 --- a/api/src/opentrons/protocol_engine/commands/heater_shaker/deactivate_shaker.py +++ b/api/src/opentrons/protocol_engine/commands/heater_shaker/deactivate_shaker.py @@ -26,9 +26,7 @@ class DeactivateShakerResult(BaseModel): class DeactivateShakerImpl( - AbstractCommandImpl[ - DeactivateShakerParams, SuccessData[DeactivateShakerResult, None] - ] + AbstractCommandImpl[DeactivateShakerParams, SuccessData[DeactivateShakerResult]] ): """Execution implementation of a Heater-Shaker's deactivate shaker command.""" @@ -43,7 +41,7 @@ def __init__( async def execute( self, params: DeactivateShakerParams - ) -> SuccessData[DeactivateShakerResult, None]: + ) -> SuccessData[DeactivateShakerResult]: """Deactivate shaker for a Heater-Shaker.""" # Allow propagation of ModuleNotLoadedError and WrongModuleTypeError. hs_module_substate = self._state_view.modules.get_heater_shaker_module_substate( @@ -60,7 +58,9 @@ async def execute( if hs_hardware_module is not None: await hs_hardware_module.deactivate_shaker() - return SuccessData(public=DeactivateShakerResult(), private=None) + return SuccessData( + public=DeactivateShakerResult(), + ) class DeactivateShaker( diff --git a/api/src/opentrons/protocol_engine/commands/heater_shaker/open_labware_latch.py b/api/src/opentrons/protocol_engine/commands/heater_shaker/open_labware_latch.py index e39a2e200bf..9c3a9d8ae7d 100644 --- a/api/src/opentrons/protocol_engine/commands/heater_shaker/open_labware_latch.py +++ b/api/src/opentrons/protocol_engine/commands/heater_shaker/open_labware_latch.py @@ -34,9 +34,7 @@ class OpenLabwareLatchResult(BaseModel): class OpenLabwareLatchImpl( - AbstractCommandImpl[ - OpenLabwareLatchParams, SuccessData[OpenLabwareLatchResult, None] - ] + AbstractCommandImpl[OpenLabwareLatchParams, SuccessData[OpenLabwareLatchResult]] ): """Execution implementation of a Heater-Shaker's open latch labware command.""" @@ -53,7 +51,7 @@ def __init__( async def execute( self, params: OpenLabwareLatchParams - ) -> SuccessData[OpenLabwareLatchResult, None]: + ) -> SuccessData[OpenLabwareLatchResult]: """Open a Heater-Shaker's labware latch.""" state_update = update_types.StateUpdate() @@ -87,7 +85,6 @@ async def execute( return SuccessData( public=OpenLabwareLatchResult(pipetteRetracted=pipette_should_retract), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/heater_shaker/set_and_wait_for_shake_speed.py b/api/src/opentrons/protocol_engine/commands/heater_shaker/set_and_wait_for_shake_speed.py index e3cf35142d6..8828195c658 100644 --- a/api/src/opentrons/protocol_engine/commands/heater_shaker/set_and_wait_for_shake_speed.py +++ b/api/src/opentrons/protocol_engine/commands/heater_shaker/set_and_wait_for_shake_speed.py @@ -36,7 +36,7 @@ class SetAndWaitForShakeSpeedResult(BaseModel): class SetAndWaitForShakeSpeedImpl( AbstractCommandImpl[ - SetAndWaitForShakeSpeedParams, SuccessData[SetAndWaitForShakeSpeedResult, None] + SetAndWaitForShakeSpeedParams, SuccessData[SetAndWaitForShakeSpeedResult] ] ): """Execution implementation of Heater-Shaker's set and wait shake speed command.""" @@ -55,7 +55,7 @@ def __init__( async def execute( self, params: SetAndWaitForShakeSpeedParams, - ) -> SuccessData[SetAndWaitForShakeSpeedResult, None]: + ) -> SuccessData[SetAndWaitForShakeSpeedResult]: """Set and wait for a Heater-Shaker's target shake speed.""" state_update = update_types.StateUpdate() @@ -94,7 +94,6 @@ async def execute( public=SetAndWaitForShakeSpeedResult( pipetteRetracted=pipette_should_retract ), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/heater_shaker/set_target_temperature.py b/api/src/opentrons/protocol_engine/commands/heater_shaker/set_target_temperature.py index 854004dabae..fa29390b910 100644 --- a/api/src/opentrons/protocol_engine/commands/heater_shaker/set_target_temperature.py +++ b/api/src/opentrons/protocol_engine/commands/heater_shaker/set_target_temperature.py @@ -29,7 +29,7 @@ class SetTargetTemperatureResult(BaseModel): class SetTargetTemperatureImpl( AbstractCommandImpl[ - SetTargetTemperatureParams, SuccessData[SetTargetTemperatureResult, None] + SetTargetTemperatureParams, SuccessData[SetTargetTemperatureResult] ] ): """Execution implementation of a Heater-Shaker's set temperature command.""" @@ -46,7 +46,7 @@ def __init__( async def execute( self, params: SetTargetTemperatureParams, - ) -> SuccessData[SetTargetTemperatureResult, None]: + ) -> SuccessData[SetTargetTemperatureResult]: """Set a Heater-Shaker's target temperature.""" # Allow propagation of ModuleNotLoadedError and WrongModuleTypeError. hs_module_substate = self._state_view.modules.get_heater_shaker_module_substate( @@ -64,7 +64,9 @@ async def execute( if hs_hardware_module is not None: await hs_hardware_module.start_set_temperature(validated_temp) - return SuccessData(public=SetTargetTemperatureResult(), private=None) + return SuccessData( + public=SetTargetTemperatureResult(), + ) class SetTargetTemperature( diff --git a/api/src/opentrons/protocol_engine/commands/heater_shaker/wait_for_temperature.py b/api/src/opentrons/protocol_engine/commands/heater_shaker/wait_for_temperature.py index fbd7ee24743..bb440a2674c 100644 --- a/api/src/opentrons/protocol_engine/commands/heater_shaker/wait_for_temperature.py +++ b/api/src/opentrons/protocol_engine/commands/heater_shaker/wait_for_temperature.py @@ -36,9 +36,7 @@ class WaitForTemperatureResult(BaseModel): class WaitForTemperatureImpl( - AbstractCommandImpl[ - WaitForTemperatureParams, SuccessData[WaitForTemperatureResult, None] - ] + AbstractCommandImpl[WaitForTemperatureParams, SuccessData[WaitForTemperatureResult]] ): """Execution implementation of a Heater-Shaker's wait for temperature command.""" @@ -53,7 +51,7 @@ def __init__( async def execute( self, params: WaitForTemperatureParams - ) -> SuccessData[WaitForTemperatureResult, None]: + ) -> SuccessData[WaitForTemperatureResult]: """Wait for a Heater-Shaker's target temperature to be reached.""" hs_module_substate = self._state_view.modules.get_heater_shaker_module_substate( module_id=params.moduleId @@ -72,7 +70,9 @@ async def execute( if hs_hardware_module is not None: await hs_hardware_module.await_temperature(awaiting_temperature=target_temp) - return SuccessData(public=WaitForTemperatureResult(), private=None) + return SuccessData( + public=WaitForTemperatureResult(), + ) class WaitForTemperature( diff --git a/api/src/opentrons/protocol_engine/commands/home.py b/api/src/opentrons/protocol_engine/commands/home.py index 93d988772dc..7b82f90e1fd 100644 --- a/api/src/opentrons/protocol_engine/commands/home.py +++ b/api/src/opentrons/protocol_engine/commands/home.py @@ -42,15 +42,13 @@ class HomeResult(BaseModel): """Result data from the execution of a Home command.""" -class HomeImplementation( - AbstractCommandImpl[HomeParams, SuccessData[HomeResult, None]] -): +class HomeImplementation(AbstractCommandImpl[HomeParams, SuccessData[HomeResult]]): """Home command implementation.""" def __init__(self, movement: MovementHandler, **kwargs: object) -> None: self._movement = movement - async def execute(self, params: HomeParams) -> SuccessData[HomeResult, None]: + async def execute(self, params: HomeParams) -> SuccessData[HomeResult]: """Home some or all motors to establish positional accuracy.""" state_update = update_types.StateUpdate() @@ -66,7 +64,7 @@ async def execute(self, params: HomeParams) -> SuccessData[HomeResult, None]: # preserve prior behavior, but we might only want to do this if we actually home. state_update.clear_all_pipette_locations() - return SuccessData(public=HomeResult(), private=None, state_update=state_update) + return SuccessData(public=HomeResult(), state_update=state_update) class Home(BaseCommand[HomeParams, HomeResult, ErrorOccurrence]): diff --git a/api/src/opentrons/protocol_engine/commands/liquid_probe.py b/api/src/opentrons/protocol_engine/commands/liquid_probe.py index 677d62731f9..f78cd5bb55c 100644 --- a/api/src/opentrons/protocol_engine/commands/liquid_probe.py +++ b/api/src/opentrons/protocol_engine/commands/liquid_probe.py @@ -86,10 +86,10 @@ class TryLiquidProbeResult(DestinationPositionResult): _LiquidProbeExecuteReturn = Union[ - SuccessData[LiquidProbeResult, None], + SuccessData[LiquidProbeResult], DefinedErrorData[LiquidNotFoundError], ] -_TryLiquidProbeExecuteReturn = SuccessData[TryLiquidProbeResult, None] +_TryLiquidProbeExecuteReturn = SuccessData[TryLiquidProbeResult] class _ExecuteCommonResult(NamedTuple): @@ -249,7 +249,6 @@ async def execute(self, params: _CommonParams) -> _LiquidProbeExecuteReturn: public=LiquidProbeResult( z_position=z_pos_or_error, position=deck_point ), - private=None, state_update=state_update, ) @@ -308,7 +307,6 @@ async def execute(self, params: _CommonParams) -> _TryLiquidProbeExecuteReturn: z_position=z_pos, position=deck_point, ), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/load_labware.py b/api/src/opentrons/protocol_engine/commands/load_labware.py index 2de394c482c..05eccb95a7a 100644 --- a/api/src/opentrons/protocol_engine/commands/load_labware.py +++ b/api/src/opentrons/protocol_engine/commands/load_labware.py @@ -88,7 +88,7 @@ class LoadLabwareResult(BaseModel): class LoadLabwareImplementation( - AbstractCommandImpl[LoadLabwareParams, SuccessData[LoadLabwareResult, None]] + AbstractCommandImpl[LoadLabwareParams, SuccessData[LoadLabwareResult]] ): """Load labware command implementation.""" @@ -100,7 +100,7 @@ def __init__( async def execute( self, params: LoadLabwareParams - ) -> SuccessData[LoadLabwareResult, None]: + ) -> SuccessData[LoadLabwareResult]: """Load definition and calibration data necessary for a labware.""" # TODO (tz, 8-15-2023): extend column validation to column 1 when working # on https://opentrons.atlassian.net/browse/RSS-258 and completing @@ -167,7 +167,6 @@ async def execute( definition=loaded_labware.definition, offsetId=loaded_labware.offsetId, ), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/load_liquid.py b/api/src/opentrons/protocol_engine/commands/load_liquid.py index d37bc537b2d..5dd4737410e 100644 --- a/api/src/opentrons/protocol_engine/commands/load_liquid.py +++ b/api/src/opentrons/protocol_engine/commands/load_liquid.py @@ -40,7 +40,7 @@ class LoadLiquidResult(BaseModel): class LoadLiquidImplementation( - AbstractCommandImpl[LoadLiquidParams, SuccessData[LoadLiquidResult, None]] + AbstractCommandImpl[LoadLiquidParams, SuccessData[LoadLiquidResult]] ): """Load liquid command implementation.""" @@ -50,9 +50,7 @@ def __init__( self._state_view = state_view self._model_utils = model_utils - async def execute( - self, params: LoadLiquidParams - ) -> SuccessData[LoadLiquidResult, None]: + async def execute(self, params: LoadLiquidParams) -> SuccessData[LoadLiquidResult]: """Load data necessary for a liquid.""" self._state_view.liquid.validate_liquid_id(params.liquidId) @@ -67,9 +65,7 @@ async def execute( last_loaded=self._model_utils.get_timestamp(), ) - return SuccessData( - public=LoadLiquidResult(), private=None, state_update=state_update - ) + return SuccessData(public=LoadLiquidResult(), state_update=state_update) class LoadLiquid(BaseCommand[LoadLiquidParams, LoadLiquidResult, ErrorOccurrence]): diff --git a/api/src/opentrons/protocol_engine/commands/load_module.py b/api/src/opentrons/protocol_engine/commands/load_module.py index f8127658ea0..9560f4931c3 100644 --- a/api/src/opentrons/protocol_engine/commands/load_module.py +++ b/api/src/opentrons/protocol_engine/commands/load_module.py @@ -106,7 +106,7 @@ class LoadModuleResult(BaseModel): class LoadModuleImplementation( - AbstractCommandImpl[LoadModuleParams, SuccessData[LoadModuleResult, None]] + AbstractCommandImpl[LoadModuleParams, SuccessData[LoadModuleResult]] ): """The implementation of the load module command.""" @@ -116,9 +116,7 @@ def __init__( self._equipment = equipment self._state_view = state_view - async def execute( - self, params: LoadModuleParams - ) -> SuccessData[LoadModuleResult, None]: + async def execute(self, params: LoadModuleParams) -> SuccessData[LoadModuleResult]: """Check that the requested module is attached and assign its identifier.""" module_type = params.model.as_type() self._ensure_module_location(params.location.slotName, module_type) @@ -198,7 +196,6 @@ async def execute( model=loaded_module.definition.model, definition=loaded_module.definition, ), - private=None, ) def _ensure_module_location( diff --git a/api/src/opentrons/protocol_engine/commands/load_pipette.py b/api/src/opentrons/protocol_engine/commands/load_pipette.py index 3d9bdd83050..7d09bf33028 100644 --- a/api/src/opentrons/protocol_engine/commands/load_pipette.py +++ b/api/src/opentrons/protocol_engine/commands/load_pipette.py @@ -66,7 +66,7 @@ class LoadPipetteResult(BaseModel): class LoadPipetteImplementation( - AbstractCommandImpl[LoadPipetteParams, SuccessData[LoadPipetteResult, None]] + AbstractCommandImpl[LoadPipetteParams, SuccessData[LoadPipetteResult]] ): """Load pipette command implementation.""" @@ -78,7 +78,7 @@ def __init__( async def execute( self, params: LoadPipetteParams - ) -> SuccessData[LoadPipetteResult, None]: + ) -> SuccessData[LoadPipetteResult]: """Check that requested pipette is attached and assign its identifier.""" pipette_generation = convert_to_pipette_name_type( params.pipetteName.value @@ -130,7 +130,6 @@ async def execute( return SuccessData( public=LoadPipetteResult(pipetteId=loaded_pipette.pipette_id), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/magnetic_module/disengage.py b/api/src/opentrons/protocol_engine/commands/magnetic_module/disengage.py index a1be2c8480f..c20b18e481d 100644 --- a/api/src/opentrons/protocol_engine/commands/magnetic_module/disengage.py +++ b/api/src/opentrons/protocol_engine/commands/magnetic_module/disengage.py @@ -38,7 +38,7 @@ class DisengageResult(BaseModel): class DisengageImplementation( - AbstractCommandImpl[DisengageParams, SuccessData[DisengageResult, None]] + AbstractCommandImpl[DisengageParams, SuccessData[DisengageResult]] ): """The implementation of a Magnetic Module disengage command.""" @@ -51,9 +51,7 @@ def __init__( self._state_view = state_view self._equipment = equipment - async def execute( - self, params: DisengageParams - ) -> SuccessData[DisengageResult, None]: + async def execute(self, params: DisengageParams) -> SuccessData[DisengageResult]: """Execute a Magnetic Module disengage command. Raises: @@ -75,7 +73,9 @@ async def execute( if hardware_module is not None: # Not virtualizing modules. await hardware_module.deactivate() - return SuccessData(public=DisengageResult(), private=None) + return SuccessData( + public=DisengageResult(), + ) class Disengage(BaseCommand[DisengageParams, DisengageResult, ErrorOccurrence]): diff --git a/api/src/opentrons/protocol_engine/commands/magnetic_module/engage.py b/api/src/opentrons/protocol_engine/commands/magnetic_module/engage.py index 3796f43a022..62f4e24eef4 100644 --- a/api/src/opentrons/protocol_engine/commands/magnetic_module/engage.py +++ b/api/src/opentrons/protocol_engine/commands/magnetic_module/engage.py @@ -54,7 +54,7 @@ class EngageResult(BaseModel): class EngageImplementation( - AbstractCommandImpl[EngageParams, SuccessData[EngageResult, None]] + AbstractCommandImpl[EngageParams, SuccessData[EngageResult]] ): """The implementation of a Magnetic Module engage command.""" @@ -67,7 +67,7 @@ def __init__( self._state_view = state_view self._equipment = equipment - async def execute(self, params: EngageParams) -> SuccessData[EngageResult, None]: + async def execute(self, params: EngageParams) -> SuccessData[EngageResult]: """Execute a Magnetic Module engage command. Raises: @@ -95,7 +95,9 @@ async def execute(self, params: EngageParams) -> SuccessData[EngageResult, None] if hardware_module is not None: # Not virtualizing modules. await hardware_module.engage(height=hardware_height) - return SuccessData(public=EngageResult(), private=None) + return SuccessData( + public=EngageResult(), + ) class Engage(BaseCommand[EngageParams, EngageResult, ErrorOccurrence]): diff --git a/api/src/opentrons/protocol_engine/commands/move_labware.py b/api/src/opentrons/protocol_engine/commands/move_labware.py index 7f52a8e83e4..0d2967e87d5 100644 --- a/api/src/opentrons/protocol_engine/commands/move_labware.py +++ b/api/src/opentrons/protocol_engine/commands/move_labware.py @@ -98,9 +98,7 @@ class GripperMovementError(ErrorOccurrence): errorType: Literal["gripperMovement"] = "gripperMovement" -_ExecuteReturn = ( - SuccessData[MoveLabwareResult, None] | DefinedErrorData[GripperMovementError] -) +_ExecuteReturn = SuccessData[MoveLabwareResult] | DefinedErrorData[GripperMovementError] class MoveLabwareImplementation(AbstractCommandImpl[MoveLabwareParams, _ExecuteReturn]): @@ -301,7 +299,6 @@ async def execute(self, params: MoveLabwareParams) -> _ExecuteReturn: # noqa: C return SuccessData( public=MoveLabwareResult(offsetId=new_offset_id), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/move_relative.py b/api/src/opentrons/protocol_engine/commands/move_relative.py index dc559648ea3..9133725727d 100644 --- a/api/src/opentrons/protocol_engine/commands/move_relative.py +++ b/api/src/opentrons/protocol_engine/commands/move_relative.py @@ -39,7 +39,7 @@ class MoveRelativeResult(DestinationPositionResult): class MoveRelativeImplementation( - AbstractCommandImpl[MoveRelativeParams, SuccessData[MoveRelativeResult, None]] + AbstractCommandImpl[MoveRelativeParams, SuccessData[MoveRelativeResult]] ): """Move relative command implementation.""" @@ -48,7 +48,7 @@ def __init__(self, movement: MovementHandler, **kwargs: object) -> None: async def execute( self, params: MoveRelativeParams - ) -> SuccessData[MoveRelativeResult, None]: + ) -> SuccessData[MoveRelativeResult]: """Move (jog) a given pipette a relative distance.""" state_update = update_types.StateUpdate() @@ -67,7 +67,6 @@ async def execute( return SuccessData( public=MoveRelativeResult(position=deck_point), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/move_to_addressable_area.py b/api/src/opentrons/protocol_engine/commands/move_to_addressable_area.py index cfdfbe77133..8247f54a266 100644 --- a/api/src/opentrons/protocol_engine/commands/move_to_addressable_area.py +++ b/api/src/opentrons/protocol_engine/commands/move_to_addressable_area.py @@ -76,7 +76,7 @@ class MoveToAddressableAreaResult(DestinationPositionResult): class MoveToAddressableAreaImplementation( AbstractCommandImpl[ - MoveToAddressableAreaParams, SuccessData[MoveToAddressableAreaResult, None] + MoveToAddressableAreaParams, SuccessData[MoveToAddressableAreaResult] ] ): """Move to addressable area command implementation.""" @@ -89,7 +89,7 @@ def __init__( async def execute( self, params: MoveToAddressableAreaParams - ) -> SuccessData[MoveToAddressableAreaResult, None]: + ) -> SuccessData[MoveToAddressableAreaResult]: """Move the requested pipette to the requested addressable area.""" state_update = update_types.StateUpdate() @@ -134,7 +134,6 @@ async def execute( return SuccessData( public=MoveToAddressableAreaResult(position=DeckPoint(x=x, y=y, z=z)), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/move_to_addressable_area_for_drop_tip.py b/api/src/opentrons/protocol_engine/commands/move_to_addressable_area_for_drop_tip.py index 44244dcb25c..1c151f1e605 100644 --- a/api/src/opentrons/protocol_engine/commands/move_to_addressable_area_for_drop_tip.py +++ b/api/src/opentrons/protocol_engine/commands/move_to_addressable_area_for_drop_tip.py @@ -86,7 +86,7 @@ class MoveToAddressableAreaForDropTipResult(DestinationPositionResult): class MoveToAddressableAreaForDropTipImplementation( AbstractCommandImpl[ MoveToAddressableAreaForDropTipParams, - SuccessData[MoveToAddressableAreaForDropTipResult, None], + SuccessData[MoveToAddressableAreaForDropTipResult], ] ): """Move to addressable area for drop tip command implementation.""" @@ -99,7 +99,7 @@ def __init__( async def execute( self, params: MoveToAddressableAreaForDropTipParams - ) -> SuccessData[MoveToAddressableAreaForDropTipResult, None]: + ) -> SuccessData[MoveToAddressableAreaForDropTipResult]: """Move the requested pipette to the requested addressable area in preperation of a drop tip.""" state_update = update_types.StateUpdate() @@ -140,7 +140,6 @@ async def execute( public=MoveToAddressableAreaForDropTipResult( position=DeckPoint(x=x, y=y, z=z) ), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/move_to_coordinates.py b/api/src/opentrons/protocol_engine/commands/move_to_coordinates.py index fbc9f20e790..d7a0919d238 100644 --- a/api/src/opentrons/protocol_engine/commands/move_to_coordinates.py +++ b/api/src/opentrons/protocol_engine/commands/move_to_coordinates.py @@ -35,9 +35,7 @@ class MoveToCoordinatesResult(DestinationPositionResult): class MoveToCoordinatesImplementation( - AbstractCommandImpl[ - MoveToCoordinatesParams, SuccessData[MoveToCoordinatesResult, None] - ] + AbstractCommandImpl[MoveToCoordinatesParams, SuccessData[MoveToCoordinatesResult]] ): """Move to coordinates command implementation.""" @@ -50,7 +48,7 @@ def __init__( async def execute( self, params: MoveToCoordinatesParams - ) -> SuccessData[MoveToCoordinatesResult, None]: + ) -> SuccessData[MoveToCoordinatesResult]: """Move the requested pipette to the requested coordinates.""" state_update = update_types.StateUpdate() @@ -68,7 +66,6 @@ async def execute( return SuccessData( public=MoveToCoordinatesResult(position=DeckPoint(x=x, y=y, z=z)), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/move_to_well.py b/api/src/opentrons/protocol_engine/commands/move_to_well.py index 309f2e89513..49ab10111a4 100644 --- a/api/src/opentrons/protocol_engine/commands/move_to_well.py +++ b/api/src/opentrons/protocol_engine/commands/move_to_well.py @@ -35,7 +35,7 @@ class MoveToWellResult(DestinationPositionResult): class MoveToWellImplementation( - AbstractCommandImpl[MoveToWellParams, SuccessData[MoveToWellResult, None]] + AbstractCommandImpl[MoveToWellParams, SuccessData[MoveToWellResult]] ): """Move to well command implementation.""" @@ -45,9 +45,7 @@ def __init__( self._state_view = state_view self._movement = movement - async def execute( - self, params: MoveToWellParams - ) -> SuccessData[MoveToWellResult, None]: + async def execute(self, params: MoveToWellParams) -> SuccessData[MoveToWellResult]: """Move the requested pipette to the requested well.""" pipette_id = params.pipetteId labware_id = params.labwareId @@ -83,7 +81,6 @@ async def execute( return SuccessData( public=MoveToWellResult(position=deck_point), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/pick_up_tip.py b/api/src/opentrons/protocol_engine/commands/pick_up_tip.py index bf8492cc74b..898929566fe 100644 --- a/api/src/opentrons/protocol_engine/commands/pick_up_tip.py +++ b/api/src/opentrons/protocol_engine/commands/pick_up_tip.py @@ -86,7 +86,7 @@ class TipPhysicallyMissingError(ErrorOccurrence): _ExecuteReturn = Union[ - SuccessData[PickUpTipResult, None], + SuccessData[PickUpTipResult], DefinedErrorData[TipPhysicallyMissingError], ] @@ -109,7 +109,7 @@ def __init__( async def execute( self, params: PickUpTipParams - ) -> Union[SuccessData[PickUpTipResult, None], _ExecuteReturn]: + ) -> Union[SuccessData[PickUpTipResult], _ExecuteReturn]: """Move to and pick up a tip using the requested pipette.""" pipette_id = params.pipetteId labware_id = params.labwareId @@ -179,7 +179,6 @@ async def execute( tipDiameter=tip_geometry.diameter, position=deck_point, ), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/prepare_to_aspirate.py b/api/src/opentrons/protocol_engine/commands/prepare_to_aspirate.py index d63e42a7f90..01012be1d7f 100644 --- a/api/src/opentrons/protocol_engine/commands/prepare_to_aspirate.py +++ b/api/src/opentrons/protocol_engine/commands/prepare_to_aspirate.py @@ -40,7 +40,7 @@ class PrepareToAspirateResult(BaseModel): _ExecuteReturn = Union[ - SuccessData[PrepareToAspirateResult, None], + SuccessData[PrepareToAspirateResult], DefinedErrorData[OverpressureError], ] @@ -92,7 +92,9 @@ async def execute(self, params: PrepareToAspirateParams) -> _ExecuteReturn: ), ) else: - return SuccessData(public=PrepareToAspirateResult(), private=None) + return SuccessData( + public=PrepareToAspirateResult(), + ) class PrepareToAspirate( diff --git a/api/src/opentrons/protocol_engine/commands/reload_labware.py b/api/src/opentrons/protocol_engine/commands/reload_labware.py index 25f545736be..60230a1c6dd 100644 --- a/api/src/opentrons/protocol_engine/commands/reload_labware.py +++ b/api/src/opentrons/protocol_engine/commands/reload_labware.py @@ -47,7 +47,7 @@ class ReloadLabwareResult(BaseModel): class ReloadLabwareImplementation( - AbstractCommandImpl[ReloadLabwareParams, SuccessData[ReloadLabwareResult, None]] + AbstractCommandImpl[ReloadLabwareParams, SuccessData[ReloadLabwareResult]] ): """Reload labware command implementation.""" @@ -59,7 +59,7 @@ def __init__( async def execute( self, params: ReloadLabwareParams - ) -> SuccessData[ReloadLabwareResult, None]: + ) -> SuccessData[ReloadLabwareResult]: """Reload the definition and calibration data for a specific labware.""" reloaded_labware = await self._equipment.reload_labware( labware_id=params.labwareId, @@ -78,7 +78,6 @@ async def execute( labwareId=params.labwareId, offsetId=reloaded_labware.offsetId, ), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/retract_axis.py b/api/src/opentrons/protocol_engine/commands/retract_axis.py index 29e09acc064..49020eb517e 100644 --- a/api/src/opentrons/protocol_engine/commands/retract_axis.py +++ b/api/src/opentrons/protocol_engine/commands/retract_axis.py @@ -39,7 +39,7 @@ class RetractAxisResult(BaseModel): class RetractAxisImplementation( - AbstractCommandImpl[RetractAxisParams, SuccessData[RetractAxisResult, None]] + AbstractCommandImpl[RetractAxisParams, SuccessData[RetractAxisResult]] ): """Retract Axis command implementation.""" @@ -48,14 +48,12 @@ def __init__(self, movement: MovementHandler, **kwargs: object) -> None: async def execute( self, params: RetractAxisParams - ) -> SuccessData[RetractAxisResult, None]: + ) -> SuccessData[RetractAxisResult]: """Retract the specified axis.""" state_update = update_types.StateUpdate() await self._movement.retract_axis(axis=params.axis) state_update.clear_all_pipette_locations() - return SuccessData( - public=RetractAxisResult(), private=None, state_update=state_update - ) + return SuccessData(public=RetractAxisResult(), state_update=state_update) class RetractAxis(BaseCommand[RetractAxisParams, RetractAxisResult, ErrorOccurrence]): diff --git a/api/src/opentrons/protocol_engine/commands/save_position.py b/api/src/opentrons/protocol_engine/commands/save_position.py index 988e4b762a7..4bc208d1421 100644 --- a/api/src/opentrons/protocol_engine/commands/save_position.py +++ b/api/src/opentrons/protocol_engine/commands/save_position.py @@ -46,7 +46,7 @@ class SavePositionResult(BaseModel): class SavePositionImplementation( - AbstractCommandImpl[SavePositionParams, SuccessData[SavePositionResult, None]] + AbstractCommandImpl[SavePositionParams, SuccessData[SavePositionResult]] ): """Save position command implementation.""" @@ -61,7 +61,7 @@ def __init__( async def execute( self, params: SavePositionParams - ) -> SuccessData[SavePositionResult, None]: + ) -> SuccessData[SavePositionResult]: """Check the requested pipette's current position.""" position_id = self._model_utils.ensure_id(params.positionId) fail_on_not_homed = ( @@ -76,7 +76,6 @@ async def execute( positionId=position_id, position=DeckPoint(x=x, y=y, z=z), ), - private=None, ) diff --git a/api/src/opentrons/protocol_engine/commands/set_rail_lights.py b/api/src/opentrons/protocol_engine/commands/set_rail_lights.py index 6235e0d9bb6..09254dbe966 100644 --- a/api/src/opentrons/protocol_engine/commands/set_rail_lights.py +++ b/api/src/opentrons/protocol_engine/commands/set_rail_lights.py @@ -29,7 +29,7 @@ class SetRailLightsResult(BaseModel): class SetRailLightsImplementation( - AbstractCommandImpl[SetRailLightsParams, SuccessData[SetRailLightsResult, None]] + AbstractCommandImpl[SetRailLightsParams, SuccessData[SetRailLightsResult]] ): """setRailLights command implementation.""" @@ -38,10 +38,12 @@ def __init__(self, rail_lights: RailLightsHandler, **kwargs: object) -> None: async def execute( self, params: SetRailLightsParams - ) -> SuccessData[SetRailLightsResult, None]: + ) -> SuccessData[SetRailLightsResult]: """Dispatch a set lights command setting the state of the rail lights.""" await self._rail_lights.set_rail_lights(params.on) - return SuccessData(public=SetRailLightsResult(), private=None) + return SuccessData( + public=SetRailLightsResult(), + ) class SetRailLights( diff --git a/api/src/opentrons/protocol_engine/commands/set_status_bar.py b/api/src/opentrons/protocol_engine/commands/set_status_bar.py index cb83aa56ce2..2e1483f6d93 100644 --- a/api/src/opentrons/protocol_engine/commands/set_status_bar.py +++ b/api/src/opentrons/protocol_engine/commands/set_status_bar.py @@ -49,7 +49,7 @@ class SetStatusBarResult(BaseModel): class SetStatusBarImplementation( - AbstractCommandImpl[SetStatusBarParams, SuccessData[SetStatusBarResult, None]] + AbstractCommandImpl[SetStatusBarParams, SuccessData[SetStatusBarResult]] ): """setStatusBar command implementation.""" @@ -58,12 +58,14 @@ def __init__(self, status_bar: StatusBarHandler, **kwargs: object) -> None: async def execute( self, params: SetStatusBarParams - ) -> SuccessData[SetStatusBarResult, None]: + ) -> SuccessData[SetStatusBarResult]: """Execute the setStatusBar command.""" if not self._status_bar.status_bar_should_not_be_changed(): state = _animation_to_status_bar_state(params.animation) await self._status_bar.set_status_bar(state) - return SuccessData(public=SetStatusBarResult(), private=None) + return SuccessData( + public=SetStatusBarResult(), + ) class SetStatusBar( diff --git a/api/src/opentrons/protocol_engine/commands/temperature_module/deactivate.py b/api/src/opentrons/protocol_engine/commands/temperature_module/deactivate.py index 52e988b179d..e56c98e6e30 100644 --- a/api/src/opentrons/protocol_engine/commands/temperature_module/deactivate.py +++ b/api/src/opentrons/protocol_engine/commands/temperature_module/deactivate.py @@ -27,7 +27,7 @@ class DeactivateTemperatureResult(BaseModel): class DeactivateTemperatureImpl( AbstractCommandImpl[ - DeactivateTemperatureParams, SuccessData[DeactivateTemperatureResult, None] + DeactivateTemperatureParams, SuccessData[DeactivateTemperatureResult] ] ): """Execution implementation of a Temperature Module's deactivate command.""" @@ -43,7 +43,7 @@ def __init__( async def execute( self, params: DeactivateTemperatureParams - ) -> SuccessData[DeactivateTemperatureResult, None]: + ) -> SuccessData[DeactivateTemperatureResult]: """Deactivate a Temperature Module.""" # Allow propagation of ModuleNotLoadedError and WrongModuleTypeError. module_substate = self._state_view.modules.get_temperature_module_substate( @@ -57,7 +57,9 @@ async def execute( if temp_hardware_module is not None: await temp_hardware_module.deactivate() - return SuccessData(public=DeactivateTemperatureResult(), private=None) + return SuccessData( + public=DeactivateTemperatureResult(), + ) class DeactivateTemperature( diff --git a/api/src/opentrons/protocol_engine/commands/temperature_module/set_target_temperature.py b/api/src/opentrons/protocol_engine/commands/temperature_module/set_target_temperature.py index 7e76de7d561..6d65bf47bb0 100644 --- a/api/src/opentrons/protocol_engine/commands/temperature_module/set_target_temperature.py +++ b/api/src/opentrons/protocol_engine/commands/temperature_module/set_target_temperature.py @@ -34,7 +34,7 @@ class SetTargetTemperatureResult(BaseModel): class SetTargetTemperatureImpl( AbstractCommandImpl[ - SetTargetTemperatureParams, SuccessData[SetTargetTemperatureResult, None] + SetTargetTemperatureParams, SuccessData[SetTargetTemperatureResult] ] ): """Execution implementation of a Temperature Module's set temperature command.""" @@ -50,7 +50,7 @@ def __init__( async def execute( self, params: SetTargetTemperatureParams - ) -> SuccessData[SetTargetTemperatureResult, None]: + ) -> SuccessData[SetTargetTemperatureResult]: """Set a Temperature Module's target temperature.""" # Allow propagation of ModuleNotLoadedError and WrongModuleTypeError. module_substate = self._state_view.modules.get_temperature_module_substate( @@ -69,7 +69,6 @@ async def execute( await temp_hardware_module.start_set_temperature(celsius=validated_temp) return SuccessData( public=SetTargetTemperatureResult(targetTemperature=validated_temp), - private=None, ) diff --git a/api/src/opentrons/protocol_engine/commands/temperature_module/wait_for_temperature.py b/api/src/opentrons/protocol_engine/commands/temperature_module/wait_for_temperature.py index 7a96be35242..fa7784de141 100644 --- a/api/src/opentrons/protocol_engine/commands/temperature_module/wait_for_temperature.py +++ b/api/src/opentrons/protocol_engine/commands/temperature_module/wait_for_temperature.py @@ -35,9 +35,7 @@ class WaitForTemperatureResult(BaseModel): class WaitForTemperatureImpl( - AbstractCommandImpl[ - WaitForTemperatureParams, SuccessData[WaitForTemperatureResult, None] - ] + AbstractCommandImpl[WaitForTemperatureParams, SuccessData[WaitForTemperatureResult]] ): """Execution implementation of Temperature Module's wait for temperature command.""" @@ -52,7 +50,7 @@ def __init__( async def execute( self, params: WaitForTemperatureParams - ) -> SuccessData[WaitForTemperatureResult, None]: + ) -> SuccessData[WaitForTemperatureResult]: """Wait for a Temperature Module's target temperature.""" # Allow propagation of ModuleNotLoadedError and WrongModuleTypeError. module_substate = self._state_view.modules.get_temperature_module_substate( @@ -74,7 +72,9 @@ async def execute( await temp_hardware_module.await_temperature( awaiting_temperature=target_temp ) - return SuccessData(public=WaitForTemperatureResult(), private=None) + return SuccessData( + public=WaitForTemperatureResult(), + ) class WaitForTemperature( diff --git a/api/src/opentrons/protocol_engine/commands/thermocycler/close_lid.py b/api/src/opentrons/protocol_engine/commands/thermocycler/close_lid.py index 12e1ab4b13f..578a5d6b7a7 100644 --- a/api/src/opentrons/protocol_engine/commands/thermocycler/close_lid.py +++ b/api/src/opentrons/protocol_engine/commands/thermocycler/close_lid.py @@ -28,9 +28,7 @@ class CloseLidResult(BaseModel): """Result data from closing a Thermocycler's lid.""" -class CloseLidImpl( - AbstractCommandImpl[CloseLidParams, SuccessData[CloseLidResult, None]] -): +class CloseLidImpl(AbstractCommandImpl[CloseLidParams, SuccessData[CloseLidResult]]): """Execution implementation of a Thermocycler's close lid command.""" def __init__( @@ -44,9 +42,7 @@ def __init__( self._equipment = equipment self._movement = movement - async def execute( - self, params: CloseLidParams - ) -> SuccessData[CloseLidResult, None]: + async def execute(self, params: CloseLidParams) -> SuccessData[CloseLidResult]: """Close a Thermocycler's lid.""" state_update = update_types.StateUpdate() @@ -69,9 +65,7 @@ async def execute( if thermocycler_hardware is not None: await thermocycler_hardware.close() - return SuccessData( - public=CloseLidResult(), private=None, state_update=state_update - ) + return SuccessData(public=CloseLidResult(), state_update=state_update) class CloseLid(BaseCommand[CloseLidParams, CloseLidResult, ErrorOccurrence]): diff --git a/api/src/opentrons/protocol_engine/commands/thermocycler/deactivate_block.py b/api/src/opentrons/protocol_engine/commands/thermocycler/deactivate_block.py index fd108dc9568..67199577d53 100644 --- a/api/src/opentrons/protocol_engine/commands/thermocycler/deactivate_block.py +++ b/api/src/opentrons/protocol_engine/commands/thermocycler/deactivate_block.py @@ -27,7 +27,7 @@ class DeactivateBlockResult(BaseModel): class DeactivateBlockImpl( - AbstractCommandImpl[DeactivateBlockParams, SuccessData[DeactivateBlockResult, None]] + AbstractCommandImpl[DeactivateBlockParams, SuccessData[DeactivateBlockResult]] ): """Execution implementation of a Thermocycler's deactivate block command.""" @@ -42,7 +42,7 @@ def __init__( async def execute( self, params: DeactivateBlockParams - ) -> SuccessData[DeactivateBlockResult, None]: + ) -> SuccessData[DeactivateBlockResult]: """Unset a Thermocycler's target block temperature.""" thermocycler_state = self._state_view.modules.get_thermocycler_module_substate( params.moduleId @@ -54,7 +54,9 @@ async def execute( if thermocycler_hardware is not None: await thermocycler_hardware.deactivate_block() - return SuccessData(public=DeactivateBlockResult(), private=None) + return SuccessData( + public=DeactivateBlockResult(), + ) class DeactivateBlock( diff --git a/api/src/opentrons/protocol_engine/commands/thermocycler/deactivate_lid.py b/api/src/opentrons/protocol_engine/commands/thermocycler/deactivate_lid.py index ff0fabc1e88..9c3541efb12 100644 --- a/api/src/opentrons/protocol_engine/commands/thermocycler/deactivate_lid.py +++ b/api/src/opentrons/protocol_engine/commands/thermocycler/deactivate_lid.py @@ -27,7 +27,7 @@ class DeactivateLidResult(BaseModel): class DeactivateLidImpl( - AbstractCommandImpl[DeactivateLidParams, SuccessData[DeactivateLidResult, None]] + AbstractCommandImpl[DeactivateLidParams, SuccessData[DeactivateLidResult]] ): """Execution implementation of a Thermocycler's deactivate lid command.""" @@ -42,7 +42,7 @@ def __init__( async def execute( self, params: DeactivateLidParams - ) -> SuccessData[DeactivateLidResult, None]: + ) -> SuccessData[DeactivateLidResult]: """Unset a Thermocycler's target lid temperature.""" thermocycler_state = self._state_view.modules.get_thermocycler_module_substate( params.moduleId @@ -54,7 +54,9 @@ async def execute( if thermocycler_hardware is not None: await thermocycler_hardware.deactivate_lid() - return SuccessData(public=DeactivateLidResult(), private=None) + return SuccessData( + public=DeactivateLidResult(), + ) class DeactivateLid( diff --git a/api/src/opentrons/protocol_engine/commands/thermocycler/open_lid.py b/api/src/opentrons/protocol_engine/commands/thermocycler/open_lid.py index e874a0b678c..3df32d1ec99 100644 --- a/api/src/opentrons/protocol_engine/commands/thermocycler/open_lid.py +++ b/api/src/opentrons/protocol_engine/commands/thermocycler/open_lid.py @@ -28,7 +28,7 @@ class OpenLidResult(BaseModel): """Result data from opening a Thermocycler's lid.""" -class OpenLidImpl(AbstractCommandImpl[OpenLidParams, SuccessData[OpenLidResult, None]]): +class OpenLidImpl(AbstractCommandImpl[OpenLidParams, SuccessData[OpenLidResult]]): """Execution implementation of a Thermocycler's open lid command.""" def __init__( @@ -42,7 +42,7 @@ def __init__( self._equipment = equipment self._movement = movement - async def execute(self, params: OpenLidParams) -> SuccessData[OpenLidResult, None]: + async def execute(self, params: OpenLidParams) -> SuccessData[OpenLidResult]: """Open a Thermocycler's lid.""" state_update = update_types.StateUpdate() @@ -65,9 +65,7 @@ async def execute(self, params: OpenLidParams) -> SuccessData[OpenLidResult, Non if thermocycler_hardware is not None: await thermocycler_hardware.open() - return SuccessData( - public=OpenLidResult(), private=None, state_update=state_update - ) + return SuccessData(public=OpenLidResult(), state_update=state_update) class OpenLid(BaseCommand[OpenLidParams, OpenLidResult, ErrorOccurrence]): diff --git a/api/src/opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py b/api/src/opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py index 3cf8a67bf41..6f63aed8fe3 100644 --- a/api/src/opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py +++ b/api/src/opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py @@ -59,7 +59,6 @@ class RunExtendedProfileResult(BaseModel): def _transform_profile_step( step: ProfileStep, thermocycler_state: ThermocyclerModuleSubState ) -> ThermocyclerStep: - return ThermocyclerStep( temperature=thermocycler_state.validate_target_block_temperature(step.celsius), hold_time_seconds=step.holdSeconds, @@ -97,9 +96,7 @@ def _transform_profile_element( class RunExtendedProfileImpl( - AbstractCommandImpl[ - RunExtendedProfileParams, SuccessData[RunExtendedProfileResult, None] - ] + AbstractCommandImpl[RunExtendedProfileParams, SuccessData[RunExtendedProfileResult]] ): """Execution implementation of a Thermocycler's run profile command.""" @@ -114,7 +111,7 @@ def __init__( async def execute( self, params: RunExtendedProfileParams - ) -> SuccessData[RunExtendedProfileResult, None]: + ) -> SuccessData[RunExtendedProfileResult]: """Run a Thermocycler profile.""" thermocycler_state = self._state_view.modules.get_thermocycler_module_substate( params.moduleId @@ -142,7 +139,9 @@ async def execute( profile=profile, volume=target_volume ) - return SuccessData(public=RunExtendedProfileResult(), private=None) + return SuccessData( + public=RunExtendedProfileResult(), + ) class RunExtendedProfile( diff --git a/api/src/opentrons/protocol_engine/commands/thermocycler/run_profile.py b/api/src/opentrons/protocol_engine/commands/thermocycler/run_profile.py index c0b5189afcb..02aa7ad93e2 100644 --- a/api/src/opentrons/protocol_engine/commands/thermocycler/run_profile.py +++ b/api/src/opentrons/protocol_engine/commands/thermocycler/run_profile.py @@ -47,7 +47,7 @@ class RunProfileResult(BaseModel): class RunProfileImpl( - AbstractCommandImpl[RunProfileParams, SuccessData[RunProfileResult, None]] + AbstractCommandImpl[RunProfileParams, SuccessData[RunProfileResult]] ): """Execution implementation of a Thermocycler's run profile command.""" @@ -60,9 +60,7 @@ def __init__( self._state_view = state_view self._equipment = equipment - async def execute( - self, params: RunProfileParams - ) -> SuccessData[RunProfileResult, None]: + async def execute(self, params: RunProfileParams) -> SuccessData[RunProfileResult]: """Run a Thermocycler profile.""" thermocycler_state = self._state_view.modules.get_thermocycler_module_substate( params.moduleId @@ -96,7 +94,9 @@ async def execute( steps=steps, repetitions=1, volume=target_volume ) - return SuccessData(public=RunProfileResult(), private=None) + return SuccessData( + public=RunProfileResult(), + ) class RunProfile(BaseCommand[RunProfileParams, RunProfileResult, ErrorOccurrence]): diff --git a/api/src/opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py b/api/src/opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py index 587369b733b..b69bb15ea90 100644 --- a/api/src/opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py +++ b/api/src/opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py @@ -46,7 +46,7 @@ class SetTargetBlockTemperatureResult(BaseModel): class SetTargetBlockTemperatureImpl( AbstractCommandImpl[ SetTargetBlockTemperatureParams, - SuccessData[SetTargetBlockTemperatureResult, None], + SuccessData[SetTargetBlockTemperatureResult], ] ): """Execution implementation of a Thermocycler's set block temperature command.""" @@ -63,7 +63,7 @@ def __init__( async def execute( self, params: SetTargetBlockTemperatureParams, - ) -> SuccessData[SetTargetBlockTemperatureResult, None]: + ) -> SuccessData[SetTargetBlockTemperatureResult]: """Set a Thermocycler's target block temperature.""" thermocycler_state = self._state_view.modules.get_thermocycler_module_substate( params.moduleId @@ -97,7 +97,6 @@ async def execute( public=SetTargetBlockTemperatureResult( targetBlockTemperature=target_temperature ), - private=None, ) diff --git a/api/src/opentrons/protocol_engine/commands/thermocycler/set_target_lid_temperature.py b/api/src/opentrons/protocol_engine/commands/thermocycler/set_target_lid_temperature.py index 5e7efa6bfd2..37217e047ae 100644 --- a/api/src/opentrons/protocol_engine/commands/thermocycler/set_target_lid_temperature.py +++ b/api/src/opentrons/protocol_engine/commands/thermocycler/set_target_lid_temperature.py @@ -34,7 +34,7 @@ class SetTargetLidTemperatureResult(BaseModel): class SetTargetLidTemperatureImpl( AbstractCommandImpl[ - SetTargetLidTemperatureParams, SuccessData[SetTargetLidTemperatureResult, None] + SetTargetLidTemperatureParams, SuccessData[SetTargetLidTemperatureResult] ] ): """Execution implementation of a Thermocycler's set lid temperature command.""" @@ -51,7 +51,7 @@ def __init__( async def execute( self, params: SetTargetLidTemperatureParams, - ) -> SuccessData[SetTargetLidTemperatureResult, None]: + ) -> SuccessData[SetTargetLidTemperatureResult]: """Set a Thermocycler's target lid temperature.""" thermocycler_state = self._state_view.modules.get_thermocycler_module_substate( params.moduleId @@ -70,7 +70,6 @@ async def execute( public=SetTargetLidTemperatureResult( targetLidTemperature=target_temperature ), - private=None, ) diff --git a/api/src/opentrons/protocol_engine/commands/thermocycler/wait_for_block_temperature.py b/api/src/opentrons/protocol_engine/commands/thermocycler/wait_for_block_temperature.py index dabe351f352..8e8c9b1a4ec 100644 --- a/api/src/opentrons/protocol_engine/commands/thermocycler/wait_for_block_temperature.py +++ b/api/src/opentrons/protocol_engine/commands/thermocycler/wait_for_block_temperature.py @@ -28,7 +28,7 @@ class WaitForBlockTemperatureResult(BaseModel): class WaitForBlockTemperatureImpl( AbstractCommandImpl[ - WaitForBlockTemperatureParams, SuccessData[WaitForBlockTemperatureResult, None] + WaitForBlockTemperatureParams, SuccessData[WaitForBlockTemperatureResult] ] ): """Execution implementation of Thermocycler's wait for block temperature command.""" @@ -45,7 +45,7 @@ def __init__( async def execute( self, params: WaitForBlockTemperatureParams, - ) -> SuccessData[WaitForBlockTemperatureResult, None]: + ) -> SuccessData[WaitForBlockTemperatureResult]: """Wait for a Thermocycler's target block temperature.""" thermocycler_state = self._state_view.modules.get_thermocycler_module_substate( params.moduleId @@ -61,7 +61,9 @@ async def execute( if thermocycler_hardware is not None: await thermocycler_hardware.wait_for_block_target() - return SuccessData(public=WaitForBlockTemperatureResult(), private=None) + return SuccessData( + public=WaitForBlockTemperatureResult(), + ) class WaitForBlockTemperature( diff --git a/api/src/opentrons/protocol_engine/commands/thermocycler/wait_for_lid_temperature.py b/api/src/opentrons/protocol_engine/commands/thermocycler/wait_for_lid_temperature.py index d15eb4f3238..95e5fbc4f0a 100644 --- a/api/src/opentrons/protocol_engine/commands/thermocycler/wait_for_lid_temperature.py +++ b/api/src/opentrons/protocol_engine/commands/thermocycler/wait_for_lid_temperature.py @@ -28,7 +28,7 @@ class WaitForLidTemperatureResult(BaseModel): class WaitForLidTemperatureImpl( AbstractCommandImpl[ - WaitForLidTemperatureParams, SuccessData[WaitForLidTemperatureResult, None] + WaitForLidTemperatureParams, SuccessData[WaitForLidTemperatureResult] ] ): """Execution implementation of Thermocycler's wait for lid temperature command.""" @@ -45,7 +45,7 @@ def __init__( async def execute( self, params: WaitForLidTemperatureParams, - ) -> SuccessData[WaitForLidTemperatureResult, None]: + ) -> SuccessData[WaitForLidTemperatureResult]: """Wait for a Thermocycler's lid temperature.""" thermocycler_state = self._state_view.modules.get_thermocycler_module_substate( params.moduleId @@ -61,7 +61,9 @@ async def execute( if thermocycler_hardware is not None: await thermocycler_hardware.wait_for_lid_target() - return SuccessData(public=WaitForLidTemperatureResult(), private=None) + return SuccessData( + public=WaitForLidTemperatureResult(), + ) class WaitForLidTemperature( diff --git a/api/src/opentrons/protocol_engine/commands/touch_tip.py b/api/src/opentrons/protocol_engine/commands/touch_tip.py index 744b1c14107..48c947abcbd 100644 --- a/api/src/opentrons/protocol_engine/commands/touch_tip.py +++ b/api/src/opentrons/protocol_engine/commands/touch_tip.py @@ -50,7 +50,7 @@ class TouchTipResult(DestinationPositionResult): class TouchTipImplementation( - AbstractCommandImpl[TouchTipParams, SuccessData[TouchTipResult, None]] + AbstractCommandImpl[TouchTipParams, SuccessData[TouchTipResult]] ): """Touch tip command implementation.""" @@ -65,9 +65,7 @@ def __init__( self._movement = movement self._gantry_mover = gantry_mover - async def execute( - self, params: TouchTipParams - ) -> SuccessData[TouchTipResult, None]: + async def execute(self, params: TouchTipParams) -> SuccessData[TouchTipResult]: """Touch tip to sides of a well using the requested pipette.""" pipette_id = params.pipetteId labware_id = params.labwareId @@ -119,7 +117,6 @@ async def execute( return SuccessData( public=TouchTipResult(position=final_deck_point), - private=None, state_update=state_update, ) diff --git a/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_blow_out_in_place.py b/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_blow_out_in_place.py index d9ef8e1d15d..4738b7c9b97 100644 --- a/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_blow_out_in_place.py +++ b/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_blow_out_in_place.py @@ -36,7 +36,7 @@ class UnsafeBlowOutInPlaceResult(BaseModel): class UnsafeBlowOutInPlaceImplementation( AbstractCommandImpl[ - UnsafeBlowOutInPlaceParams, SuccessData[UnsafeBlowOutInPlaceResult, None] + UnsafeBlowOutInPlaceParams, SuccessData[UnsafeBlowOutInPlaceResult] ] ): """UnsafeBlowOutInPlace command implementation.""" @@ -54,7 +54,7 @@ def __init__( async def execute( self, params: UnsafeBlowOutInPlaceParams - ) -> SuccessData[UnsafeBlowOutInPlaceResult, None]: + ) -> SuccessData[UnsafeBlowOutInPlaceResult]: """Blow-out without moving the pipette even when position is unknown.""" ot3_hardware_api = ensure_ot3_hardware(self._hardware_api) pipette_location = self._state_view.motion.get_pipette_location( @@ -67,7 +67,9 @@ async def execute( pipette_id=params.pipetteId, flow_rate=params.flowRate ) - return SuccessData(public=UnsafeBlowOutInPlaceResult(), private=None) + return SuccessData( + public=UnsafeBlowOutInPlaceResult(), + ) class UnsafeBlowOutInPlace( diff --git a/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_drop_tip_in_place.py b/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_drop_tip_in_place.py index 33d4baebeea..ff749711cfb 100644 --- a/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_drop_tip_in_place.py +++ b/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_drop_tip_in_place.py @@ -42,7 +42,7 @@ class UnsafeDropTipInPlaceResult(BaseModel): class UnsafeDropTipInPlaceImplementation( AbstractCommandImpl[ - UnsafeDropTipInPlaceParams, SuccessData[UnsafeDropTipInPlaceResult, None] + UnsafeDropTipInPlaceParams, SuccessData[UnsafeDropTipInPlaceResult] ] ): """Unsafe drop tip in place command implementation.""" @@ -60,7 +60,7 @@ def __init__( async def execute( self, params: UnsafeDropTipInPlaceParams - ) -> SuccessData[UnsafeDropTipInPlaceResult, None]: + ) -> SuccessData[UnsafeDropTipInPlaceResult]: """Drop a tip using the requested pipette, even if the plunger position is not known.""" ot3_hardware_api = ensure_ot3_hardware(self._hardware_api) pipette_location = self._state_view.motion.get_pipette_location( @@ -79,7 +79,7 @@ async def execute( ) return SuccessData( - public=UnsafeDropTipInPlaceResult(), private=None, state_update=state_update + public=UnsafeDropTipInPlaceResult(), state_update=state_update ) diff --git a/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_engage_axes.py b/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_engage_axes.py index 500347d84b0..02bc22b0396 100644 --- a/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_engage_axes.py +++ b/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_engage_axes.py @@ -32,7 +32,7 @@ class UnsafeEngageAxesResult(BaseModel): class UnsafeEngageAxesImplementation( AbstractCommandImpl[ UnsafeEngageAxesParams, - SuccessData[UnsafeEngageAxesResult, None], + SuccessData[UnsafeEngageAxesResult], ] ): """Enable axes command implementation.""" @@ -48,7 +48,7 @@ def __init__( async def execute( self, params: UnsafeEngageAxesParams - ) -> SuccessData[UnsafeEngageAxesResult, None]: + ) -> SuccessData[UnsafeEngageAxesResult]: """Enable exes.""" ot3_hardware_api = ensure_ot3_hardware(self._hardware_api) await ot3_hardware_api.engage_axes( @@ -57,7 +57,9 @@ async def execute( for axis in params.axes ] ) - return SuccessData(public=UnsafeEngageAxesResult(), private=None) + return SuccessData( + public=UnsafeEngageAxesResult(), + ) class UnsafeEngageAxes( diff --git a/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_ungrip_labware.py b/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_ungrip_labware.py index e64beaa7ea7..9674513d749 100644 --- a/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_ungrip_labware.py +++ b/api/src/opentrons/protocol_engine/commands/unsafe/unsafe_ungrip_labware.py @@ -27,7 +27,7 @@ class UnsafeUngripLabwareResult(BaseModel): class UnsafeUngripLabwareImplementation( AbstractCommandImpl[ UnsafeUngripLabwareParams, - SuccessData[UnsafeUngripLabwareResult, None], + SuccessData[UnsafeUngripLabwareResult], ] ): """Ungrip labware command implementation.""" @@ -41,13 +41,15 @@ def __init__( async def execute( self, params: UnsafeUngripLabwareParams - ) -> SuccessData[UnsafeUngripLabwareResult, None]: + ) -> SuccessData[UnsafeUngripLabwareResult]: """Ungrip Labware.""" ot3_hardware_api = ensure_ot3_hardware(self._hardware_api) if not ot3_hardware_api.has_gripper(): raise GripperNotAttachedError("No gripper found to perform ungrip.") await ot3_hardware_api.ungrip() - return SuccessData(public=UnsafeUngripLabwareResult(), private=None) + return SuccessData( + public=UnsafeUngripLabwareResult(), + ) class UnsafeUngripLabware( diff --git a/api/src/opentrons/protocol_engine/commands/unsafe/update_position_estimators.py b/api/src/opentrons/protocol_engine/commands/unsafe/update_position_estimators.py index 96be2eb8551..cf5454db332 100644 --- a/api/src/opentrons/protocol_engine/commands/unsafe/update_position_estimators.py +++ b/api/src/opentrons/protocol_engine/commands/unsafe/update_position_estimators.py @@ -34,7 +34,7 @@ class UpdatePositionEstimatorsResult(BaseModel): class UpdatePositionEstimatorsImplementation( AbstractCommandImpl[ UpdatePositionEstimatorsParams, - SuccessData[UpdatePositionEstimatorsResult, None], + SuccessData[UpdatePositionEstimatorsResult], ] ): """Update position estimators command implementation.""" @@ -50,7 +50,7 @@ def __init__( async def execute( self, params: UpdatePositionEstimatorsParams - ) -> SuccessData[UpdatePositionEstimatorsResult, None]: + ) -> SuccessData[UpdatePositionEstimatorsResult]: """Update axis position estimators from their encoders.""" ot3_hardware_api = ensure_ot3_hardware(self._hardware_api) await ot3_hardware_api.update_axis_position_estimations( @@ -59,7 +59,9 @@ async def execute( for axis in params.axes ] ) - return SuccessData(public=UpdatePositionEstimatorsResult(), private=None) + return SuccessData( + public=UpdatePositionEstimatorsResult(), + ) class UpdatePositionEstimators( diff --git a/api/src/opentrons/protocol_engine/commands/verify_tip_presence.py b/api/src/opentrons/protocol_engine/commands/verify_tip_presence.py index 9816e03cf33..e0412022e85 100644 --- a/api/src/opentrons/protocol_engine/commands/verify_tip_presence.py +++ b/api/src/opentrons/protocol_engine/commands/verify_tip_presence.py @@ -36,9 +36,7 @@ class VerifyTipPresenceResult(BaseModel): class VerifyTipPresenceImplementation( - AbstractCommandImpl[ - VerifyTipPresenceParams, SuccessData[VerifyTipPresenceResult, None] - ] + AbstractCommandImpl[VerifyTipPresenceParams, SuccessData[VerifyTipPresenceResult]] ): """VerifyTipPresence command implementation.""" @@ -51,7 +49,7 @@ def __init__( async def execute( self, params: VerifyTipPresenceParams - ) -> SuccessData[VerifyTipPresenceResult, None]: + ) -> SuccessData[VerifyTipPresenceResult]: """Verify if tip presence is as expected for the requested pipette.""" pipette_id = params.pipetteId expected_state = params.expectedState @@ -67,7 +65,9 @@ async def execute( follow_singular_sensor=follow_singular_sensor, ) - return SuccessData(public=VerifyTipPresenceResult(), private=None) + return SuccessData( + public=VerifyTipPresenceResult(), + ) class VerifyTipPresence( diff --git a/api/src/opentrons/protocol_engine/commands/wait_for_duration.py b/api/src/opentrons/protocol_engine/commands/wait_for_duration.py index df1eae28aa4..04f8693386e 100644 --- a/api/src/opentrons/protocol_engine/commands/wait_for_duration.py +++ b/api/src/opentrons/protocol_engine/commands/wait_for_duration.py @@ -29,7 +29,7 @@ class WaitForDurationResult(BaseModel): class WaitForDurationImplementation( - AbstractCommandImpl[WaitForDurationParams, SuccessData[WaitForDurationResult, None]] + AbstractCommandImpl[WaitForDurationParams, SuccessData[WaitForDurationResult]] ): """Wait for duration command implementation.""" @@ -38,10 +38,12 @@ def __init__(self, run_control: RunControlHandler, **kwargs: object) -> None: async def execute( self, params: WaitForDurationParams - ) -> SuccessData[WaitForDurationResult, None]: + ) -> SuccessData[WaitForDurationResult]: """Wait for a duration of time.""" await self._run_control.wait_for_duration(params.seconds) - return SuccessData(public=WaitForDurationResult(), private=None) + return SuccessData( + public=WaitForDurationResult(), + ) class WaitForDuration( diff --git a/api/src/opentrons/protocol_engine/commands/wait_for_resume.py b/api/src/opentrons/protocol_engine/commands/wait_for_resume.py index c6036f852e2..f5066d52521 100644 --- a/api/src/opentrons/protocol_engine/commands/wait_for_resume.py +++ b/api/src/opentrons/protocol_engine/commands/wait_for_resume.py @@ -30,7 +30,7 @@ class WaitForResumeResult(BaseModel): class WaitForResumeImplementation( - AbstractCommandImpl[WaitForResumeParams, SuccessData[WaitForResumeResult, None]] + AbstractCommandImpl[WaitForResumeParams, SuccessData[WaitForResumeResult]] ): """Wait for resume command implementation.""" @@ -39,10 +39,12 @@ def __init__(self, run_control: RunControlHandler, **kwargs: object) -> None: async def execute( self, params: WaitForResumeParams - ) -> SuccessData[WaitForResumeResult, None]: + ) -> SuccessData[WaitForResumeResult]: """Dispatch a PauseAction to the store to pause the protocol.""" await self._run_control.wait_for_resume() - return SuccessData(public=WaitForResumeResult(), private=None) + return SuccessData( + public=WaitForResumeResult(), + ) class WaitForResume( diff --git a/api/src/opentrons/protocol_engine/execution/command_executor.py b/api/src/opentrons/protocol_engine/execution/command_executor.py index e534001ef12..b6c686e0b11 100644 --- a/api/src/opentrons/protocol_engine/execution/command_executor.py +++ b/api/src/opentrons/protocol_engine/execution/command_executor.py @@ -192,7 +192,6 @@ async def execute(self, command_id: str) -> None: self._action_dispatcher.dispatch( SucceedCommandAction( command=succeeded_command, - private_result=result.private, state_update=result.state_update, ), ) diff --git a/api/src/opentrons/protocol_runner/legacy_command_mapper.py b/api/src/opentrons/protocol_runner/legacy_command_mapper.py index 2a1ef28a359..27b1c7ea331 100644 --- a/api/src/opentrons/protocol_runner/legacy_command_mapper.py +++ b/api/src/opentrons/protocol_runner/legacy_command_mapper.py @@ -271,7 +271,6 @@ def map_command( # noqa: C901 results.append( pe_actions.SucceedCommandAction( completed_command, - private_result=None, state_update=StateUpdate(), ) ) @@ -689,7 +688,6 @@ def _map_labware_load( succeed_action = pe_actions.SucceedCommandAction( command=succeeded_command, - private_result=None, state_update=state_update, ) @@ -764,7 +762,6 @@ def _map_instrument_load( succeed_action = pe_actions.SucceedCommandAction( command=succeeded_command, - private_result=None, state_update=state_update, ) @@ -830,7 +827,7 @@ def _map_module_load( started_at=succeeded_command.startedAt, # type: ignore[arg-type] ) succeed_action = pe_actions.SucceedCommandAction( - command=succeeded_command, private_result=None, state_update=StateUpdate() + command=succeeded_command, state_update=StateUpdate() ) self._command_count["LOAD_MODULE"] = count + 1 diff --git a/api/tests/opentrons/protocol_engine/commands/calibration/test_calibrate_gripper.py b/api/tests/opentrons/protocol_engine/commands/calibration/test_calibrate_gripper.py index 6ecf768c4eb..4145e1f0b5c 100644 --- a/api/tests/opentrons/protocol_engine/commands/calibration/test_calibrate_gripper.py +++ b/api/tests/opentrons/protocol_engine/commands/calibration/test_calibrate_gripper.py @@ -72,7 +72,6 @@ async def test_calibrate_gripper( result = await subject.execute(params) assert result == SuccessData( public=CalibrateGripperResult(jawOffset=Vec3f(x=1.1, y=2.2, z=3.3)), - private=None, ) diff --git a/api/tests/opentrons/protocol_engine/commands/calibration/test_calibrate_module.py b/api/tests/opentrons/protocol_engine/commands/calibration/test_calibrate_module.py index 0226453c72e..0713bfa37d1 100644 --- a/api/tests/opentrons/protocol_engine/commands/calibration/test_calibrate_module.py +++ b/api/tests/opentrons/protocol_engine/commands/calibration/test_calibrate_module.py @@ -95,7 +95,6 @@ async def test_calibrate_module_implementation( ), location=location, ), - private=None, ) diff --git a/api/tests/opentrons/protocol_engine/commands/calibration/test_calibrate_pipette.py b/api/tests/opentrons/protocol_engine/commands/calibration/test_calibrate_pipette.py index ba949f0e2df..073db3bf295 100644 --- a/api/tests/opentrons/protocol_engine/commands/calibration/test_calibrate_pipette.py +++ b/api/tests/opentrons/protocol_engine/commands/calibration/test_calibrate_pipette.py @@ -64,7 +64,6 @@ async def test_calibrate_pipette_implementation( public=CalibratePipetteResult( pipetteOffset=InstrumentOffsetVector(x=3, y=4, z=6) ), - private=None, ) diff --git a/api/tests/opentrons/protocol_engine/commands/calibration/test_move_to_maintenance_position.py b/api/tests/opentrons/protocol_engine/commands/calibration/test_move_to_maintenance_position.py index ca8bb9de5bd..7051d1e44fc 100644 --- a/api/tests/opentrons/protocol_engine/commands/calibration/test_move_to_maintenance_position.py +++ b/api/tests/opentrons/protocol_engine/commands/calibration/test_move_to_maintenance_position.py @@ -56,7 +56,9 @@ async def test_calibration_move_to_location_implementation_for_attach_instrument decoy.when(ot3_hardware_api.get_instrument_max_height(Mount.LEFT)).then_return(300) result = await subject.execute(params=params) - assert result == SuccessData(public=MoveToMaintenancePositionResult(), private=None) + assert result == SuccessData( + public=MoveToMaintenancePositionResult(), + ) hw_mount = mount_type.to_hw_mount() decoy.verify( @@ -100,7 +102,9 @@ async def test_calibration_move_to_location_implementation_for_attach_plate( decoy.when(ot3_hardware_api.get_instrument_max_height(Mount.LEFT)).then_return(300) result = await subject.execute(params=params) - assert result == SuccessData(public=MoveToMaintenancePositionResult(), private=None) + assert result == SuccessData( + public=MoveToMaintenancePositionResult(), + ) decoy.verify( await ot3_hardware_api.prepare_for_mount_movement(Mount.LEFT), @@ -150,7 +154,9 @@ async def test_calibration_move_to_location_implementation_for_gripper( decoy.when(ot3_hardware_api.get_instrument_max_height(Mount.LEFT)).then_return(300) result = await subject.execute(params=params) - assert result == SuccessData(public=MoveToMaintenancePositionResult(), private=None) + assert result == SuccessData( + public=MoveToMaintenancePositionResult(), + ) decoy.verify( await ot3_hardware_api.prepare_for_mount_movement(Mount.LEFT), diff --git a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_close_labware_latch.py b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_close_labware_latch.py index fbd1fadcc23..d481ef33b9b 100644 --- a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_close_labware_latch.py +++ b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_close_labware_latch.py @@ -45,7 +45,7 @@ async def test_close_labware_latch( result = await subject.execute(data) decoy.verify(await heater_shaker_hardware.close_labware_latch(), times=1) assert result == SuccessData( - public=heater_shaker.CloseLabwareLatchResult(), private=None + public=heater_shaker.CloseLabwareLatchResult(), ) @@ -77,5 +77,5 @@ async def test_close_labware_latch_virtual( result = await subject.execute(data) assert result == SuccessData( - public=heater_shaker.CloseLabwareLatchResult(), private=None + public=heater_shaker.CloseLabwareLatchResult(), ) diff --git a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_deactivate_heater.py b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_deactivate_heater.py index 5e8a65a06e8..6ce4336c9a3 100644 --- a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_deactivate_heater.py +++ b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_deactivate_heater.py @@ -46,5 +46,5 @@ async def test_deactivate_heater( result = await subject.execute(data) decoy.verify(await hs_hardware.deactivate_heater(), times=1) assert result == SuccessData( - public=heater_shaker.DeactivateHeaterResult(), private=None + public=heater_shaker.DeactivateHeaterResult(), ) diff --git a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_deactivate_shaker.py b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_deactivate_shaker.py index db5e1aba138..466fa79dcc5 100644 --- a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_deactivate_shaker.py +++ b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_deactivate_shaker.py @@ -46,7 +46,7 @@ async def test_deactivate_shaker( result = await subject.execute(data) decoy.verify(await hs_hardware.deactivate_shaker(), times=1) assert result == SuccessData( - public=heater_shaker.DeactivateShakerResult(), private=None + public=heater_shaker.DeactivateShakerResult(), ) @@ -78,5 +78,5 @@ async def test_deactivate_shaker_virtual( result = await subject.execute(data) assert result == SuccessData( - public=heater_shaker.DeactivateShakerResult(), private=None + public=heater_shaker.DeactivateShakerResult(), ) diff --git a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_open_labware_latch.py b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_open_labware_latch.py index 6a5e7e97db2..4b122f2d7e2 100644 --- a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_open_labware_latch.py +++ b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_open_labware_latch.py @@ -81,7 +81,6 @@ async def test_open_labware_latch( public=heater_shaker.OpenLabwareLatchResult( pipetteRetracted=expect_pipette_retracted ), - private=None, state_update=update_types.StateUpdate(pipette_location=update_types.CLEAR) if expect_pipette_retracted else update_types.StateUpdate(), diff --git a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_set_and_wait_for_shake_speed.py b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_set_and_wait_for_shake_speed.py index 005f46f89cb..9db4bb27d00 100644 --- a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_set_and_wait_for_shake_speed.py +++ b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_set_and_wait_for_shake_speed.py @@ -84,7 +84,6 @@ async def test_set_and_wait_for_shake_speed( public=heater_shaker.SetAndWaitForShakeSpeedResult( pipetteRetracted=expect_pipette_retracted ), - private=None, state_update=update_types.StateUpdate(pipette_location=update_types.CLEAR) if expect_pipette_retracted else update_types.StateUpdate(), diff --git a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_set_target_temperature.py b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_set_target_temperature.py index 51df5f560b3..977a76bfdf2 100644 --- a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_set_target_temperature.py +++ b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_set_target_temperature.py @@ -55,5 +55,5 @@ async def test_set_target_temperature( result = await subject.execute(data) decoy.verify(await hs_hardware.start_set_temperature(celsius=45.6), times=1) assert result == SuccessData( - public=heater_shaker.SetTargetTemperatureResult(), private=None + public=heater_shaker.SetTargetTemperatureResult(), ) diff --git a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_wait_for_temperature.py b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_wait_for_temperature.py index c256a480f16..f9804b90944 100644 --- a/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_wait_for_temperature.py +++ b/api/tests/opentrons/protocol_engine/commands/heater_shaker/test_wait_for_temperature.py @@ -50,5 +50,5 @@ async def test_wait_for_temperature( await hs_hardware.await_temperature(awaiting_temperature=123.45), times=1 ) assert result == SuccessData( - public=heater_shaker.WaitForTemperatureResult(), private=None + public=heater_shaker.WaitForTemperatureResult(), ) diff --git a/api/tests/opentrons/protocol_engine/commands/magnetic_module/test_disengage.py b/api/tests/opentrons/protocol_engine/commands/magnetic_module/test_disengage.py index e1103518178..03d76db9e03 100644 --- a/api/tests/opentrons/protocol_engine/commands/magnetic_module/test_disengage.py +++ b/api/tests/opentrons/protocol_engine/commands/magnetic_module/test_disengage.py @@ -46,4 +46,4 @@ async def test_magnetic_module_disengage_implementation( result = await subject.execute(params=params) decoy.verify(await magnetic_module_hw.deactivate(), times=1) - assert result == SuccessData(public=DisengageResult(), private=None) + assert result == SuccessData(public=DisengageResult()) diff --git a/api/tests/opentrons/protocol_engine/commands/magnetic_module/test_engage.py b/api/tests/opentrons/protocol_engine/commands/magnetic_module/test_engage.py index 5feddee3e2e..e1f14cb3f24 100644 --- a/api/tests/opentrons/protocol_engine/commands/magnetic_module/test_engage.py +++ b/api/tests/opentrons/protocol_engine/commands/magnetic_module/test_engage.py @@ -51,4 +51,4 @@ async def test_magnetic_module_engage_implementation( result = await subject.execute(params=params) decoy.verify(await magnetic_module_hw.engage(9001), times=1) - assert result == SuccessData(public=EngageResult(), private=None) + assert result == SuccessData(public=EngageResult()) diff --git a/api/tests/opentrons/protocol_engine/commands/temperature_module/test_deactivate.py b/api/tests/opentrons/protocol_engine/commands/temperature_module/test_deactivate.py index dfe821c6bbb..91dc274f14c 100644 --- a/api/tests/opentrons/protocol_engine/commands/temperature_module/test_deactivate.py +++ b/api/tests/opentrons/protocol_engine/commands/temperature_module/test_deactivate.py @@ -45,5 +45,5 @@ async def test_await_temperature( result = await subject.execute(data) decoy.verify(await tempdeck_hardware.deactivate(), times=1) assert result == SuccessData( - public=temperature_module.DeactivateTemperatureResult(), private=None + public=temperature_module.DeactivateTemperatureResult(), ) diff --git a/api/tests/opentrons/protocol_engine/commands/temperature_module/test_set_target_temperature.py b/api/tests/opentrons/protocol_engine/commands/temperature_module/test_set_target_temperature.py index 0af71263e96..0bbd31f7a1d 100644 --- a/api/tests/opentrons/protocol_engine/commands/temperature_module/test_set_target_temperature.py +++ b/api/tests/opentrons/protocol_engine/commands/temperature_module/test_set_target_temperature.py @@ -52,5 +52,4 @@ async def test_set_target_temperature( decoy.verify(await tempdeck_hardware.start_set_temperature(celsius=1), times=1) assert result == SuccessData( public=temperature_module.SetTargetTemperatureResult(targetTemperature=1), - private=None, ) diff --git a/api/tests/opentrons/protocol_engine/commands/temperature_module/test_wait_for_temperature.py b/api/tests/opentrons/protocol_engine/commands/temperature_module/test_wait_for_temperature.py index fb9456321b9..99e76f68774 100644 --- a/api/tests/opentrons/protocol_engine/commands/temperature_module/test_wait_for_temperature.py +++ b/api/tests/opentrons/protocol_engine/commands/temperature_module/test_wait_for_temperature.py @@ -48,7 +48,7 @@ async def test_wait_for_temperature( await tempdeck_hardware.await_temperature(awaiting_temperature=123), times=1 ) assert result == SuccessData( - public=temperature_module.WaitForTemperatureResult(), private=None + public=temperature_module.WaitForTemperatureResult(), ) @@ -90,5 +90,5 @@ async def test_wait_for_temperature_requested_celsius( await tempdeck_hardware.await_temperature(awaiting_temperature=12), times=1 ) assert result == SuccessData( - public=temperature_module.WaitForTemperatureResult(), private=None + public=temperature_module.WaitForTemperatureResult(), ) diff --git a/api/tests/opentrons/protocol_engine/commands/test_aspirate.py b/api/tests/opentrons/protocol_engine/commands/test_aspirate.py index ccaac0b6748..102114b1cc8 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_aspirate.py +++ b/api/tests/opentrons/protocol_engine/commands/test_aspirate.py @@ -103,7 +103,6 @@ async def test_aspirate_implementation_no_prep( assert result == SuccessData( public=AspirateResult(volume=50, position=DeckPoint(x=1, y=2, z=3)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="abc", @@ -177,7 +176,6 @@ async def test_aspirate_implementation_with_prep( assert result == SuccessData( public=AspirateResult(volume=50, position=DeckPoint(x=1, y=2, z=3)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="abc", @@ -383,7 +381,6 @@ async def test_aspirate_implementation_meniscus( assert result == SuccessData( public=AspirateResult(volume=50, position=DeckPoint(x=1, y=2, z=3)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="abc", diff --git a/api/tests/opentrons/protocol_engine/commands/test_aspirate_in_place.py b/api/tests/opentrons/protocol_engine/commands/test_aspirate_in_place.py index f639033d157..85d8f4fab84 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_aspirate_in_place.py +++ b/api/tests/opentrons/protocol_engine/commands/test_aspirate_in_place.py @@ -123,7 +123,6 @@ async def test_aspirate_in_place_implementation( if isinstance(location, CurrentWell): assert result == SuccessData( public=AspirateInPlaceResult(volume=123), - private=None, state_update=update_types.StateUpdate( liquid_operated=update_types.LiquidOperatedUpdate( labware_id=stateupdateLabware, @@ -135,7 +134,6 @@ async def test_aspirate_in_place_implementation( else: assert result == SuccessData( public=AspirateInPlaceResult(volume=123), - private=None, ) diff --git a/api/tests/opentrons/protocol_engine/commands/test_blow_out.py b/api/tests/opentrons/protocol_engine/commands/test_blow_out.py index 93504c6904d..3e9aa6d82b8 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_blow_out.py +++ b/api/tests/opentrons/protocol_engine/commands/test_blow_out.py @@ -76,7 +76,6 @@ async def test_blow_out_implementation( assert result == SuccessData( public=BlowOutResult(position=DeckPoint(x=1, y=2, z=3)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="pipette-id", diff --git a/api/tests/opentrons/protocol_engine/commands/test_blow_out_in_place.py b/api/tests/opentrons/protocol_engine/commands/test_blow_out_in_place.py index e2735709253..49eced0670b 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_blow_out_in_place.py +++ b/api/tests/opentrons/protocol_engine/commands/test_blow_out_in_place.py @@ -52,7 +52,7 @@ async def test_blow_out_in_place_implementation( result = await subject.execute(data) - assert result == SuccessData(public=BlowOutInPlaceResult(), private=None) + assert result == SuccessData(public=BlowOutInPlaceResult()) decoy.verify( await pipetting.blow_out_in_place(pipette_id="pipette-id", flow_rate=1.234) diff --git a/api/tests/opentrons/protocol_engine/commands/test_comment.py b/api/tests/opentrons/protocol_engine/commands/test_comment.py index 4010f2ec56c..9b62afa7fe3 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_comment.py +++ b/api/tests/opentrons/protocol_engine/commands/test_comment.py @@ -15,4 +15,4 @@ async def test_comment_implementation() -> None: result = await subject.execute(data) - assert result == SuccessData(public=CommentResult(), private=None) + assert result == SuccessData(public=CommentResult()) diff --git a/api/tests/opentrons/protocol_engine/commands/test_configure_for_volume.py b/api/tests/opentrons/protocol_engine/commands/test_configure_for_volume.py index 59e65ede181..d237c9e6090 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_configure_for_volume.py +++ b/api/tests/opentrons/protocol_engine/commands/test_configure_for_volume.py @@ -84,7 +84,6 @@ async def test_configure_for_volume_implementation( assert result == SuccessData( public=ConfigureForVolumeResult(), - private=None, state_update=StateUpdate( pipette_config=PipetteConfigUpdate( pipette_id="pipette-id", serial_number="some number", config=config diff --git a/api/tests/opentrons/protocol_engine/commands/test_configure_nozzle_layout.py b/api/tests/opentrons/protocol_engine/commands/test_configure_nozzle_layout.py index e72b659a83c..cfe6f80c3a8 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_configure_nozzle_layout.py +++ b/api/tests/opentrons/protocol_engine/commands/test_configure_nozzle_layout.py @@ -145,7 +145,6 @@ async def test_configure_nozzle_layout_implementation( assert result == SuccessData( public=ConfigureNozzleLayoutResult(), - private=None, state_update=StateUpdate( pipette_nozzle_map=PipetteNozzleMapUpdate( pipette_id="pipette-id", diff --git a/api/tests/opentrons/protocol_engine/commands/test_dispense.py b/api/tests/opentrons/protocol_engine/commands/test_dispense.py index 106bf197e11..a996e6915e8 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_dispense.py +++ b/api/tests/opentrons/protocol_engine/commands/test_dispense.py @@ -82,7 +82,6 @@ async def test_dispense_implementation( assert result == SuccessData( public=DispenseResult(volume=42, position=DeckPoint(x=1, y=2, z=3)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="pipette-id-abc123", diff --git a/api/tests/opentrons/protocol_engine/commands/test_dispense_in_place.py b/api/tests/opentrons/protocol_engine/commands/test_dispense_in_place.py index 56090ec63a7..5e432bef80a 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_dispense_in_place.py +++ b/api/tests/opentrons/protocol_engine/commands/test_dispense_in_place.py @@ -85,7 +85,6 @@ async def test_dispense_in_place_implementation( if isinstance(location, CurrentWell): assert result == SuccessData( public=DispenseInPlaceResult(volume=42), - private=None, state_update=update_types.StateUpdate( liquid_operated=update_types.LiquidOperatedUpdate( labware_id=stateupdateLabware, @@ -97,7 +96,6 @@ async def test_dispense_in_place_implementation( else: assert result == SuccessData( public=DispenseInPlaceResult(volume=42), - private=None, ) diff --git a/api/tests/opentrons/protocol_engine/commands/test_drop_tip.py b/api/tests/opentrons/protocol_engine/commands/test_drop_tip.py index 8ba2c9c1d97..1d113c999c3 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_drop_tip.py +++ b/api/tests/opentrons/protocol_engine/commands/test_drop_tip.py @@ -129,7 +129,6 @@ async def test_drop_tip_implementation( assert result == SuccessData( public=DropTipResult(position=DeckPoint(x=111, y=222, z=333)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="abc", @@ -207,7 +206,6 @@ async def test_drop_tip_with_alternating_locations( result = await subject.execute(params) assert result == SuccessData( public=DropTipResult(position=DeckPoint(x=111, y=222, z=333)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="abc", diff --git a/api/tests/opentrons/protocol_engine/commands/test_drop_tip_in_place.py b/api/tests/opentrons/protocol_engine/commands/test_drop_tip_in_place.py index fde82626969..292aa532879 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_drop_tip_in_place.py +++ b/api/tests/opentrons/protocol_engine/commands/test_drop_tip_in_place.py @@ -49,7 +49,6 @@ async def test_success( assert result == SuccessData( public=DropTipInPlaceResult(), - private=None, state_update=StateUpdate( pipette_tip_state=PipetteTipStateUpdate(pipette_id="abc", tip_geometry=None) ), diff --git a/api/tests/opentrons/protocol_engine/commands/test_get_tip_presence.py b/api/tests/opentrons/protocol_engine/commands/test_get_tip_presence.py index a1d0230f74a..99e5b231e1a 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_get_tip_presence.py +++ b/api/tests/opentrons/protocol_engine/commands/test_get_tip_presence.py @@ -41,5 +41,5 @@ async def test_get_tip_presence_implementation( result = await subject.execute(data) assert result == SuccessData( - public=GetTipPresenceResult(status=status), private=None + public=GetTipPresenceResult(status=status), ) diff --git a/api/tests/opentrons/protocol_engine/commands/test_home.py b/api/tests/opentrons/protocol_engine/commands/test_home.py index 5a9446d6308..b3578c400e5 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_home.py +++ b/api/tests/opentrons/protocol_engine/commands/test_home.py @@ -24,7 +24,6 @@ async def test_home_implementation(decoy: Decoy, movement: MovementHandler) -> N assert result == SuccessData( public=HomeResult(), - private=None, state_update=update_types.StateUpdate(pipette_location=update_types.CLEAR), ) decoy.verify(await movement.home(axes=[MotorAxis.X, MotorAxis.Y])) @@ -40,7 +39,6 @@ async def test_home_all_implementation(decoy: Decoy, movement: MovementHandler) assert result == SuccessData( public=HomeResult(), - private=None, state_update=update_types.StateUpdate(pipette_location=update_types.CLEAR), ) decoy.verify(await movement.home(axes=None)) @@ -63,7 +61,6 @@ async def test_home_with_invalid_position( result = await subject.execute(data) assert result == SuccessData( public=HomeResult(), - private=None, state_update=update_types.StateUpdate(pipette_location=update_types.CLEAR), ) @@ -76,7 +73,6 @@ async def test_home_with_invalid_position( result = await subject.execute(data) assert result == SuccessData( public=HomeResult(), - private=None, state_update=update_types.StateUpdate(pipette_location=update_types.CLEAR), ) diff --git a/api/tests/opentrons/protocol_engine/commands/test_liquid_probe.py b/api/tests/opentrons/protocol_engine/commands/test_liquid_probe.py index 5593ac9ca66..2cada4f3e24 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_liquid_probe.py +++ b/api/tests/opentrons/protocol_engine/commands/test_liquid_probe.py @@ -154,7 +154,6 @@ async def test_liquid_probe_implementation( assert type(result.public) is result_type # Pydantic v1 only compares the fields. assert result == SuccessData( public=result_type(z_position=15.0, position=DeckPoint(x=1, y=2, z=3)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="abc", @@ -255,7 +254,6 @@ async def test_liquid_not_found_error( z_position=None, position=DeckPoint(x=position.x, y=position.y, z=position.z), ), - private=None, state_update=expected_state_update, ) diff --git a/api/tests/opentrons/protocol_engine/commands/test_load_labware.py b/api/tests/opentrons/protocol_engine/commands/test_load_labware.py index 85cb7794d76..3873f9854b4 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_load_labware.py +++ b/api/tests/opentrons/protocol_engine/commands/test_load_labware.py @@ -94,7 +94,6 @@ async def test_load_labware_implementation( definition=well_plate_def, offsetId="labware-offset-id", ), - private=None, state_update=StateUpdate( loaded_labware=LoadedLabwareUpdate( labware_id="labware-id", @@ -178,7 +177,6 @@ async def test_load_labware_on_labware( definition=well_plate_def, offsetId="labware-offset-id", ), - private=None, state_update=StateUpdate( loaded_labware=LoadedLabwareUpdate( labware_id="labware-id", diff --git a/api/tests/opentrons/protocol_engine/commands/test_load_liquid.py b/api/tests/opentrons/protocol_engine/commands/test_load_liquid.py index d8641b1eb4b..dbc584ae2a3 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_load_liquid.py +++ b/api/tests/opentrons/protocol_engine/commands/test_load_liquid.py @@ -48,7 +48,6 @@ async def test_load_liquid_implementation( assert result == SuccessData( public=LoadLiquidResult(), - private=None, state_update=update_types.StateUpdate( liquid_loaded=update_types.LiquidLoadedUpdate( labware_id="labware-id", diff --git a/api/tests/opentrons/protocol_engine/commands/test_load_module.py b/api/tests/opentrons/protocol_engine/commands/test_load_module.py index 9479a724110..ce68f5c9f8a 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_load_module.py +++ b/api/tests/opentrons/protocol_engine/commands/test_load_module.py @@ -92,7 +92,6 @@ async def test_load_module_implementation( model=ModuleModel.TEMPERATURE_MODULE_V2, definition=tempdeck_v2_def, ), - private=None, ) @@ -148,7 +147,6 @@ async def test_load_module_implementation_mag_block( model=ModuleModel.MAGNETIC_BLOCK_V1, definition=mag_block_v1_def, ), - private=None, ) @@ -204,7 +202,6 @@ async def test_load_module_implementation_abs_reader( model=ModuleModel.ABSORBANCE_READER_V1, definition=abs_reader_v1_def, ), - private=None, ) diff --git a/api/tests/opentrons/protocol_engine/commands/test_load_pipette.py b/api/tests/opentrons/protocol_engine/commands/test_load_pipette.py index 4d757f49a54..44a9db61863 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_load_pipette.py +++ b/api/tests/opentrons/protocol_engine/commands/test_load_pipette.py @@ -89,7 +89,6 @@ async def test_load_pipette_implementation( assert result == SuccessData( public=LoadPipetteResult(pipetteId="some id"), - private=None, state_update=StateUpdate( loaded_pipette=LoadPipetteUpdate( pipette_name=PipetteNameType.P300_SINGLE, @@ -155,7 +154,6 @@ async def test_load_pipette_implementation_96_channel( assert result == SuccessData( public=LoadPipetteResult(pipetteId="pipette-id"), - private=None, state_update=StateUpdate( loaded_pipette=LoadPipetteUpdate( pipette_name=PipetteNameType.P1000_96, diff --git a/api/tests/opentrons/protocol_engine/commands/test_move_labware.py b/api/tests/opentrons/protocol_engine/commands/test_move_labware.py index aa02d85349a..a946eccf05d 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_move_labware.py +++ b/api/tests/opentrons/protocol_engine/commands/test_move_labware.py @@ -126,7 +126,6 @@ async def test_manual_move_labware_implementation( public=MoveLabwareResult( offsetId="wowzers-a-new-offset-id", ), - private=None, state_update=update_types.StateUpdate( labware_location=update_types.LabwareLocationUpdate( labware_id="my-cool-labware-id", @@ -192,7 +191,6 @@ async def test_move_labware_implementation_on_labware( public=MoveLabwareResult( offsetId="wowzers-a-new-offset-id", ), - private=None, state_update=update_types.StateUpdate( labware_location=update_types.LabwareLocationUpdate( labware_id="my-cool-labware-id", @@ -280,7 +278,6 @@ async def test_gripper_move_labware_implementation( public=MoveLabwareResult( offsetId="wowzers-a-new-offset-id", ), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.CLEAR, labware_location=update_types.LabwareLocationUpdate( @@ -516,7 +513,6 @@ async def test_gripper_move_to_waste_chute_implementation( public=MoveLabwareResult( offsetId="wowzers-a-new-offset-id", ), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.CLEAR, labware_location=update_types.LabwareLocationUpdate( diff --git a/api/tests/opentrons/protocol_engine/commands/test_move_relative.py b/api/tests/opentrons/protocol_engine/commands/test_move_relative.py index ee874206f92..01522e4dc45 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_move_relative.py +++ b/api/tests/opentrons/protocol_engine/commands/test_move_relative.py @@ -38,7 +38,6 @@ async def test_move_relative_implementation( assert result == SuccessData( public=MoveRelativeResult(position=DeckPoint(x=1, y=2, z=3)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="pipette-id", diff --git a/api/tests/opentrons/protocol_engine/commands/test_move_to_addressable_area.py b/api/tests/opentrons/protocol_engine/commands/test_move_to_addressable_area.py index 2b64f617b9f..6925fd7cce4 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_move_to_addressable_area.py +++ b/api/tests/opentrons/protocol_engine/commands/test_move_to_addressable_area.py @@ -75,7 +75,6 @@ async def test_move_to_addressable_area_implementation_non_gen1( assert result == SuccessData( public=MoveToAddressableAreaResult(position=DeckPoint(x=9, y=8, z=7)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="abc", @@ -139,7 +138,6 @@ async def test_move_to_addressable_area_implementation_with_gen1( assert result == SuccessData( public=MoveToAddressableAreaResult(position=DeckPoint(x=9, y=8, z=7)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="abc", diff --git a/api/tests/opentrons/protocol_engine/commands/test_move_to_addressable_area_for_drop_tip.py b/api/tests/opentrons/protocol_engine/commands/test_move_to_addressable_area_for_drop_tip.py index ebcb3db1243..faca36d8121 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_move_to_addressable_area_for_drop_tip.py +++ b/api/tests/opentrons/protocol_engine/commands/test_move_to_addressable_area_for_drop_tip.py @@ -58,7 +58,6 @@ async def test_move_to_addressable_area_for_drop_tip_implementation( assert result == SuccessData( public=MoveToAddressableAreaForDropTipResult(position=DeckPoint(x=9, y=8, z=7)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="abc", diff --git a/api/tests/opentrons/protocol_engine/commands/test_move_to_coordinates.py b/api/tests/opentrons/protocol_engine/commands/test_move_to_coordinates.py index 81d74657953..2e3ada1d3d3 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_move_to_coordinates.py +++ b/api/tests/opentrons/protocol_engine/commands/test_move_to_coordinates.py @@ -58,7 +58,6 @@ async def test_move_to_coordinates_implementation( assert result == SuccessData( public=MoveToCoordinatesResult(position=DeckPoint(x=4.44, y=5.55, z=6.66)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="pipette-id", diff --git a/api/tests/opentrons/protocol_engine/commands/test_move_to_well.py b/api/tests/opentrons/protocol_engine/commands/test_move_to_well.py index 1b01009dc0e..fdfcfb45af7 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_move_to_well.py +++ b/api/tests/opentrons/protocol_engine/commands/test_move_to_well.py @@ -61,7 +61,6 @@ async def test_move_to_well_implementation( assert result == SuccessData( public=MoveToWellResult(position=DeckPoint(x=9, y=8, z=7)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="abc", diff --git a/api/tests/opentrons/protocol_engine/commands/test_pick_up_tip.py b/api/tests/opentrons/protocol_engine/commands/test_pick_up_tip.py index 2203f514cf4..00a3bc1c8a8 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_pick_up_tip.py +++ b/api/tests/opentrons/protocol_engine/commands/test_pick_up_tip.py @@ -84,7 +84,6 @@ async def test_success( tipDiameter=5, position=DeckPoint(x=111, y=222, z=333), ), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="pipette-id", diff --git a/api/tests/opentrons/protocol_engine/commands/test_prepare_to_aspirate.py b/api/tests/opentrons/protocol_engine/commands/test_prepare_to_aspirate.py index 45e8db96837..bb4f8c5f4d9 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_prepare_to_aspirate.py +++ b/api/tests/opentrons/protocol_engine/commands/test_prepare_to_aspirate.py @@ -43,7 +43,7 @@ async def test_prepare_to_aspirate_implmenetation( ) result = await subject.execute(data) - assert result == SuccessData(public=PrepareToAspirateResult(), private=None) + assert result == SuccessData(public=PrepareToAspirateResult()) async def test_overpressure_error( diff --git a/api/tests/opentrons/protocol_engine/commands/test_reload_labware.py b/api/tests/opentrons/protocol_engine/commands/test_reload_labware.py index c79727c9a31..51779c427d7 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_reload_labware.py +++ b/api/tests/opentrons/protocol_engine/commands/test_reload_labware.py @@ -66,7 +66,6 @@ async def test_reload_labware_implementation( labwareId="my-labware-id", offsetId="labware-offset-id", ), - private=None, state_update=StateUpdate( labware_location=LabwareLocationUpdate( labware_id="my-labware-id", diff --git a/api/tests/opentrons/protocol_engine/commands/test_retract_axis.py b/api/tests/opentrons/protocol_engine/commands/test_retract_axis.py index 7442460f9b1..6dedf5b2f19 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_retract_axis.py +++ b/api/tests/opentrons/protocol_engine/commands/test_retract_axis.py @@ -25,7 +25,6 @@ async def test_retract_axis_implementation( assert result == SuccessData( public=RetractAxisResult(), - private=None, state_update=update_types.StateUpdate(pipette_location=update_types.CLEAR), ) decoy.verify(await movement.retract_axis(axis=MotorAxis.Y)) diff --git a/api/tests/opentrons/protocol_engine/commands/test_save_position.py b/api/tests/opentrons/protocol_engine/commands/test_save_position.py index c0f5e091e30..bc6d8ed6668 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_save_position.py +++ b/api/tests/opentrons/protocol_engine/commands/test_save_position.py @@ -51,5 +51,4 @@ async def test_save_position_implementation( positionId="456", position=DeckPoint(x=1, y=2, z=3), ), - private=None, ) diff --git a/api/tests/opentrons/protocol_engine/commands/test_set_rail_lights.py b/api/tests/opentrons/protocol_engine/commands/test_set_rail_lights.py index 161fb2d3fcf..956473f264f 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_set_rail_lights.py +++ b/api/tests/opentrons/protocol_engine/commands/test_set_rail_lights.py @@ -26,6 +26,6 @@ async def test_set_rail_lights_implementation( result = await subject.execute(data) - assert result == SuccessData(public=SetRailLightsResult(), private=None) + assert result == SuccessData(public=SetRailLightsResult()) decoy.verify(await rail_lights.set_rail_lights(True), times=1) diff --git a/api/tests/opentrons/protocol_engine/commands/test_set_status_bar.py b/api/tests/opentrons/protocol_engine/commands/test_set_status_bar.py index 53652ce6b87..41ae6703c61 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_set_status_bar.py +++ b/api/tests/opentrons/protocol_engine/commands/test_set_status_bar.py @@ -35,7 +35,7 @@ async def test_status_bar_busy( result = await subject.execute(params=data) - assert result == SuccessData(public=SetStatusBarResult(), private=None) + assert result == SuccessData(public=SetStatusBarResult()) decoy.verify(await status_bar.set_status_bar(status=StatusBarState.OFF), times=0) @@ -63,6 +63,6 @@ async def test_set_status_bar_animation( data = SetStatusBarParams(animation=animation) result = await subject.execute(params=data) - assert result == SuccessData(public=SetStatusBarResult(), private=None) + assert result == SuccessData(public=SetStatusBarResult()) decoy.verify(await status_bar.set_status_bar(status=expected_state), times=1) diff --git a/api/tests/opentrons/protocol_engine/commands/test_touch_tip.py b/api/tests/opentrons/protocol_engine/commands/test_touch_tip.py index f18e79e0a55..d00f44fd108 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_touch_tip.py +++ b/api/tests/opentrons/protocol_engine/commands/test_touch_tip.py @@ -124,7 +124,6 @@ async def test_touch_tip_implementation( assert result == SuccessData( public=TouchTipResult(position=DeckPoint(x=4, y=5, z=6)), - private=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="abc", diff --git a/api/tests/opentrons/protocol_engine/commands/test_verify_tip_presence.py b/api/tests/opentrons/protocol_engine/commands/test_verify_tip_presence.py index 087d924f0d2..53eb1f5a59e 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_verify_tip_presence.py +++ b/api/tests/opentrons/protocol_engine/commands/test_verify_tip_presence.py @@ -32,4 +32,4 @@ async def test_verify_tip_presence_implementation( result = await subject.execute(data) - assert result == SuccessData(public=VerifyTipPresenceResult(), private=None) + assert result == SuccessData(public=VerifyTipPresenceResult()) diff --git a/api/tests/opentrons/protocol_engine/commands/test_wait_for_duration.py b/api/tests/opentrons/protocol_engine/commands/test_wait_for_duration.py index 9d351ce00d3..bc535a4b6a1 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_wait_for_duration.py +++ b/api/tests/opentrons/protocol_engine/commands/test_wait_for_duration.py @@ -22,5 +22,5 @@ async def test_pause_implementation( result = await subject.execute(data) - assert result == SuccessData(public=WaitForDurationResult(), private=None) + assert result == SuccessData(public=WaitForDurationResult()) decoy.verify(await run_control.wait_for_duration(42.0), times=1) diff --git a/api/tests/opentrons/protocol_engine/commands/test_wait_for_resume.py b/api/tests/opentrons/protocol_engine/commands/test_wait_for_resume.py index 752b85d3446..7d4b3a32edd 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_wait_for_resume.py +++ b/api/tests/opentrons/protocol_engine/commands/test_wait_for_resume.py @@ -23,7 +23,7 @@ async def test_wait_for_resume_implementation( result = await subject.execute(data) - assert result == SuccessData(public=WaitForResumeResult(), private=None) + assert result == SuccessData(public=WaitForResumeResult()) decoy.verify(await run_control.wait_for_resume(), times=1) diff --git a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_close_lid.py b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_close_lid.py index 0a3fc6e9fdf..9eb5536632d 100644 --- a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_close_lid.py +++ b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_close_lid.py @@ -58,6 +58,5 @@ async def test_close_lid( ) assert result == SuccessData( public=expected_result, - private=None, state_update=update_types.StateUpdate(pipette_location=update_types.CLEAR), ) diff --git a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_deactivate_block.py b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_deactivate_block.py index 9f4ced905dc..676a11731a8 100644 --- a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_deactivate_block.py +++ b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_deactivate_block.py @@ -45,4 +45,4 @@ async def test_deactivate_block( result = await subject.execute(data) decoy.verify(await tc_hardware.deactivate_block(), times=1) - assert result == SuccessData(public=expected_result, private=None) + assert result == SuccessData(public=expected_result) diff --git a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_deactivate_lid.py b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_deactivate_lid.py index 1ea0e218c06..83fc347236b 100644 --- a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_deactivate_lid.py +++ b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_deactivate_lid.py @@ -45,4 +45,4 @@ async def test_deactivate_lid( result = await subject.execute(data) decoy.verify(await tc_hardware.deactivate_lid(), times=1) - assert result == SuccessData(public=expected_result, private=None) + assert result == SuccessData(public=expected_result) diff --git a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_open_lid.py b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_open_lid.py index a3e547a88d7..6c26b7d2877 100644 --- a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_open_lid.py +++ b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_open_lid.py @@ -56,6 +56,5 @@ async def test_open_lid( ) assert result == SuccessData( public=expected_result, - private=None, state_update=update_types.StateUpdate(pipette_location=update_types.CLEAR), ) diff --git a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_run_extended_profile.py b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_run_extended_profile.py index 9dcefceb9f1..a4ed38a0dbf 100644 --- a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_run_extended_profile.py +++ b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_run_extended_profile.py @@ -112,4 +112,4 @@ async def test_run_extended_profile( ), times=1, ) - assert result == SuccessData(public=expected_result, private=None) + assert result == SuccessData(public=expected_result) diff --git a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_run_profile.py b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_run_profile.py index 9d3b79c66b1..6d6234a76e6 100644 --- a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_run_profile.py +++ b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_run_profile.py @@ -75,4 +75,4 @@ async def test_run_profile( ), times=1, ) - assert result == SuccessData(public=expected_result, private=None) + assert result == SuccessData(public=expected_result) diff --git a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_set_target_block_temperature.py b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_set_target_block_temperature.py index f05ac55c0ee..49d6dda3ca9 100644 --- a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_set_target_block_temperature.py +++ b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_set_target_block_temperature.py @@ -67,4 +67,4 @@ async def test_set_target_block_temperature( ), times=1, ) - assert result == SuccessData(public=expected_result, private=None) + assert result == SuccessData(public=expected_result) diff --git a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_set_target_lid_temperature.py b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_set_target_lid_temperature.py index b3565bc8a2d..372ae6a814c 100644 --- a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_set_target_lid_temperature.py +++ b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_set_target_lid_temperature.py @@ -56,4 +56,4 @@ async def test_set_target_lid_temperature( result = await subject.execute(data) decoy.verify(await tc_hardware.set_target_lid_temperature(celsius=45.6), times=1) - assert result == SuccessData(public=expected_result, private=None) + assert result == SuccessData(public=expected_result) diff --git a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_wait_for_block_temperature.py b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_wait_for_block_temperature.py index 880729bc149..426724cf16f 100644 --- a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_wait_for_block_temperature.py +++ b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_wait_for_block_temperature.py @@ -51,4 +51,4 @@ async def test_set_target_block_temperature( tc_module_substate.get_target_block_temperature(), await tc_hardware.wait_for_block_target(), ) - assert result == SuccessData(public=expected_result, private=None) + assert result == SuccessData(public=expected_result) diff --git a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_wait_for_lid_temperature.py b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_wait_for_lid_temperature.py index 47b4b006342..e358e80d6f4 100644 --- a/api/tests/opentrons/protocol_engine/commands/thermocycler/test_wait_for_lid_temperature.py +++ b/api/tests/opentrons/protocol_engine/commands/thermocycler/test_wait_for_lid_temperature.py @@ -51,4 +51,4 @@ async def test_set_target_block_temperature( tc_module_substate.get_target_lid_temperature(), await tc_hardware.wait_for_lid_target(), ) - assert result == SuccessData(public=expected_result, private=None) + assert result == SuccessData(public=expected_result) diff --git a/api/tests/opentrons/protocol_engine/commands/unsafe/test_engage_axes.py b/api/tests/opentrons/protocol_engine/commands/unsafe/test_engage_axes.py index 0130d7ce16b..72fb761ad23 100644 --- a/api/tests/opentrons/protocol_engine/commands/unsafe/test_engage_axes.py +++ b/api/tests/opentrons/protocol_engine/commands/unsafe/test_engage_axes.py @@ -45,7 +45,7 @@ async def test_engage_axes_implementation( result = await subject.execute(data) - assert result == SuccessData(public=UnsafeEngageAxesResult(), private=None) + assert result == SuccessData(public=UnsafeEngageAxesResult()) decoy.verify( await ot3_hardware_api.engage_axes([Axis.Z_L, Axis.P_L, Axis.X, Axis.Y]), diff --git a/api/tests/opentrons/protocol_engine/commands/unsafe/test_ungrip_labware.py b/api/tests/opentrons/protocol_engine/commands/unsafe/test_ungrip_labware.py index 1a41244d556..a4eae34a08d 100644 --- a/api/tests/opentrons/protocol_engine/commands/unsafe/test_ungrip_labware.py +++ b/api/tests/opentrons/protocol_engine/commands/unsafe/test_ungrip_labware.py @@ -22,7 +22,7 @@ async def test_ungrip_labware_implementation( result = await subject.execute(params=UnsafeUngripLabwareParams()) - assert result == SuccessData(public=UnsafeUngripLabwareResult(), private=None) + assert result == SuccessData(public=UnsafeUngripLabwareResult()) decoy.verify( await ot3_hardware_api.ungrip(), diff --git a/api/tests/opentrons/protocol_engine/commands/unsafe/test_unsafe_blow_out_in_place.py b/api/tests/opentrons/protocol_engine/commands/unsafe/test_unsafe_blow_out_in_place.py index a40f914e049..aec5df2620d 100644 --- a/api/tests/opentrons/protocol_engine/commands/unsafe/test_unsafe_blow_out_in_place.py +++ b/api/tests/opentrons/protocol_engine/commands/unsafe/test_unsafe_blow_out_in_place.py @@ -41,7 +41,7 @@ async def test_blow_out_in_place_implementation( result = await subject.execute(data) - assert result == SuccessData(public=UnsafeBlowOutInPlaceResult(), private=None) + assert result == SuccessData(public=UnsafeBlowOutInPlaceResult()) decoy.verify( await ot3_hardware_api.update_axis_position_estimations([Axis.P_L]), diff --git a/api/tests/opentrons/protocol_engine/commands/unsafe/test_unsafe_drop_tip_in_place.py b/api/tests/opentrons/protocol_engine/commands/unsafe/test_unsafe_drop_tip_in_place.py index 4913fe3c444..fb23d96d987 100644 --- a/api/tests/opentrons/protocol_engine/commands/unsafe/test_unsafe_drop_tip_in_place.py +++ b/api/tests/opentrons/protocol_engine/commands/unsafe/test_unsafe_drop_tip_in_place.py @@ -50,7 +50,6 @@ async def test_drop_tip_implementation( assert result == SuccessData( public=UnsafeDropTipInPlaceResult(), - private=None, state_update=StateUpdate( pipette_tip_state=PipetteTipStateUpdate(pipette_id="abc", tip_geometry=None) ), diff --git a/api/tests/opentrons/protocol_engine/commands/unsafe/test_update_position_estimators.py b/api/tests/opentrons/protocol_engine/commands/unsafe/test_update_position_estimators.py index da7ffe75012..79131994299 100644 --- a/api/tests/opentrons/protocol_engine/commands/unsafe/test_update_position_estimators.py +++ b/api/tests/opentrons/protocol_engine/commands/unsafe/test_update_position_estimators.py @@ -45,7 +45,7 @@ async def test_update_position_estimators_implementation( result = await subject.execute(data) - assert result == SuccessData(public=UpdatePositionEstimatorsResult(), private=None) + assert result == SuccessData(public=UpdatePositionEstimatorsResult()) decoy.verify( await ot3_hardware_api.update_axis_position_estimations( diff --git a/api/tests/opentrons/protocol_engine/execution/test_command_executor.py b/api/tests/opentrons/protocol_engine/execution/test_command_executor.py index f5f0ec063b0..eb84ceb018b 100644 --- a/api/tests/opentrons/protocol_engine/execution/test_command_executor.py +++ b/api/tests/opentrons/protocol_engine/execution/test_command_executor.py @@ -220,7 +220,7 @@ class _TestCommandDefinedError(ErrorOccurrence): _TestCommandReturn = Union[ - SuccessData[_TestCommandResult, None], + SuccessData[_TestCommandResult], DefinedErrorData[_TestCommandDefinedError], ] @@ -263,7 +263,7 @@ class _TestCommand( _ImplementationCls: Type[_TestCommandImpl] = TestCommandImplCls command_params = _TestCommandParams() - command_result = SuccessData(public=_TestCommandResult(), private=None) + command_result = SuccessData(public=_TestCommandResult()) queued_command = cast( Command, @@ -362,9 +362,7 @@ class _TestCommand( decoy.verify( action_dispatcher.dispatch( - SucceedCommandAction( - private_result=None, command=expected_completed_command - ) + SucceedCommandAction(command=expected_completed_command) ), ) diff --git a/api/tests/opentrons/protocol_engine/state/test_addressable_area_store.py b/api/tests/opentrons/protocol_engine/state/test_addressable_area_store.py index b259e6a3f96..44c72e38e86 100644 --- a/api/tests/opentrons/protocol_engine/state/test_addressable_area_store.py +++ b/api/tests/opentrons/protocol_engine/state/test_addressable_area_store.py @@ -234,9 +234,7 @@ def test_addressable_area_referencing_commands_load_on_simulated_deck( simulated_subject: AddressableAreaStore, ) -> None: """It should check and store the addressable area when referenced in a command.""" - simulated_subject.handle_action( - SucceedCommandAction(private_result=None, command=command) - ) + simulated_subject.handle_action(SucceedCommandAction(command=command)) assert expected_area in simulated_subject.state.loaded_addressable_areas_by_name @@ -301,7 +299,7 @@ def test_addressable_area_referencing_commands_load( subject: AddressableAreaStore, ) -> None: """It should check that the addressable area is in the deck config.""" - subject.handle_action(SucceedCommandAction(private_result=None, command=command)) + subject.handle_action(SucceedCommandAction(command=command)) assert expected_area in subject.state.loaded_addressable_areas_by_name diff --git a/api/tests/opentrons/protocol_engine/state/test_command_store_old.py b/api/tests/opentrons/protocol_engine/state/test_command_store_old.py index 5dc3c4a4ee9..d5f171b7ea9 100644 --- a/api/tests/opentrons/protocol_engine/state/test_command_store_old.py +++ b/api/tests/opentrons/protocol_engine/state/test_command_store_old.py @@ -84,7 +84,6 @@ def test_command_queue_and_unqueue() -> None: started_at=datetime(year=2022, month=2, day=2), ) succeed_2 = SucceedCommandAction( - private_result=None, command=create_succeeded_command(command_id="command-id-2"), ) @@ -137,7 +136,6 @@ def test_setup_command_queue_and_unqueue() -> None: command_id="command-id-2", started_at=datetime(year=2022, month=2, day=2) ) succeed_2 = SucceedCommandAction( - private_result=None, command=create_succeeded_command(command_id="command-id-2"), ) @@ -214,7 +212,6 @@ def test_running_command_id() -> None: started_at=datetime(year=2021, month=1, day=1), ) succeed = SucceedCommandAction( - private_result=None, command=create_succeeded_command(command_id="command-id-1"), ) @@ -303,7 +300,6 @@ def test_command_store_keeps_commands_in_queue_order() -> None: command=create_succeeded_command( command_id="command-id-2", ), - private_result=None, ) ) assert subject.state.command_history.get_all_ids() == [ diff --git a/api/tests/opentrons/protocol_engine/state/test_geometry_view.py b/api/tests/opentrons/protocol_engine/state/test_geometry_view.py index 1a0e27d2bb5..3f7ad59bda2 100644 --- a/api/tests/opentrons/protocol_engine/state/test_geometry_view.py +++ b/api/tests/opentrons/protocol_engine/state/test_geometry_view.py @@ -2937,7 +2937,6 @@ def test_get_offset_location_deck_slot( version=nice_labware_definition.version, ), ), - private_result=None, state_update=StateUpdate( loaded_labware=LoadedLabwareUpdate( labware_id="labware-id-1", @@ -2982,7 +2981,6 @@ def test_get_offset_location_module( model=tempdeck_v2_def.model, ), ), - private_result=None, ) load_labware = SucceedCommandAction( command=LoadLabware( @@ -3002,7 +3000,6 @@ def test_get_offset_location_module( version=nice_labware_definition.version, ), ), - private_result=None, state_update=StateUpdate( loaded_labware=LoadedLabwareUpdate( labware_id="labware-id-1", @@ -3051,7 +3048,6 @@ def test_get_offset_location_module_with_adapter( model=tempdeck_v2_def.model, ), ), - private_result=None, ) load_adapter = SucceedCommandAction( command=LoadLabware( @@ -3071,7 +3067,6 @@ def test_get_offset_location_module_with_adapter( version=nice_adapter_definition.version, ), ), - private_result=None, state_update=StateUpdate( loaded_labware=LoadedLabwareUpdate( labware_id="adapter-id-1", @@ -3100,7 +3095,6 @@ def test_get_offset_location_module_with_adapter( version=nice_labware_definition.version, ), ), - private_result=None, state_update=StateUpdate( loaded_labware=LoadedLabwareUpdate( labware_id="labware-id-1", @@ -3149,7 +3143,6 @@ def test_get_offset_fails_with_off_deck_labware( version=nice_labware_definition.version, ), ), - private_result=None, state_update=StateUpdate( loaded_labware=LoadedLabwareUpdate( labware_id="labware-id-1", diff --git a/api/tests/opentrons/protocol_engine/state/test_labware_store.py b/api/tests/opentrons/protocol_engine/state/test_labware_store.py index 68c7e86c5ff..47150ec425f 100644 --- a/api/tests/opentrons/protocol_engine/state/test_labware_store.py +++ b/api/tests/opentrons/protocol_engine/state/test_labware_store.py @@ -126,7 +126,6 @@ def test_handles_load_labware( ) subject.handle_action( SucceedCommandAction( - private_result=None, command=command, state_update=update_types.StateUpdate( loaded_labware=update_types.LoadedLabwareUpdate( @@ -154,7 +153,6 @@ def test_handles_reload_labware( subject.handle_action( SucceedCommandAction( - private_result=None, command=command, state_update=update_types.StateUpdate( loaded_labware=update_types.LoadedLabwareUpdate( @@ -194,7 +192,6 @@ def test_handles_reload_labware( ) subject.handle_action( SucceedCommandAction( - private_result=None, command=comment_command_2, state_update=update_types.StateUpdate( labware_location=update_types.LabwareLocationUpdate( @@ -254,7 +251,6 @@ def test_handles_move_labware( ) subject.handle_action( SucceedCommandAction( - private_result=None, command=comment_command, state_update=update_types.StateUpdate( loaded_labware=update_types.LoadedLabwareUpdate( @@ -273,7 +269,6 @@ def test_handles_move_labware( ) subject.handle_action( SucceedCommandAction( - private_result=None, command=comment_2, state_update=update_types.StateUpdate( labware_location=update_types.LabwareLocationUpdate( @@ -311,7 +306,6 @@ def test_handles_move_labware_off_deck( ) subject.handle_action( SucceedCommandAction( - private_result=None, command=comment_command, state_update=update_types.StateUpdate( loaded_labware=update_types.LoadedLabwareUpdate( @@ -330,7 +324,6 @@ def test_handles_move_labware_off_deck( ) subject.handle_action( SucceedCommandAction( - private_result=None, command=comment_2, state_update=update_types.StateUpdate( labware_location=update_types.LabwareLocationUpdate( diff --git a/api/tests/opentrons/protocol_engine/state/test_module_store.py b/api/tests/opentrons/protocol_engine/state/test_module_store.py index 4f94ed314d5..832713ed0a4 100644 --- a/api/tests/opentrons/protocol_engine/state/test_module_store.py +++ b/api/tests/opentrons/protocol_engine/state/test_module_store.py @@ -197,7 +197,6 @@ def test_load_module( ) -> None: """It should handle a successful LoadModule command.""" action = actions.SucceedCommandAction( - private_result=None, command=commands.LoadModule.construct( # type: ignore[call-arg] params=commands.LoadModuleParams( model=params_model, @@ -261,7 +260,6 @@ def test_load_thermocycler_in_thermocycler_slot( ) -> None: """It should update additional slots for thermocycler module.""" action = actions.SucceedCommandAction( - private_result=None, command=commands.LoadModule.construct( # type: ignore[call-arg] params=commands.LoadModuleParams( model=ModuleModel.THERMOCYCLER_MODULE_V2, @@ -411,12 +409,8 @@ def test_handle_hs_temperature_commands(heater_shaker_v1_def: ModuleDefinition) deck_fixed_labware=[], ) - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=load_module_cmd) - ) - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=set_temp_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=load_module_cmd)) + subject.handle_action(actions.SucceedCommandAction(command=set_temp_cmd)) assert subject.state.substate_by_module_id == { "module-id": HeaterShakerModuleSubState( module_id=HeaterShakerModuleId("module-id"), @@ -425,9 +419,7 @@ def test_handle_hs_temperature_commands(heater_shaker_v1_def: ModuleDefinition) plate_target_temperature=42, ) } - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=deactivate_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=deactivate_cmd)) assert subject.state.substate_by_module_id == { "module-id": HeaterShakerModuleSubState( module_id=HeaterShakerModuleId("module-id"), @@ -465,12 +457,8 @@ def test_handle_hs_shake_commands(heater_shaker_v1_def: ModuleDefinition) -> Non deck_fixed_labware=[], ) - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=load_module_cmd) - ) - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=set_shake_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=load_module_cmd)) + subject.handle_action(actions.SucceedCommandAction(command=set_shake_cmd)) assert subject.state.substate_by_module_id == { "module-id": HeaterShakerModuleSubState( module_id=HeaterShakerModuleId("module-id"), @@ -479,9 +467,7 @@ def test_handle_hs_shake_commands(heater_shaker_v1_def: ModuleDefinition) -> Non plate_target_temperature=None, ) } - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=deactivate_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=deactivate_cmd)) assert subject.state.substate_by_module_id == { "module-id": HeaterShakerModuleSubState( module_id=HeaterShakerModuleId("module-id"), @@ -521,9 +507,7 @@ def test_handle_hs_labware_latch_commands( deck_fixed_labware=[], ) - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=load_module_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=load_module_cmd)) assert subject.state.substate_by_module_id == { "module-id": HeaterShakerModuleSubState( module_id=HeaterShakerModuleId("module-id"), @@ -533,9 +517,7 @@ def test_handle_hs_labware_latch_commands( ) } - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=close_latch_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=close_latch_cmd)) assert subject.state.substate_by_module_id == { "module-id": HeaterShakerModuleSubState( module_id=HeaterShakerModuleId("module-id"), @@ -544,9 +526,7 @@ def test_handle_hs_labware_latch_commands( plate_target_temperature=None, ) } - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=open_latch_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=open_latch_cmd)) assert subject.state.substate_by_module_id == { "module-id": HeaterShakerModuleSubState( module_id=HeaterShakerModuleId("module-id"), @@ -588,20 +568,14 @@ def test_handle_tempdeck_temperature_commands( deck_fixed_labware=[], ) - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=load_module_cmd) - ) - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=set_temp_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=load_module_cmd)) + subject.handle_action(actions.SucceedCommandAction(command=set_temp_cmd)) assert subject.state.substate_by_module_id == { "module-id": TemperatureModuleSubState( module_id=TemperatureModuleId("module-id"), plate_target_temperature=42 ) } - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=deactivate_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=deactivate_cmd)) assert subject.state.substate_by_module_id == { "module-id": TemperatureModuleSubState( module_id=TemperatureModuleId("module-id"), plate_target_temperature=None @@ -650,12 +624,8 @@ def test_handle_thermocycler_temperature_commands( deck_fixed_labware=[], ) - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=load_module_cmd) - ) - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=set_block_temp_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=load_module_cmd)) + subject.handle_action(actions.SucceedCommandAction(command=set_block_temp_cmd)) assert subject.state.substate_by_module_id == { "module-id": ThermocyclerModuleSubState( module_id=ThermocyclerModuleId("module-id"), @@ -664,9 +634,7 @@ def test_handle_thermocycler_temperature_commands( target_lid_temperature=None, ) } - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=set_lid_temp_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=set_lid_temp_cmd)) assert subject.state.substate_by_module_id == { "module-id": ThermocyclerModuleSubState( module_id=ThermocyclerModuleId("module-id"), @@ -675,9 +643,7 @@ def test_handle_thermocycler_temperature_commands( target_lid_temperature=35.3, ) } - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=deactivate_lid_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=deactivate_lid_cmd)) assert subject.state.substate_by_module_id == { "module-id": ThermocyclerModuleSubState( module_id=ThermocyclerModuleId("module-id"), @@ -686,9 +652,7 @@ def test_handle_thermocycler_temperature_commands( target_lid_temperature=None, ) } - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=deactivate_block_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=deactivate_block_cmd)) assert subject.state.substate_by_module_id == { "module-id": ThermocyclerModuleSubState( module_id=ThermocyclerModuleId("module-id"), @@ -734,12 +698,8 @@ def test_handle_thermocycler_lid_commands( deck_fixed_labware=[], ) - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=load_module_cmd) - ) - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=open_lid_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=load_module_cmd)) + subject.handle_action(actions.SucceedCommandAction(command=open_lid_cmd)) assert subject.state.substate_by_module_id == { "module-id": ThermocyclerModuleSubState( module_id=ThermocyclerModuleId("module-id"), @@ -749,9 +709,7 @@ def test_handle_thermocycler_lid_commands( ) } - subject.handle_action( - actions.SucceedCommandAction(private_result=None, command=close_lid_cmd) - ) + subject.handle_action(actions.SucceedCommandAction(command=close_lid_cmd)) assert subject.state.substate_by_module_id == { "module-id": ThermocyclerModuleSubState( module_id=ThermocyclerModuleId("module-id"), diff --git a/api/tests/opentrons/protocol_engine/state/test_pipette_store.py b/api/tests/opentrons/protocol_engine/state/test_pipette_store.py index 10ae35e5f4a..c8eab566abe 100644 --- a/api/tests/opentrons/protocol_engine/state/test_pipette_store.py +++ b/api/tests/opentrons/protocol_engine/state/test_pipette_store.py @@ -81,16 +81,13 @@ def test_location_state_update(subject: PipetteStore) -> None: pipette_name=PipetteNameType.P300_SINGLE, mount=MountType.RIGHT, ) - subject.handle_action( - SucceedCommandAction(command=load_command, private_result=None) - ) + subject.handle_action(SucceedCommandAction(command=load_command)) # Update the location to a well: dummy_command = create_succeeded_command() subject.handle_action( SucceedCommandAction( command=dummy_command, - private_result=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="pipette-id", @@ -120,7 +117,6 @@ def test_location_state_update(subject: PipetteStore) -> None: subject.handle_action( SucceedCommandAction( command=dummy_command, - private_result=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="pipette-id", @@ -143,7 +139,6 @@ def test_location_state_update(subject: PipetteStore) -> None: subject.handle_action( SucceedCommandAction( command=dummy_command, - private_result=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="pipette-id", @@ -162,7 +157,6 @@ def test_location_state_update(subject: PipetteStore) -> None: subject.handle_action( SucceedCommandAction( command=dummy_command, - private_result=None, state_update=update_types.StateUpdate( pipette_location=update_types.PipetteLocationUpdate( pipette_id="pipette-id", @@ -181,7 +175,6 @@ def test_location_state_update(subject: PipetteStore) -> None: subject.handle_action( SucceedCommandAction( command=dummy_command, - private_result=None, state_update=update_types.StateUpdate(pipette_location=update_types.CLEAR), ) ) @@ -233,7 +226,6 @@ def test_handles_load_pipette( subject.handle_action( SucceedCommandAction( - private_result=None, command=dummy_command, state_update=update_types.StateUpdate( loaded_pipette=load_pipette_update, pipette_config=config_update @@ -271,7 +263,6 @@ def test_handles_pick_up_and_drop_tip(subject: PipetteStore) -> None: subject.handle_action( SucceedCommandAction( - private_result=None, command=load_pipette_command, state_update=update_types.StateUpdate( loaded_pipette=update_types.LoadPipetteUpdate( @@ -286,7 +277,6 @@ def test_handles_pick_up_and_drop_tip(subject: PipetteStore) -> None: subject.handle_action( SucceedCommandAction( - private_result=None, command=pick_up_tip_command, state_update=update_types.StateUpdate( pipette_tip_state=update_types.PipetteTipStateUpdate( @@ -303,7 +293,6 @@ def test_handles_pick_up_and_drop_tip(subject: PipetteStore) -> None: subject.handle_action( SucceedCommandAction( - private_result=None, command=drop_tip_command, state_update=update_types.StateUpdate( pipette_tip_state=update_types.PipetteTipStateUpdate( @@ -334,7 +323,6 @@ def test_handles_drop_tip_in_place(subject: PipetteStore) -> None: subject.handle_action( SucceedCommandAction( - private_result=None, command=load_pipette_command, state_update=update_types.StateUpdate( loaded_pipette=update_types.LoadPipetteUpdate( @@ -348,7 +336,6 @@ def test_handles_drop_tip_in_place(subject: PipetteStore) -> None: ) subject.handle_action( SucceedCommandAction( - private_result=None, command=pick_up_tip_command, state_update=update_types.StateUpdate( pipette_tip_state=update_types.PipetteTipStateUpdate( @@ -365,7 +352,6 @@ def test_handles_drop_tip_in_place(subject: PipetteStore) -> None: subject.handle_action( SucceedCommandAction( - private_result=None, command=drop_tip_in_place_command, state_update=update_types.StateUpdate( pipette_tip_state=update_types.PipetteTipStateUpdate( @@ -396,7 +382,6 @@ def test_handles_unsafe_drop_tip_in_place(subject: PipetteStore) -> None: subject.handle_action( SucceedCommandAction( - private_result=None, command=load_pipette_command, state_update=update_types.StateUpdate( loaded_pipette=update_types.LoadPipetteUpdate( @@ -410,7 +395,6 @@ def test_handles_unsafe_drop_tip_in_place(subject: PipetteStore) -> None: ) subject.handle_action( SucceedCommandAction( - private_result=None, command=pick_up_tip_command, state_update=update_types.StateUpdate( pipette_tip_state=update_types.PipetteTipStateUpdate( @@ -427,7 +411,6 @@ def test_handles_unsafe_drop_tip_in_place(subject: PipetteStore) -> None: subject.handle_action( SucceedCommandAction( - private_result=None, command=unsafe_drop_tip_in_place_command, state_update=update_types.StateUpdate( pipette_tip_state=update_types.PipetteTipStateUpdate( @@ -461,7 +444,6 @@ def test_aspirate_adds_volume( subject.handle_action( SucceedCommandAction( - private_result=None, command=load_command, state_update=update_types.StateUpdate( loaded_pipette=update_types.LoadPipetteUpdate( @@ -473,15 +455,11 @@ def test_aspirate_adds_volume( ), ) ) - subject.handle_action( - SucceedCommandAction(private_result=None, command=aspirate_command) - ) + subject.handle_action(SucceedCommandAction(command=aspirate_command)) assert subject.state.aspirated_volume_by_id["pipette-id"] == 42 - subject.handle_action( - SucceedCommandAction(private_result=None, command=aspirate_command) - ) + subject.handle_action(SucceedCommandAction(command=aspirate_command)) assert subject.state.aspirated_volume_by_id["pipette-id"] == 84 @@ -514,7 +492,6 @@ def test_dispense_subtracts_volume( subject.handle_action( SucceedCommandAction( - private_result=None, command=load_command, state_update=update_types.StateUpdate( loaded_pipette=update_types.LoadPipetteUpdate( @@ -526,18 +503,12 @@ def test_dispense_subtracts_volume( ), ) ) - subject.handle_action( - SucceedCommandAction(private_result=None, command=aspirate_command) - ) - subject.handle_action( - SucceedCommandAction(private_result=None, command=dispense_command) - ) + subject.handle_action(SucceedCommandAction(command=aspirate_command)) + subject.handle_action(SucceedCommandAction(command=dispense_command)) assert subject.state.aspirated_volume_by_id["pipette-id"] == 21 - subject.handle_action( - SucceedCommandAction(private_result=None, command=dispense_command) - ) + subject.handle_action(SucceedCommandAction(command=dispense_command)) assert subject.state.aspirated_volume_by_id["pipette-id"] == 0 @@ -567,7 +538,6 @@ def test_blow_out_clears_volume( subject.handle_action( SucceedCommandAction( - private_result=None, command=load_command, state_update=update_types.StateUpdate( loaded_pipette=update_types.LoadPipetteUpdate( @@ -579,12 +549,8 @@ def test_blow_out_clears_volume( ), ) ) - subject.handle_action( - SucceedCommandAction(private_result=None, command=aspirate_command) - ) - subject.handle_action( - SucceedCommandAction(private_result=None, command=blow_out_command) - ) + subject.handle_action(SucceedCommandAction(command=aspirate_command)) + subject.handle_action(SucceedCommandAction(command=blow_out_command)) assert subject.state.aspirated_volume_by_id["pipette-id"] is None @@ -597,9 +563,7 @@ def test_set_movement_speed(subject: PipetteStore) -> None: pipette_name=PipetteNameType.P300_SINGLE, mount=MountType.LEFT, ) - subject.handle_action( - SucceedCommandAction(private_result=None, command=load_pipette_command) - ) + subject.handle_action(SucceedCommandAction(command=load_pipette_command)) subject.handle_action( SetPipetteMovementSpeedAction(pipette_id=pipette_id, speed=123.456) ) @@ -641,7 +605,6 @@ def test_add_pipette_config( subject.handle_action( SucceedCommandAction( command=command, - private_result=None, state_update=update_types.StateUpdate( pipette_config=update_types.PipetteConfigUpdate( pipette_id="pipette-id", @@ -702,7 +665,6 @@ def test_prepare_to_aspirate_marks_pipette_ready( ) subject.handle_action( SucceedCommandAction( - private_result=None, command=load_pipette_command, state_update=update_types.StateUpdate( loaded_pipette=update_types.LoadPipetteUpdate( @@ -716,7 +678,6 @@ def test_prepare_to_aspirate_marks_pipette_ready( ) subject.handle_action( SucceedCommandAction( - private_result=None, command=pick_up_tip_command, state_update=update_types.StateUpdate( pipette_tip_state=update_types.PipetteTipStateUpdate( @@ -729,7 +690,6 @@ def test_prepare_to_aspirate_marks_pipette_ready( subject.handle_action( SucceedCommandAction( - private_result=None, command=previous, ) ) @@ -737,7 +697,5 @@ def test_prepare_to_aspirate_marks_pipette_ready( prepare_to_aspirate_command = create_prepare_to_aspirate_command( pipette_id="pipette-id" ) - subject.handle_action( - SucceedCommandAction(private_result=None, command=prepare_to_aspirate_command) - ) + subject.handle_action(SucceedCommandAction(command=prepare_to_aspirate_command)) assert subject.state.aspirated_volume_by_id["pipette-id"] == 0.0 diff --git a/api/tests/opentrons/protocol_engine/state/test_tip_state.py b/api/tests/opentrons/protocol_engine/state/test_tip_state.py index 96e0451dbbe..abb408d7418 100644 --- a/api/tests/opentrons/protocol_engine/state/test_tip_state.py +++ b/api/tests/opentrons/protocol_engine/state/test_tip_state.py @@ -66,7 +66,6 @@ def load_labware_action( ) -> actions.SucceedCommandAction: """Get a load labware command value object.""" return actions.SucceedCommandAction( - private_result=None, command=_dummy_command(), state_update=update_types.StateUpdate( loaded_labware=update_types.LoadedLabwareUpdate( @@ -124,7 +123,6 @@ def test_get_next_tip_returns_none( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -183,7 +181,6 @@ def test_get_next_tip_returns_first_tip( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -236,7 +233,6 @@ def test_get_next_tip_used_starting_tip( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -322,7 +318,6 @@ def test_get_next_tip_skips_picked_up_tip( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -338,7 +333,6 @@ def test_get_next_tip_skips_picked_up_tip( subject.handle_action( actions.SucceedCommandAction( command=_dummy_command(), - private_result=None, state_update=pick_up_tip_state_update, ) ) @@ -387,7 +381,6 @@ def test_get_next_tip_with_starting_tip( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -407,7 +400,6 @@ def test_get_next_tip_with_starting_tip( subject.handle_action( actions.SucceedCommandAction( command=_dummy_command(), - private_result=None, state_update=pick_up_tip_state_update, ) ) @@ -456,7 +448,6 @@ def test_get_next_tip_with_starting_tip_8_channel( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -479,7 +470,6 @@ def test_get_next_tip_with_starting_tip_8_channel( subject.handle_action( actions.SucceedCommandAction( command=_dummy_command(), - private_result=None, state_update=pick_up_tip_state_update, ) ) @@ -528,7 +518,6 @@ def test_get_next_tip_with_1_channel_followed_by_8_channel( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -560,7 +549,6 @@ def test_get_next_tip_with_1_channel_followed_by_8_channel( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update_2), command=_dummy_command(), ) @@ -583,7 +571,6 @@ def test_get_next_tip_with_1_channel_followed_by_8_channel( subject.handle_action( actions.SucceedCommandAction( command=_dummy_command(), - private_result=None, state_update=pick_up_tip_2_state_update, ) ) @@ -632,7 +619,6 @@ def test_get_next_tip_with_starting_tip_out_of_tips( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -655,7 +641,6 @@ def test_get_next_tip_with_starting_tip_out_of_tips( subject.handle_action( actions.SucceedCommandAction( command=_dummy_command(), - private_result=None, state_update=pick_up_tip_state_update, ) ) @@ -704,7 +689,6 @@ def test_get_next_tip_with_column_and_starting_tip( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -755,7 +739,6 @@ def test_reset_tips( subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -764,7 +747,6 @@ def test_reset_tips( subject.handle_action( actions.SucceedCommandAction( command=_dummy_command(), - private_result=None, state_update=update_types.StateUpdate( tips_used=update_types.TipsUsedUpdate( pipette_id="pipette-id", @@ -818,7 +800,6 @@ def test_handle_pipette_config_action( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -952,7 +933,6 @@ def test_active_channels( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -968,7 +948,6 @@ def test_active_channels( subject.handle_action( actions.SucceedCommandAction( command=_dummy_command(), - private_result=None, state_update=state_update, ) ) @@ -1014,7 +993,6 @@ def test_next_tip_uses_active_channels( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -1051,7 +1029,6 @@ def test_next_tip_uses_active_channels( subject.handle_action( actions.SucceedCommandAction( command=_dummy_command(), - private_result=None, state_update=state_update, ) ) @@ -1059,7 +1036,6 @@ def test_next_tip_uses_active_channels( subject.handle_action( actions.SucceedCommandAction( command=_dummy_command(), - private_result=None, state_update=update_types.StateUpdate( tips_used=update_types.TipsUsedUpdate( pipette_id="pipette-id", @@ -1115,7 +1091,6 @@ def test_next_tip_automatic_tip_tracking_with_partial_configurations( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -1141,7 +1116,6 @@ def _assert_and_pickup(well: str, nozzle_map: NozzleMap) -> None: subject.handle_action( actions.SucceedCommandAction( command=_dummy_command(), - private_result=None, state_update=pick_up_tip_state_update, ) ) @@ -1212,7 +1186,6 @@ def _reconfigure_nozzle_layout(start: str, back_l: str, front_r: str) -> NozzleM subject.handle_action( actions.SucceedCommandAction( command=_dummy_command(), - private_result=None, state_update=state_update, ) ) @@ -1270,7 +1243,6 @@ def test_next_tip_automatic_tip_tracking_tiprack_limits( ) subject.handle_action( actions.SucceedCommandAction( - private_result=None, state_update=update_types.StateUpdate(pipette_config=config_update), command=_dummy_command(), ) @@ -1293,7 +1265,6 @@ def _get_next_and_pickup(nozzle_map: NozzleMap) -> str | None: subject.handle_action( actions.SucceedCommandAction( command=_dummy_command(), - private_result=None, state_update=pick_up_tip_state_update, ) ) @@ -1337,7 +1308,7 @@ def _reconfigure_nozzle_layout(start: str, back_l: str, front_r: str) -> NozzleM ) subject.handle_action( actions.SucceedCommandAction( - command=_dummy_command(), private_result=None, state_update=state_update + command=_dummy_command(), state_update=state_update ) ) return nozzle_map diff --git a/api/tests/opentrons/protocol_engine/state/test_well_store.py b/api/tests/opentrons/protocol_engine/state/test_well_store.py index 822329aa874..ec59a643db0 100644 --- a/api/tests/opentrons/protocol_engine/state/test_well_store.py +++ b/api/tests/opentrons/protocol_engine/state/test_well_store.py @@ -27,7 +27,6 @@ def test_handles_liquid_probe_success(subject: WellStore) -> None: subject.handle_action( SucceedCommandAction( - private_result=None, command=liquid_probe, state_update=update_types.StateUpdate( liquid_probed=update_types.LiquidProbedUpdate( @@ -65,7 +64,6 @@ def test_handles_load_liquid_success(subject: WellStore) -> None: subject.handle_action( SucceedCommandAction( - private_result=None, command=load_liquid, state_update=update_types.StateUpdate( liquid_loaded=update_types.LiquidLoadedUpdate( @@ -124,7 +122,6 @@ def test_handles_load_liquid_and_aspirate(subject: WellStore) -> None: subject.handle_action( SucceedCommandAction( - private_result=None, command=load_liquid, state_update=update_types.StateUpdate( liquid_loaded=update_types.LiquidLoadedUpdate( @@ -137,7 +134,6 @@ def test_handles_load_liquid_and_aspirate(subject: WellStore) -> None: ) subject.handle_action( SucceedCommandAction( - private_result=None, command=aspirate_1, state_update=update_types.StateUpdate( liquid_operated=update_types.LiquidOperatedUpdate( @@ -150,7 +146,6 @@ def test_handles_load_liquid_and_aspirate(subject: WellStore) -> None: ) subject.handle_action( SucceedCommandAction( - private_result=None, command=aspirate_2, state_update=update_types.StateUpdate( liquid_operated=update_types.LiquidOperatedUpdate( @@ -199,7 +194,6 @@ def test_handles_liquid_probe_and_aspirate(subject: WellStore) -> None: subject.handle_action( SucceedCommandAction( - private_result=None, command=liquid_probe, state_update=update_types.StateUpdate( liquid_probed=update_types.LiquidProbedUpdate( @@ -214,7 +208,6 @@ def test_handles_liquid_probe_and_aspirate(subject: WellStore) -> None: ) subject.handle_action( SucceedCommandAction( - private_result=None, command=aspirate, state_update=update_types.StateUpdate( liquid_operated=update_types.LiquidOperatedUpdate( diff --git a/api/tests/opentrons/protocol_runner/test_legacy_command_mapper.py b/api/tests/opentrons/protocol_runner/test_legacy_command_mapper.py index c31c6a2e551..42c589ba7d3 100644 --- a/api/tests/opentrons/protocol_runner/test_legacy_command_mapper.py +++ b/api/tests/opentrons/protocol_runner/test_legacy_command_mapper.py @@ -117,7 +117,6 @@ def test_map_after_command() -> None: assert result == [ pe_actions.SucceedCommandAction( - private_result=None, command=pe_commands.Comment.construct( id="command.COMMENT-0", key="command.COMMENT-0", @@ -241,7 +240,6 @@ def test_command_stack() -> None: command_id="command.COMMENT-1", started_at=matchers.IsA(datetime) ), pe_actions.SucceedCommandAction( - private_result=None, command=pe_commands.Comment.construct( id="command.COMMENT-0", key="command.COMMENT-0", @@ -321,7 +319,6 @@ def test_map_labware_load(minimal_labware_def: LabwareDefinition) -> None: ), notes=[], ), - private_result=None, state_update=StateUpdate( loaded_labware=LoadedLabwareUpdate( labware_id="labware-0", @@ -381,7 +378,6 @@ def test_map_instrument_load(decoy: Decoy) -> None: result=pe_commands.LoadPipetteResult(pipetteId="pipette-0"), notes=[], ), - private_result=None, state_update=StateUpdate( loaded_pipette=LoadPipetteUpdate( pipette_id="pipette-0", @@ -460,7 +456,6 @@ def test_map_module_load( ), notes=[], ), - private_result=None, ) [result_queue, result_run, result_succeed] = LegacyCommandMapper( @@ -525,7 +520,6 @@ def test_map_module_labware_load(minimal_labware_def: LabwareDefinition) -> None ), notes=[], ), - private_result=None, state_update=StateUpdate( loaded_labware=LoadedLabwareUpdate( labware_id="labware-0", @@ -584,7 +578,6 @@ def test_map_pause() -> None: started_at=matchers.IsA(datetime), ), pe_actions.SucceedCommandAction( - private_result=None, command=pe_commands.WaitForResume.construct( id="command.PAUSE-0", key="command.PAUSE-0", diff --git a/api/tests/opentrons/protocol_runner/test_legacy_context_plugin.py b/api/tests/opentrons/protocol_runner/test_legacy_context_plugin.py index 1714064bfa5..0ccc616012a 100644 --- a/api/tests/opentrons/protocol_runner/test_legacy_context_plugin.py +++ b/api/tests/opentrons/protocol_runner/test_legacy_context_plugin.py @@ -163,18 +163,14 @@ async def test_command_broker_messages( decoy.when( mock_legacy_command_mapper.map_command(command=legacy_command) - ).then_return( - [pe_actions.SucceedCommandAction(engine_command, private_result=None)] - ) + ).then_return([pe_actions.SucceedCommandAction(engine_command)]) await to_thread.run_sync(handler, legacy_command) await subject.teardown() decoy.verify( - mock_action_dispatcher.dispatch( - pe_actions.SucceedCommandAction(engine_command, private_result=None) - ) + mock_action_dispatcher.dispatch(pe_actions.SucceedCommandAction(engine_command)) ) @@ -222,9 +218,7 @@ async def test_equipment_broker_messages( decoy.when( mock_legacy_command_mapper.map_equipment_load(load_info=load_info) - ).then_return( - [pe_actions.SucceedCommandAction(command=engine_command, private_result=None)] - ) + ).then_return([pe_actions.SucceedCommandAction(command=engine_command)]) await to_thread.run_sync(handler, load_info) @@ -232,6 +226,6 @@ async def test_equipment_broker_messages( decoy.verify( mock_action_dispatcher.dispatch( - pe_actions.SucceedCommandAction(command=engine_command, private_result=None) + pe_actions.SucceedCommandAction(command=engine_command) ), )