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): liquid presence verification #15695

Merged
merged 60 commits into from
Aug 16, 2024
Merged

Conversation

jwwojak
Copy link
Contributor

@jwwojak jwwojak commented Jul 17, 2024

Overview

Adding new documentation to describe new Liquid Presence Verification methods, includes updating docstrings. Sandbox links below.

The JIRA ticket is RTC-148.

Test Plan

Review the new docs.

Changelog

New
Adds a new H2 section, Liquid Presence Verification to the page, Loading Pipettes (loading.rst). Includes two H3 subsections:

New
Adds two new H2 sections to the page, Liquid Control (liquids.rst):

Revisions/Additions
Small changes to docstrings for:

Review requests

Take a look and or before adding others.

Risk assessment

Low. Docs changes only.

jwwojak added 19 commits July 9, 2024 16:31
Aa a reminder of how to do this. It's been a while.
Make it clear this is for Flex only and include the version.
Deve environment conked out.
This is the bulk or main part of LLD. The smaller methods, detect_liquid_presence and require_liquid_presence, are not here or in this draft. Those will go in the building block commands doc.
Fixing because it raises warnings during docs builds.
Name changes and stubs.
@jwwojak jwwojak added docs papi-v2 Python API V2 labels Jul 17, 2024
@jwwojak jwwojak requested a review from ecormany July 17, 2024 19:33
@jwwojak jwwojak self-assigned this Jul 17, 2024
@jwwojak
Copy link
Contributor Author

jwwojak commented Jul 17, 2024

Didn't check w/ Black before opening PR.

jwwojak added 2 commits July 17, 2024 16:55
Changes to descriptions in Building Block Commands and in the docstring references.
@ecormany ecormany changed the title docs(api):liquid presence verification docs(api): liquid presence verification Jul 18, 2024
jwwojak added 2 commits July 24, 2024 11:55
Changes from Ed's recommendations (Slack) and change name to "Liquid Presence Detection" from "Liquid Presence Verification."

Some outstanding issues: code sample. Will get help w/ this.
jwwojak added 14 commits July 30, 2024 08:10
This is the bulk or main part of LLD. The smaller methods, detect_liquid_presence and require_liquid_presence, are not here or in this draft. Those will go in the building block commands doc.
Fixing because it raises warnings during docs builds.
Name changes and stubs.
Changes to descriptions in Building Block Commands and in the docstring references.
Changes from Ed's recommendations (Slack) and change name to "Liquid Presence Detection" from "Liquid Presence Verification."

Some outstanding issues: code sample. Will get help w/ this.
I'm a bit burned out. Saving to save.
@ecormany ecormany force-pushed the docs-liquid-presence-detection branch from c6a6fde to 36aea23 Compare July 30, 2024 12:11
Copy link
Contributor

@ecormany ecormany left a comment

Choose a reason for hiding this comment

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

Some changes to make. Semantic changes are around being clear about exactly when LLD happens, the difference between detecting and requiring, and the strong link between the require standalone method and global detection (naming things is hard, so it goes). Syntactic changes are to get the big code block working — get engineer support as needed. And stylistic changes are all to be blamed on the Pythonistas 🐍 🧐

api/docs/v2/pipettes/loading.rst Outdated Show resolved Hide resolved
api/docs/v2/pipettes/loading.rst Outdated Show resolved Hide resolved
api/docs/v2/pipettes/loading.rst Outdated Show resolved Hide resolved
Enable Liquid Presence Detection
--------------------------------

