Skip to content

Commit

Permalink
change get_well_volume to get_liquid_volume
Browse files Browse the repository at this point in the history
  • Loading branch information
caila-marashaj committed Feb 3, 2025
1 parent 5a5d9f2 commit 016cffc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_api/core/engine/well.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def current_liquid_height(self) -> float:
labware_id=labware_id, well_name=well_name
)

def get_well_volume(self) -> float:
def get_liquid_volume(self) -> float:
"""Return the current volume in a well."""
labware_id = self.labware_id
well_name = self._name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def current_liquid_height(self) -> float:
"""Get the current liquid height."""
return 0.0

def get_well_volume(self) -> float:
def get_liquid_volume(self) -> float:
"""Get the current well volume."""
return 0.0

Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_api/core/well.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def current_liquid_height(self) -> float:
"""Get the current liquid height."""

@abstractmethod
def get_well_volume(self) -> float:
def get_liquid_volume(self) -> float:
"""Get the current volume within a well."""


Expand Down
4 changes: 2 additions & 2 deletions api/src/opentrons/protocol_api/labware.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@ def current_liquid_height(self) -> float:
return self._core.current_liquid_height()

@requires_version(2, 21)
def current_well_volume(self) -> float:
def current_liquid_volume(self) -> float:
"""Get the current liquid volume in a well."""
return self._core.get_well_volume()
return self._core.get_liquid_volume()

@requires_version(2, 21)
def estimate_liquid_height_after_pipetting(self, operation_volume: float) -> float:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def test_current_liquid_volume(
labware_id="labware-id", well_name="well-name"
)
).then_return(fake_volume)
assert subject.get_well_volume() == fake_volume
assert subject.get_liquid_volume() == fake_volume

# make sure that WellCore propagates a LiquidVolumeUnknownError
decoy.when(
Expand All @@ -279,7 +279,7 @@ def test_current_liquid_volume(
).then_raise(LiquidVolumeUnknownError())

with pytest.raises(LiquidVolumeUnknownError):
subject.get_well_volume()
subject.get_liquid_volume()


@pytest.mark.parametrize("operation_volume", [0.0, 100, -100, 2, -4, 5])
Expand Down

0 comments on commit 016cffc

Please sign in to comment.