-
Notifications
You must be signed in to change notification settings - Fork 180
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
refactor(protocol-designer): change tiprack default slot and copy upd… #14028
Conversation
const ot2Slots = index === 0 ? '2' : '5' | ||
const flexSlots = index === 0 ? 'C2' : 'B2' |
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.
any suggestions for a more elegant way to accomplish this? It works but idk if it could be cleaner.
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.
Off the top of my head, I can't think of anything clearer than this.
The only thing slightly confusing IMO is variable assignment above the dispatch and then property assignment within the dispatch. Maybe something like this? Again, just my opinion - this is definitely nit territory.
const ot2Slots = index === 0 ? '2' : '5'
const flexSlots = index === 0 ? 'C2' : 'B2'
const slot =
values.fields.robotType === FLEX_ROBOT_TYPE ? flexSlots : ot2Slots
const adapterUnderLabwareDefURI =
values.pipettesByMount.left.pipetteName === 'p1000_96'
? adapter96ChannelDefUri
: undefined
dispatch(
labwareIngredActions.createContainer({
slot,
labwareDefURI: tiprackDefURI,
adapterUnderLabwareDefURI,
})
)`
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.
I think L267-268 is clear enough.
I think Jamey's suggestion makes the code more readable and easier to debug.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## edge #14028 +/- ##
=======================================
Coverage 70.66% 70.66%
=======================================
Files 1628 1628
Lines 54273 54276 +3
Branches 3872 3875 +3
=======================================
+ Hits 38351 38354 +3
Misses 15247 15247
Partials 675 675
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.
🚀
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.
The changes look good to me.
…ates
closes RAUT-875
Overview
This PR does a few things as discussed in a slack thread. They are all quality of life improvements from Anurag:
Test Plan
Create a Flex protocol and notice that the pipette type tiles include which mount you are selecting a pipetting for. Make sure you add a pipette to both mounts. Once you've created the protocol, navigate to the design tab and see that the tipracks are generated in slots B2 and C2. Move one of the tipracks into slot A2. Then add a magnetic block from the file tab and see that the error says that the slot is occupied.
Now create a new protocol for the OT-2. Add both pipettes. Go to the design tab and see that the tipracks are generated in slots 2 and 5.
Changelog
Review requests
see test plan
Risk assessment
low