-
Notifications
You must be signed in to change notification settings - Fork 183
feature(app, shared-data): module setup deck config assignment #18864
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?
feature(app, shared-data): module setup deck config assignment #18864
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## edge #18864 +/- ##
===========================================
- Coverage 62.81% 27.68% -35.13%
===========================================
Files 3250 3277 +27
Lines 257655 261768 +4113
Branches 32754 32750 -4
===========================================
- Hits 161835 72464 -89371
- Misses 95622 189286 +93664
+ Partials 198 18 -180
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Lookin good overall. Approving to unblock work. A few cleanup comments, the main ones some utility recommendations and some docstrings.
I haven't smoke tested this personally, but I think it would be a really good idea to spend the time doing so via VPN/on a robot if not done already!
console.log('deckConfig: ', deckConfig) | ||
console.log('editableCutoutIds: ', editableCutoutIds) |
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.
console.log('deckConfig: ', deckConfig) | |
console.log('editableCutoutIds: ', editableCutoutIds) |
> | ||
<Icon name="add-circle" color={COLORS.blue50} size="2rem" /> | ||
{!disableButton && ( | ||
<Icon name="add-circle" color={COLORS.blue50} size="2rem" /> |
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.
<Icon name="add-circle" color={COLORS.blue50} size="2rem" /> | |
<Icon name="add-circle" color={COLORS.blue50} size={SPACING.whatever} /> |
@@ -89,6 +95,8 @@ export function DeckConfigurator(props: DeckConfiguratorProps): JSX.Element { | |||
'fakeStagingSlot' | |||
) | |||
|
|||
console.log('fakeStagingItems: ', fakeStagingItems) |
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.
console.log('fakeStagingItems: ', fakeStagingItems) |
@@ -641,6 +659,17 @@ export const MODULE_FIXTURES_BY_MODEL: { | |||
[FLEX_STACKER_MODULE_V1]: [FLEX_STACKER_V1_FIXTURE], | |||
} | |||
|
|||
export const MODULE_AA_TYPE_BY_MODEL: { |
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.
Maybe FLEX_MODULE_... if this is just pertaining to flex modules?
fixtureId: CutoutFixtureIdsWithFakes, | ||
moduleModel: ModuleModel | ||
): AddressableAreaNamesWithFakes => { | ||
const deckDef = getDeckDefFromRobotType('OT-3 Standard') |
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 deckDef = getDeckDefFromRobotType('OT-3 Standard') | |
const deckDef = getDeckDefFromRobotType(FLEX_ROBOT_TYPE) |
fixtureId: CutoutFixtureId, | ||
moduleModel: ModuleModel, | ||
deckConfig: CutoutConfig[], | ||
serialNumber?: string |
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.
This serialNumber
is effectively a pass through prop that's adding no value except being redefined. Is there any way we can just not include this and have the callee create a new cutout config with opentronsModuleSerialNumber
?
@@ -1209,3 +1266,34 @@ export const isFixtureInUsbModules = (fixtureId: CutoutFixtureId): boolean => { | |||
) | |||
) | |||
} | |||
|
|||
export const getCutoutConfigReplacmentForModule = ( |
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 don't think this fn is called in any non-test code?
mayMountToCutoutIds.includes(cutoutId) && | ||
(isCurrentConfiguration || | ||
SINGLE_SLOT_FIXTURES.includes(cutoutFixtureId) || | ||
FAKE_FIXTURE_IDS.includes(cutoutFixtureId))) || |
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.
Sorry, I dont' have the context here. Why do we allow "fake" slot fixtures to be included in editable cutout ids? If this is definitely what we want, a comment on why we do this would be helpful. A comment on FAKE_FIXTURE_IDS
would be helpful, too.
return cc | ||
const updatedDeckConfig = deckConfig.map(cc => { | ||
if (cc.cutoutId in configuredFixtureIdByCutoutId) { | ||
let replacementFixtureId: CutoutFixtureId = SINGLE_LEFT_SLOT_FIXTURE |
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.
let replacementFixtureId: CutoutFixtureId = SINGLE_LEFT_SLOT_FIXTURE | |
const replacementFixtureId: CutoutFixtureId = SINGLE_LEFT_SLOT_FIXTURE |
No let bindings please. Let's spread in the whole object in each case.
} = props | ||
|
||
console.log('addressableAreaId: ', addressableAreaId) |
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.
console.log('addressableAreaId: ', addressableAreaId) |
Overview
closes https://opentrons.atlassian.net/browse/EXEC-1418.
implement module setup deck configuration.
Test Plan and Hands on Testing
(test both combo fixtures and simple modules)
Changelog
SelectLocation
will now check for aa matches with combo fixtures.calculate logic for placing and removing module from deck.
added tests.
Review requests
changes make sense?
Risk assessment
Medium. changes the logic for placing a module on the deck in module setup. need to smoke test.