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

fix(api): Error handling for unsupported pipette configuration behavior with partial column and row #15961

Merged
merged 10 commits into from
Aug 14, 2024

Conversation

CaseyBatten
Copy link
Contributor

@CaseyBatten CaseyBatten commented Aug 9, 2024

Overview

Covers PLAT-457
The 96ch does not currently have any approved nozzle maps supporting partial column configuration, so we want to raise a more helpful error when attempting it. Also, if the user provided a configuration that spanned A1 through H1 or H1 through H12 the partial column would accept it (maps existed for these). We want to block off this improper use of the API. The 8ch pipette similarly will now raise an error when attempting a ROW configuration, which is only meant for the 96ch.

Test Plan and Hands on Testing

  • Ensure all expected configurations are supported for partial tip layout for a given pipette
  • Ensure an error is raised if a protocol attempts to configure a pipette with an invalid layout

Changelog

configure_nozzle_layout API has new error cases and test cases to prevent improper use of API 2.20 layouts.

Review requests

Risk assessment

Low, this simply enforces proper use of new behavior for 8.0.0. Eventually, if we want to enable partial column on the 96ch we will need to remove it's error case, but for now this makes use cases clearer with better feedback from analysis.

@CaseyBatten CaseyBatten requested a review from a team as a code owner August 9, 2024 21:14
@CaseyBatten CaseyBatten requested a review from ecormany August 12, 2024 17:59
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.

Left a bunch of wordsmithing suggestions. The only 100% required changes are the misspellings of "configuration".

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
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
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
api/src/opentrons/protocol_api/instrument_context.py Outdated Show resolved Hide resolved
Comment on lines 2113 to 2121
raise ValueError(
f"A partial column configuration with 'start'={start} cannot have its 'end' parameter be in row A."
)
back_left_resolved = end
elif start == "A1" or start == "A12":
if "H" in end:
raise ValueError(
f"A partial column configuration with 'start'={start} cannot have its 'end' parameter be in row H."
)
Copy link
Member

Choose a reason for hiding this comment

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

I feel like this should explain that a column configured to use nozzles A through H does not constitute a 'partial' column and that the user should use an ALL configuration instead. (Can you configure an 8-channel with a COLUMN configuration?)

raise ValueError(
f"Parameters 'front_right' and 'back_left' cannot be used with {style.value} Nozzle Configuration Layout."
)
if style == NozzleLayout.ROW:
Copy link
Member

Choose a reason for hiding this comment

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

Should we repeat the same check for COLUMN style too?

Copy link
Member

@sanni-t sanni-t left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@CaseyBatten CaseyBatten merged commit 225251b into chore_release-8.0.0 Aug 14, 2024
21 checks passed
@CaseyBatten CaseyBatten deleted the partial_column_and_row_bug_fixes branch August 14, 2024 22:23
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