Skip to content

Commit

Permalink
added test and bumped APIVersion to 2.21
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoegenburg committed Sep 17, 2024
1 parent d5121d7 commit bfcb740
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
8 changes: 4 additions & 4 deletions api/src/opentrons/protocol_engine/state/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,11 @@ def get_well_position(
elif well_location.origin == WellOrigin.CENTER:
offset = offset.copy(update={"z": offset.z + well_depth / 2.0})
elif well_location.origin == WellOrigin.MENISCUS:
height = self._wells.get_last_measured_liquid_height(
liquid_height = self._wells.get_last_measured_liquid_height(
labware_id, well_name
) # in deck coordinates
if height is not None:
offset = offset.copy(update={"z": offset.z + height})
)
if liquid_height is not None:
offset = offset.copy(update={"z": offset.z + liquid_height})
else:
raise errors.LiquidHeightUnknownError(
"Must liquid probe before specifying WellOrigin.MENISCUS."
Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocols/api_support/definitions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .types import APIVersion

MAX_SUPPORTED_VERSION = APIVersion(2, 20)
MAX_SUPPORTED_VERSION = APIVersion(2, 21)
"""The maximum supported protocol API version in this release."""

MIN_SUPPORTED_VERSION = APIVersion(2, 0)
Expand Down
11 changes: 11 additions & 0 deletions api/tests/opentrons/protocol_api/test_well.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ def test_well_center(decoy: Decoy, mock_well_core: WellCore, subject: Well) -> N
assert result.labware.as_well() is subject


def test_well_meniscus(decoy: Decoy, mock_well_core: WellCore, subject: Well) -> None:
"""It should get a Location representing the meniscus of the well."""
decoy.when(mock_well_core.get_meniscus(z_offset=4.2)).then_return(Point(1, 2, 3))

result = subject.meniscus(4.2)

assert isinstance(result, Location)
assert result.point == Point(1, 2, 3)
assert result.labware.as_well() is subject


def test_has_tip(decoy: Decoy, mock_well_core: WellCore, subject: Well) -> None:
"""It should get tip state from the core."""
decoy.when(mock_well_core.has_tip()).then_return(True)
Expand Down

0 comments on commit bfcb740

Please sign in to comment.