From f364bc9778a0ccd8b4a584edbcb457d36c413736 Mon Sep 17 00:00:00 2001 From: pmoegenburg Date: Fri, 11 Oct 2024 14:30:34 -0400 Subject: [PATCH] linted, removed test, reverted protocol/models/ work --- .../protocol_engine/commands/dispense.py | 2 +- .../protocol_engine/errors/__init__.py | 2 -- .../protocol_engine/commands/test_aspirate.py | 30 ------------------- .../protocol/models/__init__.py | 6 ---- .../protocol/models/shared_models.py | 19 +----------- 5 files changed, 2 insertions(+), 57 deletions(-) diff --git a/api/src/opentrons/protocol_engine/commands/dispense.py b/api/src/opentrons/protocol_engine/commands/dispense.py index 19b98755bbc..cd00d50df3b 100644 --- a/api/src/opentrons/protocol_engine/commands/dispense.py +++ b/api/src/opentrons/protocol_engine/commands/dispense.py @@ -7,7 +7,7 @@ from pydantic import Field -from ..types import DeckPoint, WellOrigin +from ..types import DeckPoint from ..state.update_types import StateUpdate from .pipetting_common import ( PipetteIdMixin, diff --git a/api/src/opentrons/protocol_engine/errors/__init__.py b/api/src/opentrons/protocol_engine/errors/__init__.py index 161e45f82dd..ee4447b38bf 100644 --- a/api/src/opentrons/protocol_engine/errors/__init__.py +++ b/api/src/opentrons/protocol_engine/errors/__init__.py @@ -74,7 +74,6 @@ InvalidWellDefinitionError, OperationLocationNotInWellError, InvalidDispenseVolumeError, - InvalidAspirateLocationError, ) from .error_occurrence import ErrorOccurrence, ProtocolCommandFailedError @@ -157,5 +156,4 @@ "InvalidWellDefinitionError", "OperationLocationNotInWellError", "InvalidDispenseVolumeError", - "InvalidAspirateLocationError", ] diff --git a/api/tests/opentrons/protocol_engine/commands/test_aspirate.py b/api/tests/opentrons/protocol_engine/commands/test_aspirate.py index 4a735d98074..8d6f6d92179 100644 --- a/api/tests/opentrons/protocol_engine/commands/test_aspirate.py +++ b/api/tests/opentrons/protocol_engine/commands/test_aspirate.py @@ -32,7 +32,6 @@ from opentrons.protocol_engine.types import CurrentWell, LoadedPipette from opentrons.hardware_control import HardwareControlAPI from opentrons.protocol_engine.notes import CommandNoteAdder -from opentrons.protocol_engine.errors import InvalidAspirateLocationError @pytest.fixture @@ -382,32 +381,3 @@ async def test_aspirate_implementation_meniscus( ) ), ) - - -async def test_aspirate_implementation_invalid_meniscus_location_error( - decoy: Decoy, - state_view: StateView, - hardware_api: HardwareControlAPI, - movement: MovementHandler, - pipetting: PipettingHandler, - subject: AspirateImplementation, - mock_command_note_adder: CommandNoteAdder, -) -> None: - """Aspirate should raise InvalidAspirateLocationError when called with WellOrigin.MENISCUS and a WellOffset greater than 0.0 (ie aspiration from air).""" - location = LiquidHandlingWellLocation( - origin=WellOrigin.MENISCUS, offset=WellOffset(x=0, y=0, z=1) - ) - - data = AspirateParams( - pipetteId="abc", - labwareId="123", - wellName="A3", - wellLocation=location, - volume=50, - flowRate=1.23, - ) - - decoy.when(pipetting.get_is_ready_to_aspirate(pipette_id="abc")).then_return(True) - - with pytest.raises(InvalidAspirateLocationError): - await subject.execute(data) diff --git a/shared-data/python/opentrons_shared_data/protocol/models/__init__.py b/shared-data/python/opentrons_shared_data/protocol/models/__init__.py index a8aed145690..76f8449d93d 100644 --- a/shared-data/python/opentrons_shared_data/protocol/models/__init__.py +++ b/shared-data/python/opentrons_shared_data/protocol/models/__init__.py @@ -10,9 +10,6 @@ Location, ProfileStep, WellLocation, - LiquidHandlingWellLocation, - DropTipWellLocation, - PickUpTipWellLocation, OffsetVector, Dimensions, GroupMetadata, @@ -38,9 +35,6 @@ "Location", "ProfileStep", "WellLocation", - "LiquidHandlingWellLocation", - "DropTipWellLocation", - "PickUpTipWellLocation", "OffsetVector", "Dimensions", "GroupMetadata", diff --git a/shared-data/python/opentrons_shared_data/protocol/models/shared_models.py b/shared-data/python/opentrons_shared_data/protocol/models/shared_models.py index dad7d0a1e4b..8cf3276f71f 100644 --- a/shared-data/python/opentrons_shared_data/protocol/models/shared_models.py +++ b/shared-data/python/opentrons_shared_data/protocol/models/shared_models.py @@ -1,4 +1,4 @@ -from typing import Optional, List, Dict, Any, Union +from typing import Optional, List, Dict, Any from typing_extensions import Literal from enum import Enum from pydantic import BaseModel @@ -92,23 +92,6 @@ class ProfileStep(BaseModel): class WellLocation(BaseModel): origin: Optional[str] offset: Optional[OffsetVector] - volumeOffset: Optional[float] - - -class LiquidHandlingWellLocation(BaseModel): - origin: Optional[str] - offset: Optional[OffsetVector] - volumeOffset: Optional[Union[float, Literal["operationVolume"]]] - - -class DropTipWellLocation(BaseModel): - origin: Optional[str] - offset: Optional[OffsetVector] - - -class PickUpTipWellLocation(BaseModel): - origin: Optional[str] - offset: Optional[OffsetVector] class Liquid(BaseModel):