Skip to content

Commit 8d63591

Browse files
authored
docs(api): API reference entries for liquid class methods (#17887)
# Overview Adding methods like `transfer_with_liquid_class()` to the API reference. Addresses RTC-610. Any follow-up edits to these docstrings can be handled in #17992. ## Test Plan and Hands on Testing [Sandbox](http://sandbox.docs.opentrons.com/api-ref-liquid-classes/v2/new_protocol_api.html) ## Changelog - Param descriptions for the three main liquid class methods. - Unhide the methods - Add `LiquidClass` to the ref. - Nitpicks to allow docs to build. ## Review requests Are these "good enough"? Want to get these merged to keep other liquid class docs work moving. ## Risk assessment low, docs
1 parent 39ad078 commit 8d63591

File tree

3 files changed

+73
-11
lines changed

3 files changed

+73
-11
lines changed

api/docs/v2/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@
445445
("py:class", r".*protocol_api\.config.*"),
446446
("py:class", r".*opentrons_shared_data.*"),
447447
("py:class", r".*protocol_api._parameters.Parameters.*"),
448+
("py:class", r".*protocol_api._liquid_properties.TransferProperties*"),
448449
("py:class", r".*RobotContext"), # shh it's a secret (for now)
449450
("py:class", r".*FlexStackerContext"), # ssh it's a secret (for now)
450451
(

api/docs/v2/new_protocol_api.rst

+3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ Wells and Liquids
4848

4949
.. autoclass:: opentrons.protocol_api.Liquid
5050

51+
.. autoclass:: opentrons.protocol_api.LiquidClass
52+
:members:
53+
5154
.. _protocol-api-modules:
5255

5356
Modules

api/src/opentrons/protocol_api/instrument_context.py

+69-11
Original file line numberDiff line numberDiff line change
@@ -1526,11 +1526,32 @@ def transfer_with_liquid_class(
15261526
return_tip: bool = False,
15271527
visit_every_well: bool = False,
15281528
) -> InstrumentContext:
1529-
"""Transfer liquid from source to dest using the specified liquid class properties.
1529+
"""Move a particular type of liquid from one well or group of wells to another.
15301530
1531-
TODO: Add args description.
1531+
:param liquid_class: The type of liquid to move. You must specify the liquid class,
1532+
even if you have used :py:meth:`.load_liquid` to indicate what liquid the
1533+
source contains.
1534+
:type liquid_class: :py:class:`.LiquidClass`
15321535
1533-
:meta private:
1536+
:param volume: The amount, in µL, to aspirate from each source and dispense to
1537+
each destination.
1538+
:param source: A single well or a list of wells to aspirate liquid from.
1539+
:param dest: A single well or a list of wells to dispense liquid into.
1540+
:param new_tip: When to pick up and drop tips during the command.
1541+
Defaults to ``"once"``.
1542+
1543+
- ``"once"``: Use one tip for the entire command.
1544+
- ``"always"``: Use a new tip for each set of aspirate and dispense steps.
1545+
- ``"per source"``: Use one tip for each source well, even if
1546+
:ref:`tip refilling <complex-tip-refilling>` is required.
1547+
- ``"never"``: Do not pick up or drop tips at all.
1548+
1549+
See :ref:`param-tip-handling` for details.
1550+
1551+
:param trash_location: A trash container, well, or other location to dispose of
1552+
tips. Depending on the liquid class, the pipette may also blow out liquid here.
1553+
:param return_tip: Whether to drop used tips in their original locations
1554+
in the tip rack, instead of the trash.
15341555
"""
15351556
transfer_args = verify_and_normalize_transfer_args(
15361557
source=source,
@@ -1590,12 +1611,30 @@ def distribute_with_liquid_class(
15901611
visit_every_well: bool = False,
15911612
) -> InstrumentContext:
15921613
"""
1593-
Distribute liquid from a single source to multiple destinations
1594-
using the specified liquid class properties.
1614+
Distribute a particular type of liquid from one well to a group of wells.
15951615
1596-
TODO: Add args description.
1616+
:param liquid_class: The type of liquid to move. You must specify the liquid class,
1617+
even if you have used :py:meth:`.load_liquid` to indicate what liquid the
1618+
source contains.
1619+
:type liquid_class: :py:class:`.LiquidClass`
15971620
1598-
:meta private:
1621+
:param volume: The amount, in µL, to aspirate from the source and dispense to
1622+
each destination.
1623+
:param source: A single well to aspirate liquid from.
1624+
:param dest: A list of wells to dispense liquid into.
1625+
:param new_tip: When to pick up and drop tips during the command.
1626+
Defaults to ``"once"``.
1627+
1628+
- ``"once"`` or ``"per source"``: Use one tip for the entire command.
1629+
- ``"always"``: Use a new tip for each set of aspirate and dispense steps.
1630+
- ``"never"``: Do not pick up or drop tips at all.
1631+
1632+
See :ref:`param-tip-handling` for details.
1633+
1634+
:param trash_location: A trash container, well, or other location to dispose of
1635+
tips. Depending on the liquid class, the pipette may also blow out liquid here.
1636+
:param return_tip: Whether to drop used tips in their original locations
1637+
in the tip rack, instead of the trash.
15991638
"""
16001639
transfer_args = verify_and_normalize_transfer_args(
16011640
source=source,
@@ -1659,12 +1698,31 @@ def consolidate_with_liquid_class(
16591698
visit_every_well: bool = False,
16601699
) -> InstrumentContext:
16611700
"""
1662-
Consolidate liquid from multiple sources to a single destination
1663-
using the specified liquid class properties.
1701+
Consolidate a particular type of liquid from a group of wells to one well.
16641702
1665-
TODO: Add args description.
1703+
:param liquid_class: The type of liquid to move. You must specify the liquid class,
1704+
even if you have used :py:meth:`.load_liquid` to indicate what liquid the
1705+
source contains.
1706+
:type liquid_class: :py:class:`.LiquidClass`
16661707
1667-
:meta private:
1708+
:param volume: The amount, in µL, to aspirate from the source and dispense to
1709+
each destination.
1710+
:param source: A list of wells to aspirate liquid from.
1711+
:param dest: A single well to dispense liquid into.
1712+
:param new_tip: When to pick up and drop tips during the command.
1713+
Defaults to ``"once"``.
1714+
1715+
- ``"once"``: Use one tip for the entire command.
1716+
- ``"always"``: Use a new tip for each set of aspirate and dispense steps.
1717+
- ``"per source"``: Not available when consolidating.
1718+
- ``"never"``: Do not pick up or drop tips at all.
1719+
1720+
See :ref:`param-tip-handling` for details.
1721+
1722+
:param trash_location: A trash container, well, or other location to dispose of
1723+
tips. Depending on the liquid class, the pipette may also blow out liquid here.
1724+
:param return_tip: Whether to drop used tips in their original locations
1725+
in the tip rack, instead of the trash.
16681726
"""
16691727
transfer_args = verify_and_normalize_transfer_args(
16701728
source=source,

0 commit comments

Comments
 (0)