diff --git a/hardware-testing/hardware_testing/gravimetric/__main__.py b/hardware-testing/hardware_testing/gravimetric/__main__.py index f5e525131ab..d2b0f8e92c5 100644 --- a/hardware-testing/hardware_testing/gravimetric/__main__.py +++ b/hardware-testing/hardware_testing/gravimetric/__main__.py @@ -186,8 +186,8 @@ def _get_protocol_context(cls, args: argparse.Namespace) -> ProtocolContext: engine.state_view._labware_store._add_labware_offset(offset) return _ctx - @classmethod # noqa: C901 - def build_run_args(cls, args: argparse.Namespace) -> "RunArgs": + @classmethod + def build_run_args(cls, args: argparse.Namespace) -> "RunArgs": # noqa: C901 """Build.""" _ctx = RunArgs._get_protocol_context(args) operator_name = helpers._get_operator_name(_ctx.is_simulating()) diff --git a/hardware-testing/hardware_testing/gravimetric/execute.py b/hardware-testing/hardware_testing/gravimetric/execute.py index 4a9699e0ddd..aff94702437 100644 --- a/hardware-testing/hardware_testing/gravimetric/execute.py +++ b/hardware-testing/hardware_testing/gravimetric/execute.py @@ -641,7 +641,6 @@ def run(cfg: config.GravimetricConfig, resources: TestResources) -> None: # noq resources.pipette, return_tip=False, minimum_z_height=_minimum_z_height(cfg), - offset=_get_channel_offset(cfg, 0), ) # always trash calibration tips calibration_tip_in_use = False trial_count = 0 @@ -739,10 +738,7 @@ def run(cfg: config.GravimetricConfig, resources: TestResources) -> None: # noq if not cfg.same_tip: resources.pipette._retract() # retract to top of gantry _drop_tip( - resources.pipette, - cfg.return_tip, - _minimum_z_height(cfg), - _get_channel_offset(cfg, run_trial.channel), + resources.pipette, cfg.return_tip, _minimum_z_height(cfg) ) ui.print_header(f"{volume} uL channel {channel + 1} CALCULATIONS") diff --git a/hardware-testing/hardware_testing/gravimetric/helpers.py b/hardware-testing/hardware_testing/gravimetric/helpers.py index 9b6878d65f1..c4f073faac5 100644 --- a/hardware-testing/hardware_testing/gravimetric/helpers.py +++ b/hardware-testing/hardware_testing/gravimetric/helpers.py @@ -40,6 +40,8 @@ WellLocation, DropTipWellLocation, ) + + def _add_fake_simulate( ctx: protocol_api.ProtocolContext, is_simulating: bool ) -> protocol_api.ProtocolContext: @@ -233,11 +235,14 @@ def _override_add_current_volume(self, volume_incr: float) -> None: # noqa: ANN def _override_ok_to_add_volume(self, volume_incr: float) -> bool: # noqa: ANN001 return True -def _override_validate_aspirate_volume(state_view: StateView, pipette_id: str, aspirate_volume: float + +def _override_validate_aspirate_volume( + state_view: StateView, pipette_id: str, aspirate_volume: float ) -> float: return aspirate_volume -def _override_check_deck_conflict_for_8_channel( + +def _check_safe_for_pipette_movement( engine_state: StateView, pipette_id: str, labware_id: str, @@ -246,6 +251,7 @@ def _override_check_deck_conflict_for_8_channel( ) -> None: return None + def _override_software_supports_high_volumes() -> None: # yea so ok this is pretty ugly but this is super helpful for us # with this we don't need to apply patches, and can run the testing scripts @@ -254,8 +260,13 @@ def _override_software_supports_high_volumes() -> None: Pipette.set_current_volume = _override_set_current_volume # type: ignore[assignment] Pipette.ok_to_add_volume = _override_ok_to_add_volume # type: ignore[assignment] Pipette.add_current_volume = _override_add_current_volume # type: ignore[assignment] - PE_pipetting._validate_aspirate_volume = _override_validate_aspirate_volume # type: ignore[assignment] - PE_deck_conflict._check_deck_conflict_for_8_channel = _override_check_deck_conflict_for_8_channel # type: ignore[assignment] + PE_pipetting._validate_aspirate_volume = ( + _override_validate_aspirate_volume + ) # type: ignore[assignment] + PE_deck_conflict.check_safe_for_pipette_movement = ( + _check_safe_for_pipette_movement + ) # type: ignore[assignment] + def _get_channel_offset(cfg: config.VolumetricConfig, channel: int) -> Point: assert ( @@ -328,24 +339,12 @@ def _pick_up_tip( def _drop_tip( - pipette: InstrumentContext, - return_tip: bool, - minimum_z_height: int = 0, - offset: Optional[Point] = None, + pipette: InstrumentContext, return_tip: bool, minimum_z_height: int = 0 ) -> None: if return_tip: pipette.return_tip(home_after=False) else: - if offset is not None: - #we don't actually need the offset, if this is an 8 channel we always center channel a1 over the back of the trash - trash_well = pipette.trash_container.well(0) - trash_container = trash_well.center().move(Point(0,trash_well.width/2,0)) - pipette.drop_tip( - trash_container, - home_after=False, - ) - else: - pipette.drop_tip(home_after=False) + pipette.drop_tip(home_after=False) if minimum_z_height > 0: cur_location = pipette._get_last_location_by_api_version() if cur_location is not None: