-
Notifications
You must be signed in to change notification settings - Fork 190
fix(protocol-designer): fix FlowRateField max flow rate
#18165
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
Conversation
Previously, the range displayed in `FlowRateField` was pulled directly from the pipette liquid definition. This value was specific only to the pipette + tip combination. In reality, this max flow rate is a function of the target volume, and correction volume for that aspiration/dispense, as well as the pipette + tip accuracy function and max plunger speed. This PR mirrors the hardware controller's logic for determining the specific max allowable flow rate for the step. Closes AUTH-1727
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## edge #18165 +/- ##
==========================================
- Coverage 23.76% 23.22% -0.55%
==========================================
Files 3038 3038
Lines 253513 259921 +6408
Branches 23604 25665 +2061
==========================================
+ Hits 60252 60368 +116
- Misses 193246 199538 +6292
Partials 15 15
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| 96: MAX_PLUNGER_SPEED_FLEX_HIGH_THROUGHPUT_MM_PER_S, | ||
| } | ||
|
|
||
| const _getPipetteAccuracyUlPerMm = ( |
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.
nit: can you separate out these 2 utils into a utils file and then add tests for getMaxUiFlowRate?
protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/PipetteFields/FlowRateField.tsx
Outdated
Show resolved
Hide resolved
jerader
left a comment
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.
a bit hard to follow the logic but would be great if you can add some test cases with various examples
it is definitely not straightforward— I copied this logic straight from what Andy sent from HW controller. I also think adding tests would be helpful |
protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/__tests__/utils.test.ts
Outdated
Show resolved
Hide resolved
protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/__tests__/utils.test.ts
Outdated
Show resolved
Hide resolved
protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/__tests__/utils.test.ts
Outdated
Show resolved
Hide resolved
protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/__tests__/utils.test.ts
Outdated
Show resolved
Hide resolved
protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/__tests__/utils.test.ts
Outdated
Show resolved
Hide resolved
protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/__tests__/utils.test.ts
Outdated
Show resolved
Hide resolved
jerader
left a comment
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.
lgtm, thanks for creating the util and test to get more accurate max flow rates! left some clean up comments
Overview
Previously, the range displayed in
FlowRateFieldwas pulled directly from the pipette liquid definition. This value was specific only to the pipette + tip combination. In reality, this max flow rate is a function of the target volume, and correction volume for that aspiration/dispense, as well as the pipette + tip accuracy function and max plunger speed. This PR mirrors the hardware controller's logic for determining the specific max allowable flow rate for the step.Closes AUTH-1727
Test Plan and Hands on Testing
This is kind of difficult to test! I am following the logic as outlined by @andySigler in the hardware controller.
Please review code logic, and smoke test by trying out a variety of combinations of volumes + pipettes + tips + liquid classes in transfer and mix fields, and verify that the flow rate does not exceed the range on the flow rate field.
Changelog
FlowRateFieldfor determining max flow rate to show in UIFlowRateFieldinstancesReview requests
see test plan
Risk assessment
low. Strictly a UI update. Even if the volume is out of range, it is non-blocking for saving the step