The easiest, and recommended, way to use Liquid Presence Detection is by adding the optional Boolean argument, ``liquid_presence_detection=True`` to :py:meth:`.ProtocolContext.load_instrument` in your protocol. When ``True``, the robot will check for liquid on every aspiration. You can also turn this feature off and back on again later in a protocol. This example adds Liquid Presence Detection to the 8-Channel Pipette used in the sample protocol at the top of the page.
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Not recommended, because of how time-consuming it is.
  • Remove comma after "argument" since the monospace formatting does the work (and this isn't an appositive).
  • Last sentence, probably better to say "enables…for" instead of "adds…to"

api/docs/v2/pipettes/loading.rst Outdated Show resolved Hide resolved
api/src/opentrons/protocol_api/instrument_context.py Outdated Show resolved Hide resolved
api/src/opentrons/protocol_api/instrument_context.py Outdated Show resolved Hide resolved
@@ -2120,7 +2120,7 @@ def configure_nozzle_layout( # noqa: C901

@requires_version(2, 20)
def detect_liquid_presence(self, well: labware.Well) -> bool:
"""Check if there is liquid in a well.
"""Checks if there is liquid in a well. Will not raise an error if it does not detect liquid. Flex pipettes only. See :ref:`lpd` and :ref:`detect-liquid-presence`.

:returns: A boolean.
Copy link
Contributor

@ecormany ecormany Aug 1, 2024

Choose a reason for hiding this comment

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

We could remove line 2125, or move the prose description of the values of true and false here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will move the longer, prose description to :returns: (line 2125).

api/src/opentrons/protocol_api/instrument_context.py Outdated Show resolved Hide resolved
api/src/opentrons/protocol_api/protocol_context.py Outdated Show resolved Hide resolved
ecormany and others added 6 commits August 2, 2024 13:25
Committing recommended changes. Will continue to work on others.

Co-authored-by: Ed Cormany <[email protected]>
Made changes based on Ed's comments and our meeting today. Got many, but not all. More to come.
-- removed code sample
-- added text about pressure sensor locations
-- ready for review again
@jwwojak jwwojak requested a review from ecormany August 15, 2024 19:01
Copy link
Contributor

@ecormany ecormany left a comment

Choose a reason for hiding this comment

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

Went through final changes with Joe. :shipit:

@jwwojak jwwojak merged commit de3e4bb into edge Aug 16, 2024
21 checks passed
y3rsh pushed a commit that referenced this pull request Aug 16, 2024
# Overview

Adding new documentation to describe new Liquid Presence Verification
methods, includes updating docstrings. Sandbox links below.

The JIRA ticket is
[RTC-148](https://opentrons.atlassian.net/browse/RTC-148).


# Test Plan

Review the new docs.

# Changelog

**New**
Adds a new H2 section, [Liquid Presence
Verification](http://sandbox.docs.opentrons.com/docs-liquid-presence-detection/v2/pipettes/loading.html#liquid-presence-verification)
to the page, Loading Pipettes (`loading.rst`). Includes two H3
subsections:

- [Enable LPV
Globally](http://sandbox.docs.opentrons.com/docs-liquid-presence-detection/v2/pipettes/loading.html#enable-lpv-globally)
- [Turning LPV Off and
On](http://sandbox.docs.opentrons.com/docs-liquid-presence-detection/v2/pipettes/loading.html#turing-lpv-off-and-on)

**New**
Adds two new H2 sections to the page, Liquid Control (`liquids.rst`):

- [Detect
Liquids](http://sandbox.docs.opentrons.com/docs-liquid-presence-detection/v2/basic_commands/liquids.html#detect-liquids)
- [Require
Liquids](http://sandbox.docs.opentrons.com/docs-liquid-presence-detection/v2/basic_commands/liquids.html#require-liquids)

**Revisions/Additions**
Small changes to docstrings for:

- `liquid_presence_detection`, an argument of
[load_instrument](http://sandbox.docs.opentrons.com/docs-liquid-presence-detection/v2/new_protocol_api.html?highlight=load_instrument#opentrons.protocol_api.ProtocolContext.load_instrument)
-
[detect_liquid_presence](http://sandbox.docs.opentrons.com/docs-liquid-presence-detection/v2/new_protocol_api.html?highlight=detect_liquid_presence)
in v2 Reference.
-
[require_liquid_presence](http://sandbox.docs.opentrons.com/docs-liquid-presence-detection/v2/new_protocol_api.html?highlight=require_liquid_presence)

# Review requests

Take a look and or before adding others.

# Risk assessment

Low. Docs changes only.


[RTC-148]:
https://opentrons.atlassian.net/browse/RTC-148?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: Edward Cormany <[email protected]>
@jwwojak jwwojak deleted the docs-liquid-presence-detection branch August 20, 2024 13:37
y3rsh added a commit that referenced this pull request Aug 20, 2024
# Cherry Pick the LLD docs

Co-authored-by: Joe Wojak <[email protected]>
Co-authored-by: Edward Cormany <[email protected]>
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.

4 participants