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

feat(api): add liquid presence detection to load_instrument() #15482

Merged
merged 16 commits into from
Jun 26, 2024

Conversation

pmoegenburg
Copy link
Contributor

@pmoegenburg pmoegenburg commented Jun 20, 2024

Overview

This PR adds a boolean argument to the load_instrument ProtocolContext method that enables liquid presence detection for the loaded pipette via an additional pipette state variable.

Closes EXEC-541.

Test Plan

Added tests to ensure this bool arg can only be populated in API versions 2.20 onward and when using a Flex robot.

Changelog

Review requests

Risk assessment

Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: #15483

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Couple changes needed to support the API level distinctions (and we should test them also)

api/src/opentrons/protocol_api/protocol_context.py Outdated Show resolved Hide resolved
api/src/opentrons/protocol_api/protocol_context.py Outdated Show resolved Hide resolved
@@ -62,6 +62,7 @@ def get_pipette_view(
static_config_by_id: Optional[Dict[str, StaticPipetteConfig]] = None,
flow_rates_by_id: Optional[Dict[str, FlowRates]] = None,
nozzle_layout_by_id: Optional[Dict[str, Optional[NozzleMap]]] = None,
liquid_presence_detection_by_id: Optional[Dict[str, Optional[bool]]] = None,
Copy link
Member

Choose a reason for hiding this comment

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

why Optional[bool] rather than just bool?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The LoadPipetteParams liquidPresenceDetection is Optional

Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: #15483

Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: #15483

Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: #15483

Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: #15483

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Couple other nits

api/src/opentrons/protocol_api/protocol_context.py Outdated Show resolved Hide resolved
api/src/opentrons/protocol_engine/state/pipettes.py Outdated Show resolved Hide resolved
api/src/opentrons/protocol_api/protocol_context.py Outdated Show resolved Hide resolved
api/src/opentrons/protocol_api/protocol_context.py Outdated Show resolved Hide resolved
Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: #15483

This PR is an automated snapshot update request. Please review the
changes and merge if they are acceptable or find you bug and fix it.

Co-authored-by: pmoegenburg <[email protected]>
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Couple last small things but looking good

api/src/opentrons/protocol_api/protocol_context.py Outdated Show resolved Hide resolved
api/src/opentrons/protocols/api_support/util.py Outdated Show resolved Hide resolved
Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: #15515

This PR is an automated snapshot update request. Please review the
changes and merge if they are acceptable or find you bug and fix it.

Co-authored-by: pmoegenburg <[email protected]>
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Last thing - API verison 2.20 doesn't exist yet. We'll need to add it, which will be pretty easy, but #15507 should probably get merged first. So we can treat this as done for now and fix it up once that happens in the next day or two.

Copy link
Contributor

@ryanthecoder ryanthecoder left a comment

Choose a reason for hiding this comment

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

lgtm

@pmoegenburg pmoegenburg dismissed sfoster1’s stale review June 26, 2024 19:15

APIVersion has been bumped to 2.20

@pmoegenburg pmoegenburg merged commit 6888ffd into edge Jun 26, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants