-
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
fix(api): allow volume 0 commands in engine #14211
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## chore_release-7.1.0 #14211 +/- ##
=======================================================
- Coverage 70.42% 70.35% -0.07%
=======================================================
Files 2512 1636 -876
Lines 71296 54547 -16749
Branches 9006 4050 -4956
=======================================================
- Hits 50212 38379 -11833
+ Misses 18879 15469 -3410
+ Partials 2205 699 -1506
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Tested with this protocol. Works as expected. Thank you!
requirements = {"apiLevel": "2.16", "robotType": "Flex"}
def run(protocol):
tip_rack = protocol.load_labware("opentrons_flex_96_tiprack_1000ul", "D1")
well_plate_1 = protocol.load_labware(
"opentrons_96_wellplate_200ul_pcr_full_skirt", "D2"
)
well_plate_2 = protocol.load_labware(
"opentrons_96_wellplate_200ul_pcr_full_skirt", "C2"
)
pipette = protocol.load_instrument(
"flex_1channel_1000", "left", tip_racks=[tip_rack]
)
pipette.pick_up_tip()
protocol.comment(str(well_plate_1.wells()))
for source, dest in zip(well_plate_1.wells(), well_plate_2.wells()):
pipette.aspirate(0, source)
pipette.dispense(0, dest)
pipette.return_tip()
A previous PR (12a630b / #13989 ) changed the python protocol api in version 2.16 to allow commanding 0ul liquid handling commands like aspirate, mix, and dispense. This is useful in programmatic protocols that read out volumes to handle; they can now handle 0 volume properly. In 2.15 and previous, specifying 0 would lead to those commands doing the most volume they could (i.e. aspirate the full tip volume, dispense whatever's currently in the pipette, mix at full volume) and this likely was an unintentional side effect because of python truthiness. However, that change only touched the python protocol API; that API would emit commands to the engine that specified 0 volume, and those were not allowed: the pydantic models for the commands and responses required strictly greater than 0 volume. This PR - changes the pydantic models and updates the schema to allow 0ul commands - adds a python protocol to be an integration test - adds unit tests for the python protocol api aspirate and dispense commands --------- Co-authored-by: Seth Foster <[email protected]> Co-authored-by: Max Marrone <[email protected]>
A previous PR (12a630b / #13989 ) changed the python protocol api in version 2.16 to allow commanding 0ul liquid handling commands like aspirate, mix, and dispense. This is useful in programmatic protocols that read out volumes to handle; they can now handle 0 volume properly. In 2.15 and previous, specifying 0 would lead to those commands doing the most volume they could (i.e. aspirate the full tip volume, dispense whatever's currently in the pipette, mix at full volume) and this likely was an unintentional side effect because of python truthiness.
However, that change only touched the python protocol API; that API would emit commands to the engine that specified 0 volume, and those were not allowed: the pydantic models for the commands and responses required strictly greater than 0 volume.
This PR