-
Notifications
You must be signed in to change notification settings - Fork 180
feat(api): implement mix() parameters aspirate_delay
and dispense_delay
#18000
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
base: edge
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## edge #18000 +/- ##
=======================================
Coverage 24.44% 24.44%
=======================================
Files 2956 2956
Lines 228425 228425
Branches 19032 19032
=======================================
Hits 55843 55843
Misses 172570 172570
Partials 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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 is great, getting closer to always emitting python mix()
when a mix step is added.
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.
Oh wow, thanks for testing it in the app! |
Overview
In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI
mix()
call, which means that we can't translate a PD Mix step into a PAPImix()
call.This PR introduces the parameters
aspirate_delay
anddispense_delay
to theInstrumentContext.mix()
function. The new parameters are gated to API version 2.24 and above. AUTH-1366Test Plan and Hands on Testing
I added tests to demonstrate that this implementation emits the correct calls to
delay()
when the caller requests a delay in themix()
.This is what the output looks like in
simulate
:Review requests
InstrumentContext.mix()
callsInstrumentContext.aspirate()
andInstrumentContext.dispense()
to implement the mix, which is nice because the publicaspirate()
anddispense()
functions handle things like publishing messages for the simulator.Ideally, we would also call the public
delay()
function for the delay. But thedelay()
function is inProtocolContext
, andInstrumentContext
doesn't have access to that. We only have access to theProtocolCore
, so we have to publish messages to the simulator manually.I ended up refactoring the code of
mix()
a bit because it was going to get too repetitive and nested with the delays andpublish_context()
messages added.Risk assessment
Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way.