Skip to content

Commit

Permalink
docs(api): corrections to docstrings involving TrashBins (#14194)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Max Marrone <[email protected]>
  • Loading branch information
ecormany and SyntaxColoring authored Dec 18, 2023
1 parent 6417cf7 commit e8fc541
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
16 changes: 9 additions & 7 deletions api/src/opentrons/protocol_api/instrument_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ def drop_tip(
See :ref:`pipette-drop-tip` for examples.
If no location is passed (e.g. ``pipette.drop_tip()``), the pipette will drop
the attached tip into its default :py:attr:`trash_container`.
the attached tip into its :py:attr:`trash_container`.
Starting with API version 2.15, if the trash container is the default fixed
trash, the API will instruct the pipette to drop tips in different locations
Expand Down Expand Up @@ -1538,12 +1538,14 @@ def trash_container(self) -> Union[labware.Labware, TrashBin, WasteChute]:
This is the property used to determine where to drop tips and blow out liquids
when calling :py:meth:`drop_tip` or :py:meth:`blow_out` without arguments.
On a Flex running a protocol with API version 2.16 or higher, ``trash_container`` is
the first ``TrashBin`` or ``WasteChute`` object loaded in the protocol.
On a Flex running a protocol with API version 2.15, ``trash_container`` is
a single-well fixed trash labware in slot D3.
On a an OT-2, ``trash_container`` is always a single-well fixed trash labware
in slot 12.
You can set this to a :py:obj:`Labware`, :py:obj:`TrashBin`, or :py:obj:`WasteChute`.
The default value depends on the robot type and API version:
- :py:obj:`ProtocolContext.fixed_trash`, if it exists.
- Otherwise, the first item previously loaded with
:py:obj:`ProtocolContext.load_trash_bin()` or
:py:obj:`ProtocolContext.load_waste_chute()`.
.. versionchanged:: 2.16
Added support for ``TrashBin`` and ``WasteChute`` objects.
Expand Down
12 changes: 8 additions & 4 deletions api/src/opentrons/protocol_api/protocol_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,12 +1055,16 @@ def deck(self) -> Deck:
@property # type: ignore
@requires_version(2, 0)
def fixed_trash(self) -> Union[Labware, TrashBin]:
"""The trash fixed to slot 12 of the robot deck.
"""The trash fixed to slot 12 of an OT-2's deck.
In API Versions prior to 2.16 it has one well and should be accessed like labware in your protocol.
e.g. ``protocol.fixed_trash['A1']``
In API version 2.15 and earlier, the fixed trash is a :py:class:`.Labware` object with one well. Access it like labware in your protocol. For example, ``protocol.fixed_trash['A1']``.
In API Version 2.16 and above it returns a Trash fixture for OT-2 Protocols.
In API version 2.15 only, Flex protocols have a fixed trash in slot A3.
In API version 2.16 and later, the fixed trash only exists in OT-2 protocols. It is a :py:class:`.TrashBin` object, which doesn't have any wells. Trying to access ``fixed_trash`` in a Flex protocol will raise an error. See :ref:`configure-trash-bin` for details on using the movable trash in Flex protocols.
.. versionchanged:: 2.16
Returns a :py:class:`.TrashBin` object.
"""
if self._api_version >= APIVersion(2, 16):
if self._core.robot_type == "OT-3 Standard":
Expand Down

0 comments on commit e8fc541

Please sign in to comment.