-
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): Fully stringify well names #13764
fix(api): Fully stringify well names #13764
Conversation
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.
Curious about if performance is affected by the increased amount of engine client calls, but otherwise looks good outside of my couple suggestions below.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## chore_release-7.0.1 #13764 +/- ##
=======================================================
- Coverage 71.26% 71.25% -0.01%
=======================================================
Files 1588 1588
Lines 52761 52744 -17
Branches 3451 3451
=======================================================
- Hits 37602 37585 -17
Misses 14624 14624
Partials 535 535
Flags with carried forward coverage won't be shown. Click here to find out more. |
Hm, yeah. It seems like ideally, we would maybe only compute the parts of the run log that are actually required by the caller. For |
Waiting for #13709 to hit |
Co-authored-by: Jeremy Leon <[email protected]>
everybooody
545e52e
to
18bb36f
Compare
Co-authored-by: Jeremy Leon <[email protected]>
Overview
Fixes RSS-368.
Test Plan
Run some PAPIv≥2.14 protocols through
opentrons_simulate
and check the run log. You shouldn't see the stringNone
anywhere. The location strings should match PAPIv≤2.13.Here's a test case demonstrating how we print a well of a labware on an adapter on a module on a deck slot. It also demonstrates how we prefer to print the user-defined labware label, but if that doesn't exist, we fall back to the display name specified by the labware definition.
$ pipenv run opentrons_simulate ~/Desktop/complicated_locations.py /Users/maxmarrone/.opentrons/robot_settings.json not found. Loading defaults Belt calibration not found. Latching labware on Heater-Shaker Transferring 50.0 from A1 of Opentrons Tough 96 Well Plate 200 µL PCR Full Skirt on Opentrons 96 PCR Adapter on Heater-Shaker Module GEN1 on D1 to A1 of destination on A2 Picking up tip from A1 of Opentrons Flex 96 Tip Rack 50 µL on B1 Aspirating 50.0 uL from A1 of Opentrons Tough 96 Well Plate 200 µL PCR Full Skirt on Opentrons 96 PCR Adapter on Heater-Shaker Module GEN1 on D1 at 8.0 uL/sec Dispensing 50.0 uL into A1 of destination on A2 at 8.0 uL/sec Dropping tip into A1 of Opentrons Fixed Trash on A3
Details
This fixes two problems with how PAPIv≥2.14 was stringifying well names when they were printed to the
opentrons_simulate
run log:label
. That's it. If the user didn't specify a labware label, we were printingNone
, without making an attempt to fall back to the display name specified by the labware definition.We fix both of these by adding a helper function to
opentrons.protocol_api.core.engine
that queries theProtocolEngine
for full location information and builds a human-readable string out of it. It works recursively, so it supports deep locations like "well A1 of labware Foo on adapter Bar on module Baz on C2."This brings PAPIv≥2.14's user-facing behavior in line with that of PAPIv≤2.13.
For comparison, PAPIv≤2.13 accomplished this through a combination of this helper function, and computing the human-readable strings eagerly as
Well
objects were constructed. That approach isn't sufficient for us anymore because labware can move around throughout the protocol.Review requests
Any other stringifications that need to be fixed?
Risk assessment
Low.