Skip to content

Commit

Permalink
linted, removed test, reverted protocol/models/ work
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoegenburg committed Oct 11, 2024
1 parent 4e6a6ba commit f364bc9
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 57 deletions.
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_engine/commands/dispense.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions api/src/opentrons/protocol_engine/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
InvalidWellDefinitionError,
OperationLocationNotInWellError,
InvalidDispenseVolumeError,
InvalidAspirateLocationError,
)

from .error_occurrence import ErrorOccurrence, ProtocolCommandFailedError
Expand Down Expand Up @@ -157,5 +156,4 @@
"InvalidWellDefinitionError",
"OperationLocationNotInWellError",
"InvalidDispenseVolumeError",
"InvalidAspirateLocationError",
]
30 changes: 0 additions & 30 deletions api/tests/opentrons/protocol_engine/commands/test_aspirate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
Location,
ProfileStep,
WellLocation,
LiquidHandlingWellLocation,
DropTipWellLocation,
PickUpTipWellLocation,
OffsetVector,
Dimensions,
GroupMetadata,
Expand All @@ -38,9 +35,6 @@
"Location",
"ProfileStep",
"WellLocation",
"LiquidHandlingWellLocation",
"DropTipWellLocation",
"PickUpTipWellLocation",
"OffsetVector",
"Dimensions",
"GroupMetadata",
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit f364bc9

Please sign in to comment.