Skip to content
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): nicknames now properly import #14521

Merged
merged 2 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2526,7 +2526,7 @@
"key": "d497b90e-2eaa-40ae-92ed-aa688f2b0eb5",
"commandType": "loadLabware",
"params": {
"displayName": "Opentrons OT-2 96 Tip Rack 300 µL",
"displayName": "Opentrons 96 Tip Rack 300 µL",
"labwareId": "0b44c760-75c7-11ea-b42f-4b64e50f43e5:opentrons/opentrons_96_tiprack_300ul/1",
"loadName": "opentrons_96_tiprack_300ul",
"namespace": "opentrons",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2573,7 +2573,7 @@
"key": "4d3bfc65-5b48-4891-93ba-c2daea854dff",
"commandType": "loadLabware",
"params": {
"displayName": "Opentrons OT-2 96 Tip Rack 300 µL",
"displayName": "Opentrons 96 Tip Rack 300 µL",
"labwareId": "0b44c760-75c7-11ea-b42f-4b64e50f43e5:opentrons/opentrons_96_tiprack_300ul/1",
"loadName": "opentrons_96_tiprack_300ul",
"namespace": "opentrons",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3351,7 +3351,7 @@
"key": "823bb056-dd22-40aa-9c97-89a2e67fcb82",
"commandType": "loadLabware",
"params": {
"displayName": "Opentrons OT-2 96 Tip Rack 10 µL",
"displayName": "tiprack 10ul (1)",
"labwareId": "c6f4ec70-92a5-11e9-ac62-1b173f839d9e:tiprack-10ul",
"loadName": "opentrons_96_tiprack_10ul",
"namespace": "opentrons",
Expand All @@ -3363,7 +3363,7 @@
"key": "8a771523-8f41-4228-9f62-852de34df87e",
"commandType": "loadLabware",
"params": {
"displayName": "(Retired) TipOne 96 Tip Rack 200 µL",
"displayName": "tiprack 200ul (1)",
"labwareId": "c6f51380-92a5-11e9-ac62-1b173f839d9e:tiprack-200ul",
"loadName": "tipone_96_tiprack_200ul",
"namespace": "opentrons",
Expand All @@ -3375,7 +3375,7 @@
"key": "a545c357-1414-4500-b01b-16bc8dc87fbb",
"commandType": "loadLabware",
"params": {
"displayName": "USA Scientific 96 Deep Well Plate 2.4 mL",
"displayName": "96 deep well (1)",
"labwareId": "dafd4000-92a5-11e9-ac62-1b173f839d9e:96-deep-well",
"loadName": "usascientific_96_wellplate_2.4ml_deep",
"namespace": "opentrons",
Expand Down
9 changes: 7 additions & 2 deletions protocol-designer/src/labware-ingred/reducers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,15 @@

return loadLabwareCommands.reduce(
(acc: ContainersState, command, key): ContainersState => {
const { loadName, displayName } = command.params
const { labwareId, displayName } = command.params

Check warning on line 170 in protocol-designer/src/labware-ingred/reducers/index.ts

View check run for this annotation

Codecov / codecov/patch

protocol-designer/src/labware-ingred/reducers/index.ts#L170

Added line #L170 was not covered by tests

if (labwareId == null) {
console.error('expected to find a labwareId but could not')

Check warning on line 173 in protocol-designer/src/labware-ingred/reducers/index.ts

View check run for this annotation

Codecov / codecov/patch

protocol-designer/src/labware-ingred/reducers/index.ts#L173

Added line #L173 was not covered by tests
}

return {
...acc,
[loadName]: {
[labwareId ?? '']: {
nickname: displayName,
disambiguationNumber: key,
},
Expand Down
Loading