Skip to content

Commit

Permalink
eliminated unneeded method
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoegenburg committed Oct 17, 2024
1 parent 936b91c commit 665e815
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 36 deletions.
11 changes: 0 additions & 11 deletions api/src/opentrons/protocol_api/core/engine/well.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,6 @@ def get_center(self) -> Point:
well_location=WellLocation(origin=WellOrigin.CENTER),
)

def get_meniscus(self, z_offset: float) -> Point:
"""Get the coordinate of the well's meniscus, with a z-offset."""
return self._engine_client.state.geometry.get_well_position(
well_name=self._name,
labware_id=self._labware_id,
well_location=WellLocation(
origin=WellOrigin.MENISCUS,
offset=WellOffset(x=0, y=0, z=z_offset),
),
)

def load_liquid(
self,
liquid: Liquid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ def get_center(self) -> Point:
"""Get the coordinate of the well's center."""
return self._geometry.center()

def get_meniscus(self, z_offset: float) -> Point:
"""This will never be called because it was added in API 2.21."""
assert False, "get_meniscus only supported in API 2.21 & later"

def load_liquid(
self,
liquid: Liquid,
Expand Down
4 changes: 0 additions & 4 deletions api/src/opentrons/protocol_api/core/well.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ def get_bottom(self, z_offset: float) -> Point:
def get_center(self) -> Point:
"""Get the coordinate of the well's center."""

@abstractmethod
def get_meniscus(self, z_offset: float) -> Point:
"""Get the coordinate of the well's meniscus, with an z-offset."""

@abstractmethod
def load_liquid(
self,
Expand Down
17 changes: 0 additions & 17 deletions api/tests/opentrons/protocol_api/core/engine/test_well_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,23 +149,6 @@ def test_get_center(
assert subject.get_center() == Point(1, 2, 3)


def test_get_meniscus(
decoy: Decoy, mock_engine_client: EngineClient, subject: WellCore
) -> None:
"""It should get a well bottom."""
decoy.when(
mock_engine_client.state.geometry.get_well_position(
labware_id="labware-id",
well_name="well-name",
well_location=WellLocation(
origin=WellOrigin.MENISCUS, offset=WellOffset(x=0, y=0, z=2.5)
),
)
).then_return(Point(1, 2, 3))

assert subject.get_meniscus(z_offset=2.5) == Point(1, 2, 3)


def test_has_tip(
decoy: Decoy, mock_engine_client: EngineClient, subject: WellCore
) -> None:
Expand Down

0 comments on commit 665e815

Please sign in to comment.