-
Notifications
You must be signed in to change notification settings - Fork 187
feat(protocol-designer): the labware belongs on the hopper, so I put it there #20316
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 Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## edge #20316 +/- ##
===========================================
+ Coverage 25.83% 57.05% +31.21%
===========================================
Files 3627 3628 +1
Lines 302041 302357 +316
Branches 42320 42545 +225
===========================================
+ Hits 78020 172495 +94475
+ Misses 223992 129634 -94358
- Partials 29 228 +199
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| : TC_MODULE_LOCATION_OT2 | ||
| const modifiedLocation = | ||
|
|
||
| let modifiedLocation = location |
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 know that in the app we are trying to move away from using let
| const id = `${uuid()}:${labwareUri}` | ||
| const labwareDef = | ||
| labwareDefSelectors.getLabwareDefsByURI(state)[labwareUri] | ||
|
|
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.
| }, '') | ||
|
|
||
| const addEquipment = (slotId: string): void => { | ||
| const isOnHopper = slotId.includes('hopper') |
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.
can we rename slotId? its no longer a slot right?
|
|
||
| const addEquipment = (slotId: string): void => { | ||
| const isOnHopper = slotId.includes('hopper') | ||
| const slot = isOnHopper ? slotId.split('hopper')[1] : slotId |
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.
lets call it aa instead of slot
| rightBelowTopId: string | null | ||
| hopperTopMostId: string | null | ||
| } => { | ||
| // all stacks involving this module |
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.
| // all stacks involving this module | |
| // all stacks involving this module except hopper location |
| lw => | ||
| lw.stack.includes(moduleId) && lw.stack.includes(HOPPER_STACKER_LOCATION) | ||
| ) | ||
| const largestStackOnHopper = allStacksOnHopper.sort( |
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.
nice! do we need to do this bc every labware in the stack has a stack of its own?
|
|
||
| export const HOPPER_STACKER_LOCATION = 'hopper' | ||
|
|
||
| export const HOPPER_FAKE_LOCATIONS = [ |
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.
Nice!
| 'hopperD4', | ||
| ] | ||
|
|
||
| export const HOPPER_LOCATION_MAP = { |
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.
| export const HOPPER_LOCATION_MAP = { | |
| export const FAKE_HOPPER_LOCATION_MAP = { |
| latestDefs | ||
| ) | ||
| acc[updatedLabwareId] = location | ||
|
|
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.
TamarZanzouri
left a comment
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.
overall looks great! thank you for doing this! had a few comments
| const moduleOnSlot = Object.values(deckSetupModules).find( | ||
| module => module.slot === slot | ||
| module => | ||
| module.slot === slot || (slot.includes(module.slot) && isSlotAHopper) |
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.
What is the includes() for? What value does slot have such that you would need includes() to search for a substring?
|
Wait a second ... I thought we said that the shuttle was conceptually in A4...D4, not the hopper? Do you want the fake hopper location to be |
closes EXEC-1441 EXEC-1443
Overview
Hopper was tired of waiting.

With this PR, you can add labware to the hopper in PD! There is now a hoverable slot over the hopper location and you can add labware to it. The labware entity gets created with the location stack as: [labwareId, hopper, moduleId, slot]
Additionally, since the stacker covers 1 slot but visually is 2 slots, i had to fake the hopper slots. So i created this map:
the hopper locations are now referred to as those ^. there is a util i made to easily decipher if the slot is a hopper location or not using
getIsSlotAHopper()which takes in a slot arg.the
labwareLocationUpdatestructure is the same but to differentiate between a labwareon the hopper vs the shuttle, the shuttle labware locaiton simply shows the slot name and not the module id. So like thisthe biorad is on the shuttle and the other labware is on the hopper.
Some follow-ups that I will work on:
Test Plan and Hands on Testing
Add a stacker to the deck in the onboarding wizard (there is a bug if you add it after the fact that i need to document still in a ticket)
Then see that you can hover over the hopper and add labware.
also import an older version of PD made in prod and see that it imports without any issues since there is a migration
Changelog
add new fake hopper locations, plugging stuff into the PD deck map
Risk assessment
low