-
Notifications
You must be signed in to change notification settings - Fork 178
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 prepare to aspirate to PAPI and engine #13827
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## edge #13827 +/- ##
=======================================
Coverage 70.86% 70.86%
=======================================
Files 2501 2501
Lines 70340 70340
Branches 8600 8600
=======================================
Hits 49845 49845
Misses 18399 18399
Partials 2096 2096
Flags with carried forward coverage won't be shown. Click here to find out more.
|
A terminology question while this is still in progress…
tl;dr: Is it more natural to name this function |
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.
Yay, love it!
This PR does the sort of minimum-viable change of adding the command, adding the API, and making the API call the command. It does not touch any of the built in make-sure-we're-ready behaviors in either the PAPI implementation or the protocol engine. Should it? Should we make the engine emit a second command here? I don't think so - I think that's a better thing for a hypothetical resolver layer to do - but I'm interested to hear if you disagree
I think you're right not to touch the built-in make-sure-we're-ready behaviors in PAPI or Protocol Engine. That sounds like a breaking behavioral change in Protocol Engine, especially.
I think ideally, for composability and ease of reasoning, these always would have been two separate Protocol Engine commands, and the aspirate
Protocol Engine command never would have prepared implicitly. But we're committed to that interface now. 🤷♂️
Did I mess something up about the new api level? It's been a while
This looks right to me.
behavior is correct after a653ad1 |
Called |
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.
Changes since last review look great, thanks. One optional docstring suggestion.
1a28dc2
to
5aa9f99
Compare
Having this explicitly will let users do more interesting things with configure_for_volume.
Add the ability to explicitly call prepare_for_aspirate() to the python protocol API. We make sure the pipette is prepared to aspirate before any aspiration, which is good, but the way we make this absolute is that if the pipette isn't ready for aspirate when you call aspirate(), we move it to the top of the current well (if necessary) to move the plunger up. This is a problem for users who are, for instance, building explicit prewetting behavior out of protocol API calls. It's common to move the pipette into the liquid and then delay to let the liquid settle before pipetting; if the pipette then moves up to prepare for aspirate before coming back down, that settling is undone. By adding the ability to explicitly prepare_for_aspirate(), the user can call it while they know the pipette is above the well.
The phrasing makes a lot more sense in context, so change the protocol api name and the protocol engine command name to PrepareToAspirate/prepare_to_aspirate rather than for. Do _not_ change the hardware controller name because other stuff depends on that and I personally like it more, and correspondingly do _not_ change the engine pipetting handler name because that should correspond with the hardware interface.
Co-authored-by: Max Marrone <[email protected]>
This reverts commit 2203264.
13c7b1b
to
a9bb0f3
Compare
Add the ability to explicitly call prepare_for_aspirate() to the python protocol API.
We make sure the pipette is prepared to aspirate before any aspiration, which is good, but the way we make this absolute is that if the pipette isn't ready for aspirate when you call aspirate(), we move it to the top of the current well (if necessary) to move the plunger up. This is a problem for users who are, for instance, building explicit prewetting behavior out of protocol API calls. It's common to move the pipette into the liquid and then delay to let the liquid settle before pipetting; if the pipette then moves up to prepare for aspirate before coming back down, that settling is undone. By adding the ability to explicitly prepare_for_aspirate(), the user can call it while they know the pipette is above the well.
This is added in a new 2.16 API level, which will ship in 7.1.
The command needs to be added to the API, but also to the engine (the
aspirate
command was, and is, the place where the fallback occurred rather than being a separately-issued command) and the sync client.Review requests
Testing