-
Notifications
You must be signed in to change notification settings - Fork 179
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
refactor(api): better names for liquid probe commands #15578
Conversation
Edit detect_liquid_presence, require_liquid_presence, and measure_liquid_height as per the standup today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Thanks for the quick follow-up. A few adjustments:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we merge, let's
- Change the subject line of the PR to be an indication of what the changes do, rather than what the changes are (for instance,
refactor(api): better names for liquid probe commands
, orrefactor(api): handle errors in liquid probe commands
) - Since the subject line is too small to have enough information, use the description to go into more depth, even if that depth is just a bullet list about changing names and handling errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Here are a couple of test fixups.
-
Let's try to fill in the "test plan" and "risk assessment" sections of the PR description.
I think I overheard you and @ryanthecoder talk about writing some Python protocols to play around with it. That sounds like a good idea, and you can describe that as the test plan. Just make it clear whether you're going to do that before or after merging this.
Other than that, looks great.
P.S. Here is the bug that I'm predicting will be exposed by this, which I alluded to in the last PR. EXEC-598. (It's my fault, not yours. 🙂)
api/tests/opentrons/protocol_api/core/engine/test_instrument_core.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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 to merge once the print()
statement is removed.
One note about test_liquid_probe_without_recovery()
for future reference, but I think we can move on for now.
Overview
Edit detect_liquid_presence, require_liquid_presence, and measure_liquid_height as per the standup today.
Change instrument_context tests to check for the right error(LiquidNotFoundError)
Split find_liquid_level into two functions: liquid_probe_with_recovery and liquid_probe_without_recovery
Test Plan
Added unit tests for liquid_probe_with_recovery and liquid_probe_without recovery to test_instrument_core.py
Added unit tests for detect_liquid_presence, require_liquid_presence, and measure_liquid_height to test_instrument_context.py
After the PR is merged, these API calls will be tested on the robot.
Changelog
Review requests
Accidentally merged #15555 too soon, this is a continuation of that PR.
Risk assessment
Low: Since all the work was done in newly created functions, the risk that it breaks existing code is minimal.
However, the new API calls still do need to be tested on a robot before they can be used in other parts of the system.