Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(api): corrections to docstrings involving TrashBins #14194

Merged
merged 4 commits into from
Dec 18, 2023

Conversation

ecormany
Copy link
Contributor

Overview

Updates the docstrings for fixed_trash and trash_container to accurately reflect how they work with different robot types and API versions.

Test Plan

Check API reference entries.

Changelog

  • Two docstrings mentioned above.
  • drop_tip() doesn't go to the "default" trash_container — it goes to the current value.

Review requests

I love it because it's trash?

Risk assessment

v low, docstrings only

@ecormany ecormany added docs papi-v2 Python API V2 labels Dec 13, 2023
@ecormany ecormany requested a review from a team as a code owner December 13, 2023 19:48
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Merging #14194 (ef5f5ea) into chore_release-7.1.0 (165a607) will not change coverage.
Report is 39 commits behind head on chore_release-7.1.0.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           chore_release-7.1.0   #14194   +/-   ##
====================================================
  Coverage                70.45%   70.45%           
====================================================
  Files                     2512     2512           
  Lines                    71237    71237           
  Branches                  8982     8982           
====================================================
  Hits                     50189    50189           
  Misses                   18849    18849           
  Partials                  2199     2199           
Flag Coverage Δ
g-code-testing 96.44% <ø> (ø)
notify-server 89.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...i/src/opentrons/protocol_api/instrument_context.py 89.40% <ø> (ø)
api/src/opentrons/protocol_api/protocol_context.py 92.30% <ø> (ø)

Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

I think we can simplify InstrumentContext.trash_container to take advantage of existing abstractions. Other than that, just some minor suggestions.

api/src/opentrons/protocol_api/instrument_context.py Outdated Show resolved Hide resolved
Comment on lines 1055 to 1064
"""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.

.. versionchanged:: 2.16
Returns a :py:class:`.TrashBin` object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, but:

Copy link
Contributor

@jwwojak jwwojak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text here all seems fine to me. No additional comments from this side of the peanut gallery. 👍

@ecormany ecormany merged commit e8fc541 into chore_release-7.1.0 Dec 18, 2023
25 checks passed
@ecormany ecormany deleted the docstring-trashbin-fixes branch December 18, 2023 22:02
ncdiehl11 pushed a commit that referenced this pull request Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs papi-v2 Python API V2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants