@opentrons/shared-data 0.0.1-alpha.20 → 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/Makefile +1 -1
  2. package/lib/opentrons-shared-data.js +1 -1
  3. package/lib/opentrons-shared-data.js.map +1 -1
  4. package/package.json +1 -1
  5. package/js/__tests__/__snapshots__/pipettes.test.ts.snap +0 -5969
  6. package/js/__tests__/deckSchemas.test.ts +0 -87
  7. package/js/__tests__/errors.test.js +0 -21
  8. package/js/__tests__/getAreSlotsAdjacent.test.ts +0 -128
  9. package/js/__tests__/getWellNamePerMultiTip.test.ts +0 -162
  10. package/js/__tests__/labwareDefQuirks.test.ts +0 -37
  11. package/js/__tests__/labwareDefSchemaV1.test.ts +0 -82
  12. package/js/__tests__/labwareDefSchemaV2.test.ts +0 -298
  13. package/js/__tests__/moduleAccessors.test.ts +0 -50
  14. package/js/__tests__/moduleSpecsSchema.test.ts +0 -77
  15. package/js/__tests__/pipetteSchemaV2.test.ts +0 -107
  16. package/js/__tests__/pipetteSpecSchemas.test.ts +0 -48
  17. package/js/__tests__/pipettes.test.ts +0 -58
  18. package/js/__tests__/protocolSchemaV4.test.ts +0 -137
  19. package/js/__tests__/protocolSchemaV5.test.ts +0 -137
  20. package/js/__tests__/protocolSchemaV6.test.ts +0 -132
  21. package/js/__tests__/protocolSchemaV7.test.ts +0 -64
  22. package/js/__tests__/protocolValidation.test.ts +0 -83
  23. package/js/__tests__/sortWells.test.ts +0 -40
  24. package/js/__tests__/splitWellsOnColumn.test.ts +0 -21
  25. package/js/__tests__/validateErrors.test.js +0 -34
  26. package/js/constants.ts +0 -338
  27. package/js/cypressUtils.ts +0 -35
  28. package/js/errors.ts +0 -33
  29. package/js/fixtures.ts +0 -161
  30. package/js/getLabware.ts +0 -154
  31. package/js/gripper.ts +0 -29
  32. package/js/helpers/__tests__/getAdapterName.test.ts +0 -31
  33. package/js/helpers/__tests__/getDeckDefFromLoadedLabware.test.ts +0 -12
  34. package/js/helpers/__tests__/getVectorDifference.test.ts +0 -25
  35. package/js/helpers/__tests__/getVectorSum.test.ts +0 -21
  36. package/js/helpers/__tests__/labwareInference.test.ts +0 -84
  37. package/js/helpers/__tests__/orderWells.test.ts +0 -87
  38. package/js/helpers/__tests__/parseProtocolData.test.ts +0 -165
  39. package/js/helpers/__tests__/volume.test.ts +0 -108
  40. package/js/helpers/__tests__/wellSets.test.ts +0 -352
  41. package/js/helpers/get96Channel384WellPlateWells.ts +0 -44
  42. package/js/helpers/getAddressableAreasInProtocol.ts +0 -59
  43. package/js/helpers/getLoadedLabwareDefinitionsByUri.ts +0 -30
  44. package/js/helpers/getModuleVizDims.ts +0 -118
  45. package/js/helpers/getOccludedSlotCountForModule.ts +0 -13
  46. package/js/helpers/getVectorDifference.ts +0 -12
  47. package/js/helpers/getVectorSum.ts +0 -12
  48. package/js/helpers/getWellNamePerMultiTip.ts +0 -86
  49. package/js/helpers/getWellTotalVolume.ts +0 -16
  50. package/js/helpers/index.ts +0 -347
  51. package/js/helpers/labwareInference.ts +0 -92
  52. package/js/helpers/orderWells.ts +0 -69
  53. package/js/helpers/parseProtocolData.ts +0 -141
  54. package/js/helpers/volume.ts +0 -35
  55. package/js/helpers/wellIsRect.ts +0 -6
  56. package/js/helpers/wellSets.ts +0 -155
  57. package/js/index.ts +0 -14
  58. package/js/labwareTools/__tests__/__snapshots__/createIrregularLabware.test.ts.snap +0 -3
  59. package/js/labwareTools/__tests__/__snapshots__/createLabware.test.ts.snap +0 -3
  60. package/js/labwareTools/__tests__/createDefaultDisplayName.test.ts +0 -111
  61. package/js/labwareTools/__tests__/createIrregularLabware.test.ts +0 -226
  62. package/js/labwareTools/__tests__/createLabware.test.ts +0 -147
  63. package/js/labwareTools/index.ts +0 -452
  64. package/js/modules.ts +0 -97
  65. package/js/pipettes.ts +0 -89
  66. package/js/protocols.ts +0 -290
  67. package/js/schema.ts +0 -80
  68. package/js/scripts/generateDeckLayersFromSVG.js +0 -46
  69. package/js/titleCase.ts +0 -30
  70. package/js/types.ts +0 -600
  71. package/python/.coveragerc +0 -4
  72. package/python/.flake8 +0 -32
  73. package/python/Config.in +0 -10
  74. package/python/Makefile +0 -134
  75. package/python/Pipfile +0 -28
  76. package/python/Pipfile.lock +0 -645
  77. package/python/buildroot.mk +0 -30
  78. package/python/mypy.ini +0 -41
  79. package/python/opentrons_shared_data/__init__.py +0 -17
  80. package/python/opentrons_shared_data/_version.py +0 -20
  81. package/python/opentrons_shared_data/command/__init__.py +0 -52
  82. package/python/opentrons_shared_data/deck/__init__.py +0 -96
  83. package/python/opentrons_shared_data/deck/dev_types.py +0 -180
  84. package/python/opentrons_shared_data/errors/__init__.py +0 -30
  85. package/python/opentrons_shared_data/errors/categories.py +0 -60
  86. package/python/opentrons_shared_data/errors/codes.py +0 -108
  87. package/python/opentrons_shared_data/errors/exceptions.py +0 -915
  88. package/python/opentrons_shared_data/gripper/__init__.py +0 -63
  89. package/python/opentrons_shared_data/gripper/constants.py +0 -6
  90. package/python/opentrons_shared_data/gripper/gripper_definition.py +0 -101
  91. package/python/opentrons_shared_data/labware/__init__.py +0 -22
  92. package/python/opentrons_shared_data/labware/constants.py +0 -7
  93. package/python/opentrons_shared_data/labware/dev_types.py +0 -140
  94. package/python/opentrons_shared_data/labware/labware_definition.py +0 -328
  95. package/python/opentrons_shared_data/load.py +0 -57
  96. package/python/opentrons_shared_data/module/__init__.py +0 -74
  97. package/python/opentrons_shared_data/module/dev_types.py +0 -141
  98. package/python/opentrons_shared_data/pipette/__init__.py +0 -107
  99. package/python/opentrons_shared_data/pipette/dev_types.py +0 -177
  100. package/python/opentrons_shared_data/pipette/file_operation_helpers.py +0 -37
  101. package/python/opentrons_shared_data/pipette/load_data.py +0 -261
  102. package/python/opentrons_shared_data/pipette/model_constants.py +0 -123
  103. package/python/opentrons_shared_data/pipette/mutable_configurations.py +0 -431
  104. package/python/opentrons_shared_data/pipette/pipette_definition.py +0 -503
  105. package/python/opentrons_shared_data/pipette/pipette_load_name_conversions.py +0 -240
  106. package/python/opentrons_shared_data/pipette/scripts/__init__.py +0 -0
  107. package/python/opentrons_shared_data/pipette/scripts/build_json_script.py +0 -469
  108. package/python/opentrons_shared_data/pipette/scripts/update_configuration_files.py +0 -450
  109. package/python/opentrons_shared_data/pipette/types.py +0 -193
  110. package/python/opentrons_shared_data/protocol/__init__.py +0 -13
  111. package/python/opentrons_shared_data/protocol/constants.py +0 -98
  112. package/python/opentrons_shared_data/protocol/dev_types.py +0 -436
  113. package/python/opentrons_shared_data/protocol/models/__init__.py +0 -48
  114. package/python/opentrons_shared_data/protocol/models/protocol_schema_v6.py +0 -145
  115. package/python/opentrons_shared_data/protocol/models/protocol_schema_v7.py +0 -95
  116. package/python/opentrons_shared_data/protocol/models/protocol_schema_v8.py +0 -110
  117. package/python/opentrons_shared_data/protocol/models/shared_models.py +0 -111
  118. package/python/opentrons_shared_data/py.typed +0 -0
  119. package/python/opentrons_shared_data/robot/__init__.py +0 -33
  120. package/python/opentrons_shared_data/robot/dev_types.py +0 -37
  121. package/python/pytest.ini +0 -2
  122. package/python/setup.cfg +0 -5
  123. package/python/setup.py +0 -179
  124. package/python/tests/__init__.py +0 -1
  125. package/python/tests/conftest.py +0 -0
  126. package/python/tests/deck/__init__.py +0 -0
  127. package/python/tests/deck/test_list_names.py +0 -12
  128. package/python/tests/deck/test_position.py +0 -113
  129. package/python/tests/deck/test_typechecks.py +0 -28
  130. package/python/tests/errors/__init__.py +0 -1
  131. package/python/tests/errors/test_error_completeness.py +0 -19
  132. package/python/tests/errors/test_exceptions.py +0 -74
  133. package/python/tests/gripper/__init__.py +0 -0
  134. package/python/tests/gripper/test_definition.py +0 -30
  135. package/python/tests/gripper/test_load.py +0 -16
  136. package/python/tests/labware/__init__.py +0 -13
  137. package/python/tests/labware/test_typechecks.py +0 -21
  138. package/python/tests/module/__init__.py +0 -20
  139. package/python/tests/module/test_load.py +0 -49
  140. package/python/tests/module/test_typechecks.py +0 -34
  141. package/python/tests/pipette/__init__.py +0 -0
  142. package/python/tests/pipette/test_load_data.py +0 -103
  143. package/python/tests/pipette/test_mutable_configurations.py +0 -266
  144. package/python/tests/pipette/test_pipette_definition.py +0 -183
  145. package/python/tests/pipette/test_pipette_load_name_conversions.py +0 -222
  146. package/python/tests/pipette/test_typechecks.py +0 -50
  147. package/python/tests/pipette/test_validate_schema.py +0 -37
  148. package/python/tests/protocol/__init__.py +0 -15
  149. package/python/tests/protocol/test_protocol_schema_v6.py +0 -107
  150. package/python/tests/protocol/test_protocol_schema_v7.py +0 -34
  151. package/python/tests/protocol/test_protocol_schema_v8.py +0 -20
  152. package/python/tests/protocol/test_typechecks.py +0 -36
  153. package/python/tests/robot/__init__.py +0 -0
  154. package/python/tests/robot/test_typechecks.py +0 -20
package/js/constants.ts DELETED
@@ -1,338 +0,0 @@
1
- import type { CutoutFixtureId, CutoutId, AddressableAreaName } from '../deck'
2
- import type { ModuleType } from './types'
3
-
4
- // constants for dealing with robot coordinate system (eg in labwareTools)
5
- export const SLOT_LENGTH_MM = 127.76 // along X axis in robot coordinate system
6
-
7
- export const SLOT_WIDTH_MM = 85.48 // along Y axis in robot coordinate system
8
-
9
- // constants for SVG renders of the deck
10
- export const SLOT_RENDER_WIDTH = SLOT_LENGTH_MM // along X axis in SVG coords
11
-
12
- export const SLOT_RENDER_HEIGHT = SLOT_WIDTH_MM // along Y axis in SVG coords
13
-
14
- // taken from opentrons_1_trash_1100ml_fixed v1's dimensions
15
- export const FIXED_TRASH_RENDER_HEIGHT = 165.86 // along Y axis in SVG coords
16
-
17
- // used for module visualization, remove this when we start using actual module dimensions
18
- export const STD_SLOT_X_DIM = 128
19
- export const STD_SLOT_Y_DIM = 86
20
- export const STD_SLOT_DIVIDER_WIDTH = 4
21
-
22
- export const OPENTRONS_LABWARE_NAMESPACE = 'opentrons'
23
- export const FIXED_TRASH_ID = 'fixedTrash'
24
-
25
- // TODO: IL 2020-02-19 These 3 constants are DEPRECATED because they're ambiguous model vs type.
26
- export const THERMOCYCLER: 'thermocycler' = 'thermocycler'
27
- export const TEMPDECK: 'tempdeck' = 'tempdeck'
28
- export const MAGDECK: 'magdeck' = 'magdeck'
29
-
30
- // these are the Module Def Schema v2 equivalents of the above. They should match the names of JSON definitions
31
- // in shared-data/module/definitions/2.
32
- export const MAGNETIC_MODULE_V1: 'magneticModuleV1' = 'magneticModuleV1'
33
- export const MAGNETIC_MODULE_V2: 'magneticModuleV2' = 'magneticModuleV2'
34
- export const TEMPERATURE_MODULE_V1: 'temperatureModuleV1' =
35
- 'temperatureModuleV1'
36
- export const TEMPERATURE_MODULE_V2: 'temperatureModuleV2' =
37
- 'temperatureModuleV2'
38
- export const THERMOCYCLER_MODULE_V1: 'thermocyclerModuleV1' =
39
- 'thermocyclerModuleV1'
40
- export const THERMOCYCLER_MODULE_V2: 'thermocyclerModuleV2' =
41
- 'thermocyclerModuleV2'
42
- export const HEATERSHAKER_MODULE_V1: 'heaterShakerModuleV1' =
43
- 'heaterShakerModuleV1'
44
-
45
- export const MAGNETIC_BLOCK_V1: 'magneticBlockV1' = 'magneticBlockV1'
46
-
47
- export const GRIPPER_V1: 'gripperV1' = 'gripperV1'
48
- export const GRIPPER_V1_1: 'gripperV1.1' = 'gripperV1.1'
49
- export const GRIPPER_V1_2: 'gripperV1.2' = 'gripperV1.2'
50
- export const GRIPPER_MODELS = [GRIPPER_V1, GRIPPER_V1_1, GRIPPER_V1_2]
51
-
52
- // robot display name
53
- export const FLEX_DISPLAY_NAME: 'Opentrons Flex' = 'Opentrons Flex'
54
-
55
- // pipette display categories
56
- export const FLEX: 'FLEX' = 'FLEX'
57
- export const GEN2: 'GEN2' = 'GEN2'
58
- export const GEN1: 'GEN1' = 'GEN1'
59
-
60
- // pipette mounts
61
- export const LEFT: 'left' = 'left'
62
- export const RIGHT: 'right' = 'right'
63
- export const EXTENSION: 'extension' = 'extension'
64
-
65
- // fake slot that PD uses to represent the slot the thermocycler sits in
66
- export const SPAN7_8_10_11_SLOT: 'span7_8_10_11' = 'span7_8_10_11'
67
-
68
- // NOTE: these are NOT module MODELs, they are `moduleType`s. Should match ENUM in module definition file.
69
- export const TEMPERATURE_MODULE_TYPE: 'temperatureModuleType' =
70
- 'temperatureModuleType'
71
- export const MAGNETIC_MODULE_TYPE: 'magneticModuleType' = 'magneticModuleType'
72
- export const THERMOCYCLER_MODULE_TYPE: 'thermocyclerModuleType' =
73
- 'thermocyclerModuleType'
74
- export const HEATERSHAKER_MODULE_TYPE: 'heaterShakerModuleType' =
75
- 'heaterShakerModuleType'
76
- export const MAGNETIC_BLOCK_TYPE: 'magneticBlockType' = 'magneticBlockType'
77
-
78
- export const MAGNETIC_MODULE_MODELS = [MAGNETIC_MODULE_V1, MAGNETIC_MODULE_V2]
79
-
80
- export const NON_CONNECTING_MODULE_TYPES: ModuleType[] = [MAGNETIC_BLOCK_TYPE]
81
-
82
- export const TEMPERATURE_MODULE_MODELS = [
83
- TEMPERATURE_MODULE_V1,
84
- TEMPERATURE_MODULE_V2,
85
- ]
86
-
87
- export const THERMOCYCLER_MODULE_MODELS = [
88
- THERMOCYCLER_MODULE_V1,
89
- THERMOCYCLER_MODULE_V2,
90
- ]
91
-
92
- export const HEATERSHAKER_MODULE_MODELS = [HEATERSHAKER_MODULE_V1]
93
-
94
- export const MAGNETIC_BLOCK_MODELS = [MAGNETIC_BLOCK_V1]
95
-
96
- export const MODULE_MODELS = [
97
- ...MAGNETIC_MODULE_MODELS,
98
- ...TEMPERATURE_MODULE_MODELS,
99
- ...THERMOCYCLER_MODULE_MODELS,
100
- ...HEATERSHAKER_MODULE_MODELS,
101
- ...MAGNETIC_BLOCK_MODELS,
102
- ]
103
-
104
- export const MODULE_TYPES = [
105
- TEMPERATURE_MODULE_TYPE,
106
- MAGNETIC_MODULE_TYPE,
107
- THERMOCYCLER_MODULE_TYPE,
108
- HEATERSHAKER_MODULE_TYPE,
109
- MAGNETIC_BLOCK_TYPE,
110
- ]
111
-
112
- export const GEN_ONE_MULTI_PIPETTES = ['p10_multi', 'p50_multi', 'p300_multi']
113
-
114
- export const IDENTITY_VECTOR = { x: 0, y: 0, z: 0 }
115
-
116
- export const ROBOT_MODELS = ['OT-2 Standard', 'OT-3 Standard']
117
- export const OT2_ROBOT_TYPE = 'OT-2 Standard' as const
118
- export const FLEX_ROBOT_TYPE = 'OT-3 Standard' as const
119
-
120
- // TODO(jr, 7/13/23): rename this constant to FLEX_PIPETTES
121
- export const OT3_PIPETTES = [
122
- 'p300_single_flex',
123
- 'p1000_single_flex',
124
- 'p20_single_flex',
125
- 'p50_single_flex',
126
- 'p50_multi_flex',
127
- 'p1000_multi_flex',
128
- 'p1000_96',
129
- ]
130
- export const OT2_PIPETTES = [
131
- 'p300_single',
132
- 'p300_multi',
133
- 'p300_single_gen2',
134
- 'p300_multi_gen2',
135
- 'p1000_single',
136
- 'p1000_single_gen2',
137
- 'p20_single_gen2',
138
- 'p20_multi_gen2',
139
- 'p50_single',
140
- 'p50_multi',
141
- 'p10_single',
142
- 'p10_multi',
143
- ]
144
-
145
- // magnetic module info
146
- export const MM: 'mm' = 'mm'
147
- export const MAGNETIC_MODULES_MAX_ENGAGE_HEIGHT = 20
148
- export const MAGNETIC_MODULE_V2_DISNEGAGED_HEIGHT = -2.5 // TODO(jr, 6/14/22): change this to -4 when ticket #9585 merges
149
- export const MAGNETIC_MODULE_V1_DISNEGAGED_HEIGHT = -2.5
150
-
151
- export const MAGNETIC_MODULE_TYPE_LABWARE_BOTTOM_HEIGHT = 0
152
-
153
- export const CELSIUS: '°C' = '°C'
154
- export const TEMP_MIN = 4
155
- export const TEMP_MAX = 96
156
- export const TEMP_BLOCK_MAX = 99
157
- export const TEMP_LID_MIN = 37
158
- export const TEMP_LID_MAX = 110
159
- export const HS_TEMP_MIN = 37
160
- export const HS_TEMP_MAX = 95
161
- export const MICRO_LITERS = 'µL'
162
-
163
- // Heater shaker module info
164
- export const RPM: 'RPM' = 'RPM'
165
- export const HS_RPM_MIN = 200
166
- export const HS_RPM_MAX = 3000
167
- export const TOO_HOT_TEMP = 48.9
168
- export const MAX_LABWARE_HEIGHT_EAST_WEST_HEATER_SHAKER_MM = 53
169
-
170
- export const OT2_STANDARD_MODEL: 'OT-2 Standard' = 'OT-2 Standard'
171
- export const OT2_STANDARD_DECKID: 'ot2_standard' = 'ot2_standard'
172
- export const FLEX_STANDARD_MODEL: 'OT-3 Standard' = 'OT-3 Standard'
173
- export const FLEX_STANDARD_DECKID: 'ot3_standard' = 'ot3_standard'
174
-
175
- export const SINGLE_CHANNEL: 'Single-Channel' = 'Single-Channel'
176
- export const EIGHT_CHANNEL: '8-Channel' = '8-Channel'
177
- export const NINETY_SIX_CHANNEL: '96-Channel' = '96-Channel'
178
- export const SINGLE_MOUNT_PIPETTES: 'Single-Channel_and_8-Channel' =
179
- 'Single-Channel_and_8-Channel'
180
-
181
- // Thermocycler module info
182
- export const TC_MODULE_LOCATION_OT2: '7,8,10,11' = '7,8,10,11'
183
- export const TC_MODULE_LOCATION_OT3: 'A1+B1' = 'A1+B1'
184
-
185
- export const WEIGHT_OF_96_CHANNEL: '~10kg' = '~10kg'
186
-
187
- export const SINGLE_LEFT_CUTOUTS: CutoutId[] = [
188
- 'cutoutA1',
189
- 'cutoutB1',
190
- 'cutoutC1',
191
- 'cutoutD1',
192
- ]
193
-
194
- export const SINGLE_CENTER_CUTOUTS: CutoutId[] = [
195
- 'cutoutA2',
196
- 'cutoutB2',
197
- 'cutoutC2',
198
- 'cutoutD2',
199
- ]
200
-
201
- export const SINGLE_RIGHT_CUTOUTS: CutoutId[] = [
202
- 'cutoutA3',
203
- 'cutoutB3',
204
- 'cutoutC3',
205
- 'cutoutD3',
206
- ]
207
-
208
- export const STAGING_AREA_CUTOUTS: CutoutId[] = [
209
- 'cutoutA3',
210
- 'cutoutB3',
211
- 'cutoutC3',
212
- 'cutoutD3',
213
- ]
214
-
215
- export const WASTE_CHUTE_CUTOUT: 'cutoutD3' = 'cutoutD3'
216
-
217
- export const A1_ADDRESSABLE_AREA: 'A1' = 'A1'
218
- export const A2_ADDRESSABLE_AREA: 'A2' = 'A2'
219
- export const A3_ADDRESSABLE_AREA: 'A3' = 'A3'
220
- export const A4_ADDRESSABLE_AREA: 'A4' = 'A4'
221
- export const B1_ADDRESSABLE_AREA: 'B1' = 'B1'
222
- export const B2_ADDRESSABLE_AREA: 'B2' = 'B2'
223
- export const B3_ADDRESSABLE_AREA: 'B3' = 'B3'
224
- export const B4_ADDRESSABLE_AREA: 'B4' = 'B4'
225
- export const C1_ADDRESSABLE_AREA: 'C1' = 'C1'
226
- export const C2_ADDRESSABLE_AREA: 'C2' = 'C2'
227
- export const C3_ADDRESSABLE_AREA: 'C3' = 'C3'
228
- export const C4_ADDRESSABLE_AREA: 'C4' = 'C4'
229
- export const D1_ADDRESSABLE_AREA: 'D1' = 'D1'
230
- export const D2_ADDRESSABLE_AREA: 'D2' = 'D2'
231
- export const D3_ADDRESSABLE_AREA: 'D3' = 'D3'
232
- export const D4_ADDRESSABLE_AREA: 'D4' = 'D4'
233
-
234
- export const MOVABLE_TRASH_A1_ADDRESSABLE_AREA: 'movableTrashA1' =
235
- 'movableTrashA1'
236
- export const MOVABLE_TRASH_A3_ADDRESSABLE_AREA: 'movableTrashA3' =
237
- 'movableTrashA3'
238
- export const MOVABLE_TRASH_B1_ADDRESSABLE_AREA: 'movableTrashB1' =
239
- 'movableTrashB1'
240
- export const MOVABLE_TRASH_B3_ADDRESSABLE_AREA: 'movableTrashB3' =
241
- 'movableTrashB3'
242
- export const MOVABLE_TRASH_C1_ADDRESSABLE_AREA: 'movableTrashC1' =
243
- 'movableTrashC1'
244
- export const MOVABLE_TRASH_C3_ADDRESSABLE_AREA: 'movableTrashC3' =
245
- 'movableTrashC3'
246
- export const MOVABLE_TRASH_D1_ADDRESSABLE_AREA: 'movableTrashD1' =
247
- 'movableTrashD1'
248
- export const MOVABLE_TRASH_D3_ADDRESSABLE_AREA: 'movableTrashD3' =
249
- 'movableTrashD3'
250
-
251
- export const ONE_AND_EIGHT_CHANNEL_WASTE_CHUTE_ADDRESSABLE_AREA: '1and8ChannelWasteChute' =
252
- '1and8ChannelWasteChute'
253
- export const NINETY_SIX_CHANNEL_WASTE_CHUTE_ADDRESSABLE_AREA: '96ChannelWasteChute' =
254
- '96ChannelWasteChute'
255
- export const GRIPPER_WASTE_CHUTE_ADDRESSABLE_AREA: 'gripperWasteChute' =
256
- 'gripperWasteChute'
257
-
258
- export const FLEX_SINGLE_SLOT_ADDRESSABLE_AREAS: AddressableAreaName[] = [
259
- A1_ADDRESSABLE_AREA,
260
- A2_ADDRESSABLE_AREA,
261
- A3_ADDRESSABLE_AREA,
262
- B1_ADDRESSABLE_AREA,
263
- B2_ADDRESSABLE_AREA,
264
- B3_ADDRESSABLE_AREA,
265
- C1_ADDRESSABLE_AREA,
266
- C2_ADDRESSABLE_AREA,
267
- C3_ADDRESSABLE_AREA,
268
- D1_ADDRESSABLE_AREA,
269
- D2_ADDRESSABLE_AREA,
270
- D3_ADDRESSABLE_AREA,
271
- ]
272
-
273
- export const FLEX_STAGING_AREA_SLOT_ADDRESSABLE_AREAS: AddressableAreaName[] = [
274
- A4_ADDRESSABLE_AREA,
275
- B4_ADDRESSABLE_AREA,
276
- C4_ADDRESSABLE_AREA,
277
- D4_ADDRESSABLE_AREA,
278
- ]
279
-
280
- export const MOVABLE_TRASH_ADDRESSABLE_AREAS: AddressableAreaName[] = [
281
- MOVABLE_TRASH_A1_ADDRESSABLE_AREA,
282
- MOVABLE_TRASH_A3_ADDRESSABLE_AREA,
283
- MOVABLE_TRASH_B1_ADDRESSABLE_AREA,
284
- MOVABLE_TRASH_B3_ADDRESSABLE_AREA,
285
- MOVABLE_TRASH_C1_ADDRESSABLE_AREA,
286
- MOVABLE_TRASH_C3_ADDRESSABLE_AREA,
287
- MOVABLE_TRASH_D1_ADDRESSABLE_AREA,
288
- MOVABLE_TRASH_D3_ADDRESSABLE_AREA,
289
- ]
290
-
291
- export const WASTE_CHUTE_ADDRESSABLE_AREAS: AddressableAreaName[] = [
292
- ONE_AND_EIGHT_CHANNEL_WASTE_CHUTE_ADDRESSABLE_AREA,
293
- NINETY_SIX_CHANNEL_WASTE_CHUTE_ADDRESSABLE_AREA,
294
- GRIPPER_WASTE_CHUTE_ADDRESSABLE_AREA,
295
- ]
296
-
297
- export const SINGLE_LEFT_SLOT_FIXTURE: 'singleLeftSlot' = 'singleLeftSlot'
298
- export const SINGLE_CENTER_SLOT_FIXTURE: 'singleCenterSlot' = 'singleCenterSlot'
299
- export const SINGLE_RIGHT_SLOT_FIXTURE: 'singleRightSlot' = 'singleRightSlot'
300
-
301
- export const STAGING_AREA_RIGHT_SLOT_FIXTURE: 'stagingAreaRightSlot' =
302
- 'stagingAreaRightSlot'
303
-
304
- export const TRASH_BIN_ADAPTER_FIXTURE: 'trashBinAdapter' = 'trashBinAdapter'
305
-
306
- export const WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE: 'wasteChuteRightAdapterCovered' =
307
- 'wasteChuteRightAdapterCovered'
308
- export const WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE: 'wasteChuteRightAdapterNoCover' =
309
- 'wasteChuteRightAdapterNoCover'
310
- export const STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE: 'stagingAreaSlotWithWasteChuteRightAdapterCovered' =
311
- 'stagingAreaSlotWithWasteChuteRightAdapterCovered'
312
- export const STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE: 'stagingAreaSlotWithWasteChuteRightAdapterNoCover' =
313
- 'stagingAreaSlotWithWasteChuteRightAdapterNoCover'
314
-
315
- export const SINGLE_SLOT_FIXTURES: CutoutFixtureId[] = [
316
- SINGLE_LEFT_SLOT_FIXTURE,
317
- SINGLE_CENTER_SLOT_FIXTURE,
318
- SINGLE_RIGHT_SLOT_FIXTURE,
319
- ]
320
-
321
- export const WASTE_CHUTE_FIXTURES: CutoutFixtureId[] = [
322
- WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE,
323
- WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE,
324
- STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE,
325
- STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE,
326
- ]
327
-
328
- export const WASTE_CHUTE_ONLY_FIXTURES: CutoutFixtureId[] = [
329
- WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE,
330
- WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE,
331
- ]
332
-
333
- export const WASTE_CHUTE_STAGING_AREA_FIXTURES: CutoutFixtureId[] = [
334
- STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE,
335
- STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE,
336
- ]
337
-
338
- export const LOW_VOLUME_PIPETTES = ['p50_single_flex', 'p50_multi_flex']
@@ -1,35 +0,0 @@
1
- import isEqual from 'lodash/isEqual'
2
- import isObject from 'lodash/isObject'
3
- import transform from 'lodash/transform'
4
-
5
- const difference = (object: any, base: any): any => {
6
- const changes = (object: any, base: any): any => {
7
- return transform(object, function (result, value, key) {
8
- if (!isEqual(value, base[key])) {
9
- result[key] =
10
- isObject(value) && isObject(base[key])
11
- ? changes(value, base[key])
12
- : value
13
- }
14
- })
15
- }
16
-
17
- return changes(object, base)
18
- }
19
-
20
- // deepEqual won't always return a diff, Cypress doesn't fully support object diffs :(
21
- // also Cypress doesn't seem to support logging to the console? So throwing the diff as an error instead
22
- export const expectDeepEqual = (assert: any, a: any, b: any): void => {
23
- try {
24
- assert.deepEqual(a, b)
25
- } catch (e) {
26
- // visualize undefineds
27
- const replacer = (key: string, value: unknown): unknown =>
28
- typeof value === 'undefined' ? '__undefined__' : value
29
-
30
- throw Error(
31
- 'Expected deep equal. Diff is: ' +
32
- JSON.stringify(difference(a, b), replacer, 4)
33
- )
34
- }
35
- }
package/js/errors.ts DELETED
@@ -1,33 +0,0 @@
1
- import errorDefinitions from '../errors/definitions/1/errors.json'
2
-
3
- export type ErrorCodes = keyof typeof errorDefinitions.codes
4
- export type ErrorCategories = keyof typeof errorDefinitions.categories
5
-
6
- export interface ErrorCategory {
7
- detail: string
8
- codePrefix: string
9
- }
10
-
11
- export interface ErrorBody {
12
- detail: string
13
- category: ErrorCategory
14
- code: ErrorCodes
15
- }
16
-
17
- interface JSONErrorBody {
18
- detail: string
19
- category: ErrorCategories
20
- }
21
-
22
- export function getError(code: ErrorCodes): ErrorBody | null {
23
- return errorDefinitions.codes[code]
24
- ? {
25
- code: code,
26
- detail: errorDefinitions.codes[code].detail,
27
- category:
28
- errorDefinitions.categories[
29
- (errorDefinitions.codes[code] as JSONErrorBody).category
30
- ],
31
- }
32
- : null
33
- }
package/js/fixtures.ts DELETED
@@ -1,161 +0,0 @@
1
- import {
2
- FLEX_ROBOT_TYPE,
3
- STAGING_AREA_RIGHT_SLOT_FIXTURE,
4
- TRASH_BIN_ADAPTER_FIXTURE,
5
- WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE,
6
- WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE,
7
- STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE,
8
- STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE,
9
- } from './constants'
10
- import type { CutoutFixtureId } from '../deck'
11
- import type {
12
- AddressableArea,
13
- CoordinateTuple,
14
- Cutout,
15
- DeckDefinition,
16
- OT2Cutout,
17
- } from './types'
18
-
19
- export function getCutoutDisplayName(cutout: Cutout): string {
20
- return cutout.replace('cutout', '')
21
- }
22
-
23
- // mapping of OT-2 deck slots to cutouts
24
- export const OT2_CUTOUT_BY_SLOT_ID: { [slotId: string]: OT2Cutout } = {
25
- 1: 'cutout1',
26
- 2: 'cutout2',
27
- 3: 'cutout3',
28
- 4: 'cutout4',
29
- 5: 'cutout5',
30
- 6: 'cutout6',
31
- 7: 'cutout7',
32
- 8: 'cutout8',
33
- 9: 'cutout9',
34
- 10: 'cutout10',
35
- 11: 'cutout11',
36
- }
37
-
38
- // mapping of Flex deck slots to cutouts
39
- export const FLEX_CUTOUT_BY_SLOT_ID: { [slotId: string]: Cutout } = {
40
- A1: 'cutoutA1',
41
- A2: 'cutoutA2',
42
- A3: 'cutoutA3',
43
- A4: 'cutoutA3',
44
- B1: 'cutoutB1',
45
- B2: 'cutoutB2',
46
- B3: 'cutoutB3',
47
- B4: 'cutoutB3',
48
- C1: 'cutoutC1',
49
- C2: 'cutoutC2',
50
- C3: 'cutoutC3',
51
- C4: 'cutoutC3',
52
- D1: 'cutoutD1',
53
- D2: 'cutoutD2',
54
- D3: 'cutoutD3',
55
- D4: 'cutoutD3',
56
- }
57
-
58
- // returns the position associated with a slot id
59
- export function getPositionFromSlotId(
60
- slotId: string,
61
- deckDef: DeckDefinition
62
- ): CoordinateTuple | null {
63
- const cutoutWithSlot =
64
- deckDef.robot.model === FLEX_ROBOT_TYPE
65
- ? FLEX_CUTOUT_BY_SLOT_ID[slotId]
66
- : OT2_CUTOUT_BY_SLOT_ID[slotId]
67
-
68
- const cutoutPosition =
69
- deckDef.locations.cutouts.find(cutout => cutout.id === cutoutWithSlot)
70
- ?.position ?? null
71
-
72
- // adjust for offset from cutout
73
- const offsetFromCutoutFixture = getAddressableAreaFromSlotId(slotId, deckDef)
74
- ?.offsetFromCutoutFixture ?? [0, 0, 0]
75
-
76
- const slotPosition: CoordinateTuple | null =
77
- cutoutPosition != null
78
- ? [
79
- cutoutPosition[0] + offsetFromCutoutFixture[0],
80
- cutoutPosition[1] + offsetFromCutoutFixture[1],
81
- cutoutPosition[2] + offsetFromCutoutFixture[2],
82
- ]
83
- : null
84
-
85
- return slotPosition
86
- }
87
-
88
- export function getAddressableAreaFromSlotId(
89
- slotId: string,
90
- deckDef: DeckDefinition
91
- ): AddressableArea | null {
92
- return (
93
- deckDef.locations.addressableAreas.find(
94
- addressableArea => addressableArea.id === slotId
95
- ) ?? null
96
- )
97
- }
98
-
99
- export function getFixtureDisplayName(
100
- cutoutFixtureId: CutoutFixtureId | null
101
- ): string {
102
- if (cutoutFixtureId === STAGING_AREA_RIGHT_SLOT_FIXTURE) {
103
- return 'Staging area slot'
104
- } else if (cutoutFixtureId === TRASH_BIN_ADAPTER_FIXTURE) {
105
- return 'Trash bin'
106
- } else if (cutoutFixtureId === WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE) {
107
- return 'Waste chute only'
108
- } else if (cutoutFixtureId === WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE) {
109
- return 'Waste chute only with cover'
110
- } else if (
111
- cutoutFixtureId ===
112
- STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE
113
- ) {
114
- return 'Waste chute with staging area slot'
115
- } else if (
116
- cutoutFixtureId ===
117
- STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE
118
- ) {
119
- return 'Waste chute with staging area slot and cover'
120
- } else {
121
- return 'Slot'
122
- }
123
- }
124
-
125
- const STANDARD_OT2_SLOTS = [
126
- '1',
127
- '2',
128
- '3',
129
- '4',
130
- '5',
131
- '6',
132
- '7',
133
- '8',
134
- '9',
135
- '10',
136
- '11',
137
- ]
138
-
139
- const STANDARD_FLEX_SLOTS = [
140
- 'A1',
141
- 'A2',
142
- 'A3',
143
- 'B1',
144
- 'B2',
145
- 'B3',
146
- 'C1',
147
- 'C2',
148
- 'C3',
149
- 'D1',
150
- 'D2',
151
- 'D3',
152
- ]
153
-
154
- export const isAddressableAreaStandardSlot = (
155
- addressableAreaId: string,
156
- deckDef: DeckDefinition
157
- ): boolean =>
158
- (deckDef.robot.model === FLEX_ROBOT_TYPE
159
- ? STANDARD_FLEX_SLOTS
160
- : STANDARD_OT2_SLOTS
161
- ).includes(addressableAreaId)