Skip to content

Commit 679ccd8

Browse files
sanni-tecormany
andauthored
docs(api): liquid classes docstrings and descriptions updates (#18996)
# Overview Fixes some docstrings in liquid-class related functions and some descriptions of the liquid class schema fields. ## Changelog - Docstring updates for: - `transfer_with_liquid_class`, `consolidate_with_liquid_class`, `distribute_with_liquid_class` - `get_liquid_class`, `define_liquid_class` - Liquid classes json schema field descriptions ## Risk assessment None. Docs fixes only --------- Co-authored-by: Ed Cormany <[email protected]>
1 parent 6659afe commit 679ccd8

File tree

3 files changed

+16
-24
lines changed

3 files changed

+16
-24
lines changed

api/src/opentrons/protocol_api/instrument_context.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,9 +1801,6 @@ def transfer_with_liquid_class(
18011801
) -> InstrumentContext:
18021802
"""Move a particular type of liquid from one well or group of wells to another.
18031803
1804-
..
1805-
This is intended for Opentrons internal use only and is not a guaranteed API.
1806-
18071804
:param liquid_class: The type of liquid to move. You must specify the liquid class,
18081805
even if you have used :py:meth:`.Labware.load_liquid` to indicate what liquid the
18091806
source contains.
@@ -1944,16 +1941,12 @@ def distribute_with_liquid_class(
19441941
"""
19451942
Distribute a particular type of liquid from one well to a group of wells.
19461943
1947-
..
1948-
This is intended for Opentrons internal use only and is not a guaranteed API.
1949-
19501944
:param liquid_class: The type of liquid to move. You must specify the liquid class,
19511945
even if you have used :py:meth:`.Labware.load_liquid` to indicate what liquid the
19521946
source contains.
19531947
:type liquid_class: :py:class:`.LiquidClass`
19541948
1955-
:param volume: The amount, in µL, to aspirate from the source and dispense to
1956-
each destination.
1949+
:param volume: The amount, in µL, to dispense to each destination.
19571950
:param source: A single well for the pipette to target, or a group of wells to
19581951
target in a single aspirate for a multi-channel pipette.
19591952
:param dest: A list of wells to dispense liquid into.
@@ -2092,16 +2085,12 @@ def consolidate_with_liquid_class(
20922085
"""
20932086
Consolidate a particular type of liquid from a group of wells to one well.
20942087
2095-
..
2096-
This is intended for Opentrons internal use only and is not a guaranteed API.
2097-
20982088
:param liquid_class: The type of liquid to move. You must specify the liquid class,
20992089
even if you have used :py:meth:`.Labware.load_liquid` to indicate what liquid the
21002090
source contains.
21012091
:type liquid_class: :py:class:`.LiquidClass`
21022092
2103-
:param volume: The amount, in µL, to aspirate from the source and dispense to
2104-
each destination.
2093+
:param volume: The amount, in µL, to aspirate from each source well.
21052094
:param source: A list of wells to aspirate liquid from.
21062095
:param dest: A single well, list of wells, trash bin, or waste chute to dispense liquid into.
21072096
Multiple wells can only be given for multi-channel pipette configurations, and

api/src/opentrons/protocol_api/protocol_context.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,6 +1386,8 @@ def get_liquid_class(
13861386
- ``"ethanol_80"``: an Opentrons-verified liquid class for volatile liquid. Based on 80% ethanol.
13871387
13881388
:raises: ``LiquidClassDefinitionDoesNotExist``: if the specified liquid class does not exist.
1389+
1390+
:returns: A new LiquidClass object.
13891391
"""
13901392
return self._core.get_liquid_class(name=name, version=DEFAULT_LC_VERSION)
13911393

@@ -1397,15 +1399,16 @@ def define_liquid_class(
13971399
base_liquid_class: Optional[LiquidClass] = None,
13981400
display_name: Optional[str] = None,
13991401
) -> LiquidClass:
1400-
"""Define a custom liquid class, either based on an existing, Opentrons-verified liquid class, or to create a completely new one.
1402+
"""Define a custom liquid class, either based on an existing liquid class, or create a completely new one.
14011403
14021404
:param name: The name to give to the new liquid class. Cannot use the name of an Opentrons-verified liquid class.
1403-
:param properties: A dict of transfer properties for the Flex pipette and tips to use for liquid class transfers. The nested dictionary must have top-level keys corresponding to pipette load names and second-level keys corresponding to compatible tip rack load names. Further nested key–value pairs should be in the format returned by :py:meth:`.LiquidClass.get_for`. See also the `liquid class JSON schema <https://github.com/Opentrons/opentrons/tree/edge/shared-data/liquid-class/schemas>`_.
1405+
:param properties: A dict of transfer properties for pipette and tip combinations to use for liquid class transfers. The nested dictionary must have top-level keys corresponding to pipette load names and second-level keys corresponding to compatible tip rack load names. Further nested key–value pairs should be as specified in ``TransferPropertiesDict``. See the `liquid class type definitions <https://github.com/Opentrons/opentrons/blob/edge/shared-data/python/opentrons_shared_data/liquid_classes/types.py>`_.
14041406
1405-
:param base_liquid_class: An Opentrons-verified liquid class to base the newly defined liquid class on. The specified ``transfer_properties`` will override any existing properties for the Flex pipette and tips. All other properties will remain the same as those in the base class.
1407+
:param base_liquid_class: An existing liquid class object to base the newly defined liquid class on. The specified ``transfer_properties`` will override any existing properties for the specified pipette and tip combinations. All other properties will remain the same as those in the base class.
14061408
14071409
:param display_name: An optional name for the liquid class. Defaults to the title-case ``name`` if a display name isn't provided.
14081410
1411+
:returns: A new LiquidClass object.
14091412
"""
14101413
if definition_exists(name, DEFAULT_LC_VERSION):
14111414
raise ValueError(

shared-data/liquid-class/schemas/1.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
},
106106
"airGapByVolume": {
107107
"type": "array",
108-
"description": "Settings for air gap keyed by target aspiration volume.",
108+
"description": "Settings for air gap keyed by current volume in the tip.",
109109
"items": {
110110
"type": "array",
111111
"items": { "$ref": "#/definitions/positiveNumber" },
@@ -127,7 +127,7 @@
127127
},
128128
"pushOutByVolume": {
129129
"type": "array",
130-
"description": "Settings for pushout keyed by target aspiration volume.",
130+
"description": "Settings for pushout keyed by target dispense volume.",
131131
"items": {
132132
"type": "array",
133133
"items": { "$ref": "#/definitions/positiveNumber" },
@@ -138,7 +138,7 @@
138138
},
139139
"disposalByVolume": {
140140
"type": "array",
141-
"description": "An array of two tuples containing positive numbers.",
141+
"description": "Settings for disposal volume, keyed by the total volume aspirated for a multi-dispense.",
142142
"items": {
143143
"type": "array",
144144
"items": { "$ref": "#/definitions/positiveNumber" },
@@ -149,7 +149,7 @@
149149
},
150150
"conditioningByVolume": {
151151
"type": "array",
152-
"description": "Settings for conditioning volume keyed by target dispense volume.",
152+
"description": "Settings for conditioning volume keyed by the total volume aspirated for a multi-dispense.",
153153
"items": {
154154
"type": "array",
155155
"items": { "$ref": "#/definitions/positiveNumber" },
@@ -160,7 +160,7 @@
160160
},
161161
"correctionByVolume": {
162162
"type": "array",
163-
"description": "Settings for volume correction keyed by target aspiration/dispense volume, representing additional volume the plunger should move to accurately hit target volume.",
163+
"description": "Settings for volume correction, keyed by the total volume in tip after the aspirate/dispense action. The correction value provides additional information about how much the pipette plunger should move to accurately pipette the specified volume when using this liquid class.",
164164
"items": {
165165
"type": "array",
166166
"items": { "type": "number" },
@@ -211,7 +211,7 @@
211211
"location": {
212212
"type": "string",
213213
"enum": ["source", "destination", "trash"],
214-
"description": "Location well or trash entity for blow out."
214+
"description": "Location for blow out."
215215
},
216216
"flowRate": {
217217
"$ref": "#/definitions/positiveNumber",
@@ -244,7 +244,7 @@
244244
},
245245
"retractAspirate": {
246246
"type": "object",
247-
"description": "Shared properties for the retract function after aspiration or dispense.",
247+
"description": "Shared properties for the retract function after an aspiration.",
248248
"properties": {
249249
"endPosition": {
250250
"$ref": "#/definitions/tipPosition"
@@ -268,7 +268,7 @@
268268
},
269269
"retractDispense": {
270270
"type": "object",
271-
"description": "Shared properties for the retract function after aspiration or dispense.",
271+
"description": "Shared properties for the retract function after a dispense.",
272272
"properties": {
273273
"endPosition": {
274274
"$ref": "#/definitions/tipPosition"

0 commit comments

Comments
 (0)