@opentrons/shared-data 0.0.0-alpha.14

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 (669) hide show
  1. package/Makefile +100 -0
  2. package/command/schemas/7.json +3301 -0
  3. package/command/schemas/8.json +3632 -0
  4. package/command/types/annotation.ts +37 -0
  5. package/command/types/calibration.ts +84 -0
  6. package/command/types/gantry.ts +176 -0
  7. package/command/types/incidental.ts +21 -0
  8. package/command/types/index.ts +77 -0
  9. package/command/types/module.ts +307 -0
  10. package/command/types/pipetting.ts +228 -0
  11. package/command/types/setup.ts +199 -0
  12. package/command/types/timing.ts +58 -0
  13. package/commandAnnotation/schemas/1.json +74 -0
  14. package/commandAnnotation/types/index.ts +19 -0
  15. package/deck/definitions/3/ot2_short_trash.json +477 -0
  16. package/deck/definitions/3/ot2_standard.json +477 -0
  17. package/deck/definitions/3/ot3_standard.json +989 -0
  18. package/deck/definitions/4/ot2_short_trash.json +403 -0
  19. package/deck/definitions/4/ot2_standard.json +403 -0
  20. package/deck/definitions/4/ot3_standard.json +597 -0
  21. package/deck/fixtures/3/deckExample.json +481 -0
  22. package/deck/index.ts +1 -0
  23. package/deck/schemas/1.json +240 -0
  24. package/deck/schemas/2.json +250 -0
  25. package/deck/schemas/3.json +297 -0
  26. package/deck/schemas/4.json +321 -0
  27. package/deck/types/schemaV4.ts +84 -0
  28. package/errors/definitions/1/errors.json +222 -0
  29. package/errors/schemas/1.json +50 -0
  30. package/gripper/definitions/1/gripperV1.1.json +28 -0
  31. package/gripper/definitions/1/gripperV1.2.json +28 -0
  32. package/gripper/definitions/1/gripperV1.json +27 -0
  33. package/gripper/schemas/1.json +181 -0
  34. package/js/__tests__/__snapshots__/pipettes.test.ts.snap +5969 -0
  35. package/js/__tests__/deckSchemas.test.ts +87 -0
  36. package/js/__tests__/errors.test.js +21 -0
  37. package/js/__tests__/getAreSlotsAdjacent.test.ts +128 -0
  38. package/js/__tests__/getWellNamePerMultiTip.test.ts +162 -0
  39. package/js/__tests__/labwareDefQuirks.test.ts +37 -0
  40. package/js/__tests__/labwareDefSchemaV1.test.ts +82 -0
  41. package/js/__tests__/labwareDefSchemaV2.test.ts +298 -0
  42. package/js/__tests__/moduleAccessors.test.ts +50 -0
  43. package/js/__tests__/moduleSpecsSchema.test.ts +77 -0
  44. package/js/__tests__/pipetteSchemaV2.test.ts +107 -0
  45. package/js/__tests__/pipetteSpecSchemas.test.ts +48 -0
  46. package/js/__tests__/pipettes.test.ts +58 -0
  47. package/js/__tests__/protocolSchemaV4.test.ts +137 -0
  48. package/js/__tests__/protocolSchemaV5.test.ts +137 -0
  49. package/js/__tests__/protocolSchemaV6.test.ts +132 -0
  50. package/js/__tests__/protocolSchemaV7.test.ts +64 -0
  51. package/js/__tests__/protocolValidation.test.ts +83 -0
  52. package/js/__tests__/sortWells.test.ts +40 -0
  53. package/js/__tests__/splitWellsOnColumn.test.ts +21 -0
  54. package/js/__tests__/validateErrors.test.js +34 -0
  55. package/js/constants.ts +336 -0
  56. package/js/cypressUtils.ts +35 -0
  57. package/js/errors.ts +33 -0
  58. package/js/fixtures.ts +161 -0
  59. package/js/getLabware.ts +162 -0
  60. package/js/gripper.ts +29 -0
  61. package/js/helpers/__tests__/getAdapterName.test.ts +31 -0
  62. package/js/helpers/__tests__/getDeckDefFromLoadedLabware.test.ts +12 -0
  63. package/js/helpers/__tests__/getVectorDifference.test.ts +25 -0
  64. package/js/helpers/__tests__/getVectorSum.test.ts +21 -0
  65. package/js/helpers/__tests__/labwareInference.test.ts +84 -0
  66. package/js/helpers/__tests__/orderWells.test.ts +87 -0
  67. package/js/helpers/__tests__/parseProtocolData.test.ts +165 -0
  68. package/js/helpers/__tests__/volume.test.ts +108 -0
  69. package/js/helpers/__tests__/wellSets.test.ts +352 -0
  70. package/js/helpers/get96Channel384WellPlateWells.ts +44 -0
  71. package/js/helpers/getLoadedLabwareDefinitionsByUri.ts +30 -0
  72. package/js/helpers/getModuleVizDims.ts +118 -0
  73. package/js/helpers/getOccludedSlotCountForModule.ts +13 -0
  74. package/js/helpers/getVectorDifference.ts +12 -0
  75. package/js/helpers/getVectorSum.ts +12 -0
  76. package/js/helpers/getWellNamePerMultiTip.ts +86 -0
  77. package/js/helpers/getWellTotalVolume.ts +16 -0
  78. package/js/helpers/index.ts +346 -0
  79. package/js/helpers/labwareInference.ts +92 -0
  80. package/js/helpers/orderWells.ts +69 -0
  81. package/js/helpers/parseProtocolData.ts +141 -0
  82. package/js/helpers/volume.ts +35 -0
  83. package/js/helpers/wellIsRect.ts +6 -0
  84. package/js/helpers/wellSets.ts +150 -0
  85. package/js/index.ts +14 -0
  86. package/js/labwareTools/__tests__/__snapshots__/createIrregularLabware.test.ts.snap +3 -0
  87. package/js/labwareTools/__tests__/__snapshots__/createLabware.test.ts.snap +3 -0
  88. package/js/labwareTools/__tests__/createDefaultDisplayName.test.ts +111 -0
  89. package/js/labwareTools/__tests__/createIrregularLabware.test.ts +226 -0
  90. package/js/labwareTools/__tests__/createLabware.test.ts +147 -0
  91. package/js/labwareTools/index.ts +452 -0
  92. package/js/modules.ts +97 -0
  93. package/js/pipettes.ts +89 -0
  94. package/js/protocols.ts +290 -0
  95. package/js/schema.ts +80 -0
  96. package/js/scripts/build.js +32 -0
  97. package/js/scripts/generateDeckLayersFromSVG.js +46 -0
  98. package/js/titleCase.ts +30 -0
  99. package/js/types.ts +600 -0
  100. package/labware/definitions/1/12-well-plate.json +147 -0
  101. package/labware/definitions/1/24-vial-rack.json +281 -0
  102. package/labware/definitions/1/24-well-plate.json +281 -0
  103. package/labware/definitions/1/384-plate.json +4667 -0
  104. package/labware/definitions/1/48-vial-plate.json +547 -0
  105. package/labware/definitions/1/48-well-plate.json +547 -0
  106. package/labware/definitions/1/5ml-3x4.json +147 -0
  107. package/labware/definitions/1/6-well-plate.json +80 -0
  108. package/labware/definitions/1/96-PCR-flat.json +1079 -0
  109. package/labware/definitions/1/96-PCR-tall.json +1079 -0
  110. package/labware/definitions/1/96-deep-well.json +1079 -0
  111. package/labware/definitions/1/96-flat.json +1079 -0
  112. package/labware/definitions/1/96-well-plate-20mm.json +1079 -0
  113. package/labware/definitions/1/MALDI-plate.json +4282 -0
  114. package/labware/definitions/1/PCR-strip-tall.json +1079 -0
  115. package/labware/definitions/1/T25-flask.json +20 -0
  116. package/labware/definitions/1/T75-flask.json +20 -0
  117. package/labware/definitions/1/alum-block-pcr-strips.json +188 -0
  118. package/labware/definitions/1/biorad-hardshell-96-PCR.json +1079 -0
  119. package/labware/definitions/1/e-gelgol.json +1078 -0
  120. package/labware/definitions/1/fixed-trash.json +19 -0
  121. package/labware/definitions/1/hampton-1ml-deep-block.json +1078 -0
  122. package/labware/definitions/1/opentrons-aluminum-block-2ml-eppendorf.json +281 -0
  123. package/labware/definitions/1/opentrons-aluminum-block-2ml-screwcap.json +281 -0
  124. package/labware/definitions/1/opentrons-aluminum-block-96-PCR-plate.json +1079 -0
  125. package/labware/definitions/1/opentrons-aluminum-block-PCR-strips-200ul.json +1079 -0
  126. package/labware/definitions/1/opentrons-tiprack-10ul.json +986 -0
  127. package/labware/definitions/1/opentrons-tiprack-300ul.json +986 -0
  128. package/labware/definitions/1/opentrons-tuberack-1.5ml-eppendorf.json +281 -0
  129. package/labware/definitions/1/opentrons-tuberack-15_50ml.json +125 -0
  130. package/labware/definitions/1/opentrons-tuberack-15ml.json +181 -0
  131. package/labware/definitions/1/opentrons-tuberack-2ml-eppendorf.json +281 -0
  132. package/labware/definitions/1/opentrons-tuberack-2ml-screwcap.json +281 -0
  133. package/labware/definitions/1/opentrons-tuberack-50ml.json +80 -0
  134. package/labware/definitions/1/point.json +18 -0
  135. package/labware/definitions/1/rigaku-compact-crystallization-plate.json +2146 -0
  136. package/labware/definitions/1/small_vial_rack_16x45.json +280 -0
  137. package/labware/definitions/1/tall-fixed-trash.json +19 -0
  138. package/labware/definitions/1/tiprack-1000ul-H.json +503 -0
  139. package/labware/definitions/1/tiprack-1000ul-chem.json +1034 -0
  140. package/labware/definitions/1/tiprack-1000ul.json +986 -0
  141. package/labware/definitions/1/tiprack-10ul-H.json +503 -0
  142. package/labware/definitions/1/tiprack-10ul.json +986 -0
  143. package/labware/definitions/1/tiprack-200ul.json +986 -0
  144. package/labware/definitions/1/trash-box.json +20 -0
  145. package/labware/definitions/1/trough-12row-short.json +143 -0
  146. package/labware/definitions/1/trough-12row.json +143 -0
  147. package/labware/definitions/1/trough-1row-25ml.json +21 -0
  148. package/labware/definitions/1/tube-rack-.75ml.json +281 -0
  149. package/labware/definitions/1/tube-rack-15_50ml.json +125 -0
  150. package/labware/definitions/1/tube-rack-2ml-9x9.json +911 -0
  151. package/labware/definitions/1/tube-rack-2ml.json +281 -0
  152. package/labware/definitions/1/tube-rack-5ml-96.json +1079 -0
  153. package/labware/definitions/1/tube-rack-80well.json +907 -0
  154. package/labware/definitions/1/wheaton_vial_rack.json +565 -0
  155. package/labware/definitions/2/agilent_1_reservoir_290ml/1.json +54 -0
  156. package/labware/definitions/2/appliedbiosystemsmicroamp_384_wellplate_40ul/1.json +4320 -0
  157. package/labware/definitions/2/armadillo_96_wellplate_200ul_pcr_full_skirt/1.json +1019 -0
  158. package/labware/definitions/2/armadillo_96_wellplate_200ul_pcr_full_skirt/2.json +1045 -0
  159. package/labware/definitions/2/axygen_1_reservoir_90ml/1.json +56 -0
  160. package/labware/definitions/2/biorad_384_wellplate_50ul/1.json +4329 -0
  161. package/labware/definitions/2/biorad_384_wellplate_50ul/2.json +4331 -0
  162. package/labware/definitions/2/biorad_96_wellplate_200ul_pcr/1.json +1020 -0
  163. package/labware/definitions/2/biorad_96_wellplate_200ul_pcr/2.json +1036 -0
  164. package/labware/definitions/2/corning_12_wellplate_6.9ml_flat/1.json +171 -0
  165. package/labware/definitions/2/corning_12_wellplate_6.9ml_flat/2.json +180 -0
  166. package/labware/definitions/2/corning_24_wellplate_3.4ml_flat/1.json +293 -0
  167. package/labware/definitions/2/corning_24_wellplate_3.4ml_flat/2.json +300 -0
  168. package/labware/definitions/2/corning_384_wellplate_112ul_flat/1.json +4703 -0
  169. package/labware/definitions/2/corning_384_wellplate_112ul_flat/2.json +4717 -0
  170. package/labware/definitions/2/corning_48_wellplate_1.6ml_flat/1.json +535 -0
  171. package/labware/definitions/2/corning_48_wellplate_1.6ml_flat/2.json +544 -0
  172. package/labware/definitions/2/corning_6_wellplate_16.8ml_flat/1.json +103 -0
  173. package/labware/definitions/2/corning_6_wellplate_16.8ml_flat/2.json +110 -0
  174. package/labware/definitions/2/corning_96_wellplate_360ul_flat/1.json +1049 -0
  175. package/labware/definitions/2/corning_96_wellplate_360ul_flat/2.json +1063 -0
  176. package/labware/definitions/2/eppendorf_96_tiprack_1000ul_eptips/1.json +1019 -0
  177. package/labware/definitions/2/eppendorf_96_tiprack_10ul_eptips/1.json +1019 -0
  178. package/labware/definitions/2/geb_96_tiprack_1000ul/1.json +1017 -0
  179. package/labware/definitions/2/geb_96_tiprack_10ul/1.json +1017 -0
  180. package/labware/definitions/2/nest_12_reservoir_15ml/1.json +190 -0
  181. package/labware/definitions/2/nest_1_reservoir_195ml/1.json +54 -0
  182. package/labware/definitions/2/nest_1_reservoir_195ml/2.json +56 -0
  183. package/labware/definitions/2/nest_1_reservoir_290ml/1.json +54 -0
  184. package/labware/definitions/2/nest_96_wellplate_100ul_pcr_full_skirt/1.json +1018 -0
  185. package/labware/definitions/2/nest_96_wellplate_100ul_pcr_full_skirt/2.json +1039 -0
  186. package/labware/definitions/2/nest_96_wellplate_200ul_flat/1.json +1017 -0
  187. package/labware/definitions/2/nest_96_wellplate_200ul_flat/2.json +1031 -0
  188. package/labware/definitions/2/nest_96_wellplate_2ml_deep/1.json +1121 -0
  189. package/labware/definitions/2/nest_96_wellplate_2ml_deep/2.json +1137 -0
  190. package/labware/definitions/2/opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical/1.json +164 -0
  191. package/labware/definitions/2/opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical_acrylic/1.json +162 -0
  192. package/labware/definitions/2/opentrons_10_tuberack_nest_4x50ml_6x15ml_conical/1.json +160 -0
  193. package/labware/definitions/2/opentrons_15_tuberack_falcon_15ml_conical/1.json +211 -0
  194. package/labware/definitions/2/opentrons_15_tuberack_nest_15ml_conical/1.json +209 -0
  195. package/labware/definitions/2/opentrons_1_trash_1100ml_fixed/1.json +50 -0
  196. package/labware/definitions/2/opentrons_1_trash_3200ml_fixed/1.json +50 -0
  197. package/labware/definitions/2/opentrons_1_trash_850ml_fixed/1.json +50 -0
  198. package/labware/definitions/2/opentrons_24_aluminumblock_generic_2ml_screwcap/1.json +300 -0
  199. package/labware/definitions/2/opentrons_24_aluminumblock_generic_2ml_screwcap/2.json +301 -0
  200. package/labware/definitions/2/opentrons_24_aluminumblock_nest_0.5ml_screwcap/1.json +299 -0
  201. package/labware/definitions/2/opentrons_24_aluminumblock_nest_1.5ml_screwcap/1.json +299 -0
  202. package/labware/definitions/2/opentrons_24_aluminumblock_nest_1.5ml_snapcap/1.json +301 -0
  203. package/labware/definitions/2/opentrons_24_aluminumblock_nest_2ml_screwcap/1.json +299 -0
  204. package/labware/definitions/2/opentrons_24_aluminumblock_nest_2ml_snapcap/1.json +301 -0
  205. package/labware/definitions/2/opentrons_24_tuberack_eppendorf_1.5ml_safelock_snapcap/1.json +312 -0
  206. package/labware/definitions/2/opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap/1.json +311 -0
  207. package/labware/definitions/2/opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap_acrylic/1.json +309 -0
  208. package/labware/definitions/2/opentrons_24_tuberack_generic_0.75ml_snapcap_acrylic/1.json +298 -0
  209. package/labware/definitions/2/opentrons_24_tuberack_generic_2ml_screwcap/1.json +300 -0
  210. package/labware/definitions/2/opentrons_24_tuberack_nest_0.5ml_screwcap/1.json +300 -0
  211. package/labware/definitions/2/opentrons_24_tuberack_nest_1.5ml_screwcap/1.json +300 -0
  212. package/labware/definitions/2/opentrons_24_tuberack_nest_1.5ml_snapcap/1.json +302 -0
  213. package/labware/definitions/2/opentrons_24_tuberack_nest_2ml_screwcap/1.json +300 -0
  214. package/labware/definitions/2/opentrons_24_tuberack_nest_2ml_snapcap/1.json +302 -0
  215. package/labware/definitions/2/opentrons_40_aluminumblock_eppendorf_24x2ml_safelock_snapcap_generic_16x0.2ml_pcr_strip/1.json +481 -0
  216. package/labware/definitions/2/opentrons_6_tuberack_falcon_50ml_conical/1.json +112 -0
  217. package/labware/definitions/2/opentrons_6_tuberack_nest_50ml_conical/1.json +110 -0
  218. package/labware/definitions/2/opentrons_96_aluminumblock_biorad_wellplate_200ul/1.json +1029 -0
  219. package/labware/definitions/2/opentrons_96_aluminumblock_generic_pcr_strip_200ul/1.json +1026 -0
  220. package/labware/definitions/2/opentrons_96_aluminumblock_generic_pcr_strip_200ul/2.json +1027 -0
  221. package/labware/definitions/2/opentrons_96_aluminumblock_nest_wellplate_100ul/1.json +1027 -0
  222. package/labware/definitions/2/opentrons_96_deep_well_adapter/1.json +41 -0
  223. package/labware/definitions/2/opentrons_96_deep_well_adapter_nest_wellplate_2ml_deep/1.json +1121 -0
  224. package/labware/definitions/2/opentrons_96_filtertiprack_1000ul/1.json +1017 -0
  225. package/labware/definitions/2/opentrons_96_filtertiprack_10ul/1.json +1017 -0
  226. package/labware/definitions/2/opentrons_96_filtertiprack_200ul/1.json +1017 -0
  227. package/labware/definitions/2/opentrons_96_filtertiprack_20ul/1.json +1017 -0
  228. package/labware/definitions/2/opentrons_96_flat_bottom_adapter/1.json +41 -0
  229. package/labware/definitions/2/opentrons_96_flat_bottom_adapter_nest_wellplate_200ul_flat/1.json +1027 -0
  230. package/labware/definitions/2/opentrons_96_pcr_adapter/1.json +1032 -0
  231. package/labware/definitions/2/opentrons_96_pcr_adapter_armadillo_wellplate_200ul/1.json +1027 -0
  232. package/labware/definitions/2/opentrons_96_pcr_adapter_nest_wellplate_100ul_pcr_full_skirt/1.json +1025 -0
  233. package/labware/definitions/2/opentrons_96_tiprack_1000ul/1.json +1019 -0
  234. package/labware/definitions/2/opentrons_96_tiprack_10ul/1.json +1019 -0
  235. package/labware/definitions/2/opentrons_96_tiprack_20ul/1.json +1019 -0
  236. package/labware/definitions/2/opentrons_96_tiprack_300ul/1.json +1019 -0
  237. package/labware/definitions/2/opentrons_96_well_aluminum_block/1.json +1032 -0
  238. package/labware/definitions/2/opentrons_96_wellplate_200ul_pcr_full_skirt/1.json +1019 -0
  239. package/labware/definitions/2/opentrons_96_wellplate_200ul_pcr_full_skirt/2.json +1045 -0
  240. package/labware/definitions/2/opentrons_aluminum_flat_bottom_plate/1.json +41 -0
  241. package/labware/definitions/2/opentrons_calibration_adapter_heatershaker_module/1.json +62 -0
  242. package/labware/definitions/2/opentrons_calibration_adapter_temperature_module/1.json +62 -0
  243. package/labware/definitions/2/opentrons_calibration_adapter_thermocycler_module/1.json +69 -0
  244. package/labware/definitions/2/opentrons_calibrationblock_short_side_left/1.json +71 -0
  245. package/labware/definitions/2/opentrons_calibrationblock_short_side_right/1.json +71 -0
  246. package/labware/definitions/2/opentrons_flex_96_filtertiprack_1000ul/1.json +1026 -0
  247. package/labware/definitions/2/opentrons_flex_96_filtertiprack_200ul/1.json +1026 -0
  248. package/labware/definitions/2/opentrons_flex_96_filtertiprack_50ul/1.json +1026 -0
  249. package/labware/definitions/2/opentrons_flex_96_tiprack_1000ul/1.json +1026 -0
  250. package/labware/definitions/2/opentrons_flex_96_tiprack_200ul/1.json +1026 -0
  251. package/labware/definitions/2/opentrons_flex_96_tiprack_50ul/1.json +1026 -0
  252. package/labware/definitions/2/opentrons_flex_96_tiprack_adapter/1.json +41 -0
  253. package/labware/definitions/2/opentrons_universal_flat_adapter/1.json +151 -0
  254. package/labware/definitions/2/opentrons_universal_flat_adapter_corning_384_wellplate_112ul_flat/1.json +4710 -0
  255. package/labware/definitions/2/thermoscientificnunc_96_wellplate_1300ul/1.json +1019 -0
  256. package/labware/definitions/2/thermoscientificnunc_96_wellplate_2000ul/1.json +1019 -0
  257. package/labware/definitions/2/tipone_96_tiprack_200ul/1.json +1017 -0
  258. package/labware/definitions/2/usascientific_12_reservoir_22ml/1.json +192 -0
  259. package/labware/definitions/2/usascientific_96_wellplate_2.4ml_deep/1.json +1116 -0
  260. package/labware/fixtures/2/fixture_12_trough.json +188 -0
  261. package/labware/fixtures/2/fixture_12_trough_v2.json +188 -0
  262. package/labware/fixtures/2/fixture_24_tuberack.json +295 -0
  263. package/labware/fixtures/2/fixture_384_plate.json +4316 -0
  264. package/labware/fixtures/2/fixture_96_plate.json +1015 -0
  265. package/labware/fixtures/2/fixture_flex_96_tiprack_1000ul.json +1026 -0
  266. package/labware/fixtures/2/fixture_flex_96_tiprack_adapter.json +41 -0
  267. package/labware/fixtures/2/fixture_irregular_example_1.json +600 -0
  268. package/labware/fixtures/2/fixture_overlappy_wellplate.json +1113 -0
  269. package/labware/fixtures/2/fixture_regular_example_1.json +57 -0
  270. package/labware/fixtures/2/fixture_regular_example_2.json +95 -0
  271. package/labware/fixtures/2/fixture_tiprack_1000_ul.json +1015 -0
  272. package/labware/fixtures/2/fixture_tiprack_10_ul.json +1015 -0
  273. package/labware/fixtures/2/fixture_tiprack_300_ul.json +1014 -0
  274. package/labware/fixtures/2/fixture_trash.json +50 -0
  275. package/labware/schemas/2.json +372 -0
  276. package/liquid/schemas/1.json +21 -0
  277. package/liquid/types/index.ts +5 -0
  278. package/module/definitions/1.json +57 -0
  279. package/module/definitions/2/magneticModuleV1.json +22 -0
  280. package/module/definitions/2/magneticModuleV2.json +69 -0
  281. package/module/definitions/2/temperatureModuleV1.json +22 -0
  282. package/module/definitions/2/temperatureModuleV2.json +69 -0
  283. package/module/definitions/2/thermocyclerModuleV1.json +23 -0
  284. package/module/definitions/3/heaterShakerModuleV1.json +521 -0
  285. package/module/definitions/3/magneticBlockV1.json +199 -0
  286. package/module/definitions/3/magneticModuleV1.json +435 -0
  287. package/module/definitions/3/magneticModuleV2.json +488 -0
  288. package/module/definitions/3/temperatureModuleV1.json +190 -0
  289. package/module/definitions/3/temperatureModuleV2.json +315 -0
  290. package/module/definitions/3/thermocyclerModuleV1.json +1380 -0
  291. package/module/definitions/3/thermocyclerModuleV2.json +3686 -0
  292. package/module/fixtures/3/compatibleGenerationV1.json +69 -0
  293. package/module/fixtures/3/compatibleGenerationV2.json +69 -0
  294. package/module/fixtures/3/incompatibleGenerationV1.json +22 -0
  295. package/module/fixtures/3/incompatibleGenerationV2.json +69 -0
  296. package/module/schemas/1.json +55 -0
  297. package/module/schemas/2.json +112 -0
  298. package/module/schemas/3.json +206 -0
  299. package/package.json +20 -0
  300. package/pipette/README.md +50 -0
  301. package/pipette/definitions/1/pipetteModelSpecs.json +10214 -0
  302. package/pipette/definitions/1/pipetteNameSpecs.json +679 -0
  303. package/pipette/definitions/2/general/eight_channel/p10/1_0.json +59 -0
  304. package/pipette/definitions/2/general/eight_channel/p10/1_3.json +59 -0
  305. package/pipette/definitions/2/general/eight_channel/p10/1_4.json +59 -0
  306. package/pipette/definitions/2/general/eight_channel/p10/1_5.json +59 -0
  307. package/pipette/definitions/2/general/eight_channel/p10/1_6.json +59 -0
  308. package/pipette/definitions/2/general/eight_channel/p1000/1_0.json +68 -0
  309. package/pipette/definitions/2/general/eight_channel/p1000/3_0.json +68 -0
  310. package/pipette/definitions/2/general/eight_channel/p1000/3_3.json +68 -0
  311. package/pipette/definitions/2/general/eight_channel/p1000/3_4.json +68 -0
  312. package/pipette/definitions/2/general/eight_channel/p1000/3_5.json +68 -0
  313. package/pipette/definitions/2/general/eight_channel/p20/2_0.json +59 -0
  314. package/pipette/definitions/2/general/eight_channel/p20/2_1.json +59 -0
  315. package/pipette/definitions/2/general/eight_channel/p300/1_0.json +59 -0
  316. package/pipette/definitions/2/general/eight_channel/p300/1_3.json +59 -0
  317. package/pipette/definitions/2/general/eight_channel/p300/1_4.json +59 -0
  318. package/pipette/definitions/2/general/eight_channel/p300/1_5.json +59 -0
  319. package/pipette/definitions/2/general/eight_channel/p300/2_0.json +59 -0
  320. package/pipette/definitions/2/general/eight_channel/p300/2_1.json +59 -0
  321. package/pipette/definitions/2/general/eight_channel/p50/1_0.json +59 -0
  322. package/pipette/definitions/2/general/eight_channel/p50/1_3.json +59 -0
  323. package/pipette/definitions/2/general/eight_channel/p50/1_4.json +59 -0
  324. package/pipette/definitions/2/general/eight_channel/p50/1_5.json +59 -0
  325. package/pipette/definitions/2/general/eight_channel/p50/3_0.json +74 -0
  326. package/pipette/definitions/2/general/eight_channel/p50/3_3.json +74 -0
  327. package/pipette/definitions/2/general/eight_channel/p50/3_4.json +74 -0
  328. package/pipette/definitions/2/general/eight_channel/p50/3_5.json +74 -0
  329. package/pipette/definitions/2/general/ninety_six_channel/p1000/1_0.json +87 -0
  330. package/pipette/definitions/2/general/ninety_six_channel/p1000/3_0.json +92 -0
  331. package/pipette/definitions/2/general/ninety_six_channel/p1000/3_3.json +87 -0
  332. package/pipette/definitions/2/general/ninety_six_channel/p1000/3_4.json +88 -0
  333. package/pipette/definitions/2/general/ninety_six_channel/p1000/3_5.json +87 -0
  334. package/pipette/definitions/2/general/single_channel/p10/1_0.json +52 -0
  335. package/pipette/definitions/2/general/single_channel/p10/1_3.json +52 -0
  336. package/pipette/definitions/2/general/single_channel/p10/1_4.json +52 -0
  337. package/pipette/definitions/2/general/single_channel/p10/1_5.json +52 -0
  338. package/pipette/definitions/2/general/single_channel/p1000/1_0.json +52 -0
  339. package/pipette/definitions/2/general/single_channel/p1000/1_3.json +52 -0
  340. package/pipette/definitions/2/general/single_channel/p1000/1_4.json +52 -0
  341. package/pipette/definitions/2/general/single_channel/p1000/1_5.json +52 -0
  342. package/pipette/definitions/2/general/single_channel/p1000/2_0.json +52 -0
  343. package/pipette/definitions/2/general/single_channel/p1000/2_1.json +52 -0
  344. package/pipette/definitions/2/general/single_channel/p1000/2_2.json +52 -0
  345. package/pipette/definitions/2/general/single_channel/p1000/3_0.json +61 -0
  346. package/pipette/definitions/2/general/single_channel/p1000/3_3.json +61 -0
  347. package/pipette/definitions/2/general/single_channel/p1000/3_4.json +61 -0
  348. package/pipette/definitions/2/general/single_channel/p1000/3_5.json +61 -0
  349. package/pipette/definitions/2/general/single_channel/p20/2_0.json +52 -0
  350. package/pipette/definitions/2/general/single_channel/p20/2_1.json +52 -0
  351. package/pipette/definitions/2/general/single_channel/p20/2_2.json +52 -0
  352. package/pipette/definitions/2/general/single_channel/p300/1_0.json +52 -0
  353. package/pipette/definitions/2/general/single_channel/p300/1_3.json +52 -0
  354. package/pipette/definitions/2/general/single_channel/p300/1_4.json +52 -0
  355. package/pipette/definitions/2/general/single_channel/p300/1_5.json +52 -0
  356. package/pipette/definitions/2/general/single_channel/p300/2_0.json +52 -0
  357. package/pipette/definitions/2/general/single_channel/p300/2_1.json +52 -0
  358. package/pipette/definitions/2/general/single_channel/p50/1_0.json +52 -0
  359. package/pipette/definitions/2/general/single_channel/p50/1_3.json +52 -0
  360. package/pipette/definitions/2/general/single_channel/p50/1_4.json +52 -0
  361. package/pipette/definitions/2/general/single_channel/p50/1_5.json +52 -0
  362. package/pipette/definitions/2/general/single_channel/p50/3_0.json +67 -0
  363. package/pipette/definitions/2/general/single_channel/p50/3_3.json +67 -0
  364. package/pipette/definitions/2/general/single_channel/p50/3_4.json +67 -0
  365. package/pipette/definitions/2/general/single_channel/p50/3_5.json +67 -0
  366. package/pipette/definitions/2/geometry/eight_channel/p10/1_0.json +37 -0
  367. package/pipette/definitions/2/geometry/eight_channel/p10/1_3.json +37 -0
  368. package/pipette/definitions/2/geometry/eight_channel/p10/1_4.json +37 -0
  369. package/pipette/definitions/2/geometry/eight_channel/p10/1_5.json +37 -0
  370. package/pipette/definitions/2/geometry/eight_channel/p10/1_6.json +37 -0
  371. package/pipette/definitions/2/geometry/eight_channel/p10/placeholder.gltf +0 -0
  372. package/pipette/definitions/2/geometry/eight_channel/p1000/1_0.json +37 -0
  373. package/pipette/definitions/2/geometry/eight_channel/p1000/3_0.json +37 -0
  374. package/pipette/definitions/2/geometry/eight_channel/p1000/3_3.json +37 -0
  375. package/pipette/definitions/2/geometry/eight_channel/p1000/3_4.json +37 -0
  376. package/pipette/definitions/2/geometry/eight_channel/p1000/3_5.json +37 -0
  377. package/pipette/definitions/2/geometry/eight_channel/p1000/placeholder.gltf +0 -0
  378. package/pipette/definitions/2/geometry/eight_channel/p20/2_0.json +37 -0
  379. package/pipette/definitions/2/geometry/eight_channel/p20/2_1.json +37 -0
  380. package/pipette/definitions/2/geometry/eight_channel/p20/placeholder.gltf +0 -0
  381. package/pipette/definitions/2/geometry/eight_channel/p300/1_0.json +37 -0
  382. package/pipette/definitions/2/geometry/eight_channel/p300/1_3.json +37 -0
  383. package/pipette/definitions/2/geometry/eight_channel/p300/1_4.json +37 -0
  384. package/pipette/definitions/2/geometry/eight_channel/p300/1_5.json +37 -0
  385. package/pipette/definitions/2/geometry/eight_channel/p300/2_0.json +37 -0
  386. package/pipette/definitions/2/geometry/eight_channel/p300/2_1.json +37 -0
  387. package/pipette/definitions/2/geometry/eight_channel/p300/placeholder.gltf +0 -0
  388. package/pipette/definitions/2/geometry/eight_channel/p50/1_0.json +37 -0
  389. package/pipette/definitions/2/geometry/eight_channel/p50/1_3.json +37 -0
  390. package/pipette/definitions/2/geometry/eight_channel/p50/1_4.json +37 -0
  391. package/pipette/definitions/2/geometry/eight_channel/p50/1_5.json +37 -0
  392. package/pipette/definitions/2/geometry/eight_channel/p50/3_0.json +37 -0
  393. package/pipette/definitions/2/geometry/eight_channel/p50/3_3.json +37 -0
  394. package/pipette/definitions/2/geometry/eight_channel/p50/3_4.json +37 -0
  395. package/pipette/definitions/2/geometry/eight_channel/p50/3_5.json +37 -0
  396. package/pipette/definitions/2/geometry/eight_channel/p50/placeholder.gltf +0 -0
  397. package/pipette/definitions/2/geometry/ninety_six_channel/p1000/1_0.json +291 -0
  398. package/pipette/definitions/2/geometry/ninety_six_channel/p1000/3_0.json +291 -0
  399. package/pipette/definitions/2/geometry/ninety_six_channel/p1000/3_3.json +291 -0
  400. package/pipette/definitions/2/geometry/ninety_six_channel/p1000/3_4.json +291 -0
  401. package/pipette/definitions/2/geometry/ninety_six_channel/p1000/3_5.json +291 -0
  402. package/pipette/definitions/2/geometry/ninety_six_channel/p1000/placeholder.gltf +0 -0
  403. package/pipette/definitions/2/geometry/single_channel/p10/1_0.json +10 -0
  404. package/pipette/definitions/2/geometry/single_channel/p10/1_3.json +10 -0
  405. package/pipette/definitions/2/geometry/single_channel/p10/1_4.json +10 -0
  406. package/pipette/definitions/2/geometry/single_channel/p10/1_5.json +10 -0
  407. package/pipette/definitions/2/geometry/single_channel/p10/placeholder.gltf +0 -0
  408. package/pipette/definitions/2/geometry/single_channel/p1000/1_0.json +10 -0
  409. package/pipette/definitions/2/geometry/single_channel/p1000/1_3.json +10 -0
  410. package/pipette/definitions/2/geometry/single_channel/p1000/1_4.json +10 -0
  411. package/pipette/definitions/2/geometry/single_channel/p1000/1_5.json +10 -0
  412. package/pipette/definitions/2/geometry/single_channel/p1000/2_0.json +10 -0
  413. package/pipette/definitions/2/geometry/single_channel/p1000/2_1.json +10 -0
  414. package/pipette/definitions/2/geometry/single_channel/p1000/2_2.json +10 -0
  415. package/pipette/definitions/2/geometry/single_channel/p1000/3_0.json +10 -0
  416. package/pipette/definitions/2/geometry/single_channel/p1000/3_3.json +10 -0
  417. package/pipette/definitions/2/geometry/single_channel/p1000/3_4.json +10 -0
  418. package/pipette/definitions/2/geometry/single_channel/p1000/3_5.json +10 -0
  419. package/pipette/definitions/2/geometry/single_channel/p1000/placeholder.gltf +0 -0
  420. package/pipette/definitions/2/geometry/single_channel/p20/2_0.json +10 -0
  421. package/pipette/definitions/2/geometry/single_channel/p20/2_1.json +10 -0
  422. package/pipette/definitions/2/geometry/single_channel/p20/2_2.json +10 -0
  423. package/pipette/definitions/2/geometry/single_channel/p20/placeholder.gltf +0 -0
  424. package/pipette/definitions/2/geometry/single_channel/p300/1_0.json +10 -0
  425. package/pipette/definitions/2/geometry/single_channel/p300/1_3.json +10 -0
  426. package/pipette/definitions/2/geometry/single_channel/p300/1_4.json +10 -0
  427. package/pipette/definitions/2/geometry/single_channel/p300/1_5.json +10 -0
  428. package/pipette/definitions/2/geometry/single_channel/p300/2_0.json +10 -0
  429. package/pipette/definitions/2/geometry/single_channel/p300/2_1.json +10 -0
  430. package/pipette/definitions/2/geometry/single_channel/p300/placeholder.gltf +0 -0
  431. package/pipette/definitions/2/geometry/single_channel/p50/1_0.json +10 -0
  432. package/pipette/definitions/2/geometry/single_channel/p50/1_3.json +10 -0
  433. package/pipette/definitions/2/geometry/single_channel/p50/1_4.json +10 -0
  434. package/pipette/definitions/2/geometry/single_channel/p50/1_5.json +10 -0
  435. package/pipette/definitions/2/geometry/single_channel/p50/3_0.json +10 -0
  436. package/pipette/definitions/2/geometry/single_channel/p50/3_3.json +10 -0
  437. package/pipette/definitions/2/geometry/single_channel/p50/3_4.json +10 -0
  438. package/pipette/definitions/2/geometry/single_channel/p50/3_5.json +10 -0
  439. package/pipette/definitions/2/geometry/single_channel/p50/placeholder.gltf +0 -0
  440. package/pipette/definitions/2/liquid/eight_channel/p10/default/1_0.json +58 -0
  441. package/pipette/definitions/2/liquid/eight_channel/p10/default/1_3.json +58 -0
  442. package/pipette/definitions/2/liquid/eight_channel/p10/default/1_4.json +58 -0
  443. package/pipette/definitions/2/liquid/eight_channel/p10/default/1_5.json +47 -0
  444. package/pipette/definitions/2/liquid/eight_channel/p10/default/1_6.json +55 -0
  445. package/pipette/definitions/2/liquid/eight_channel/p1000/default/1_0.json +356 -0
  446. package/pipette/definitions/2/liquid/eight_channel/p1000/default/3_0.json +359 -0
  447. package/pipette/definitions/2/liquid/eight_channel/p1000/default/3_3.json +359 -0
  448. package/pipette/definitions/2/liquid/eight_channel/p1000/default/3_4.json +359 -0
  449. package/pipette/definitions/2/liquid/eight_channel/p1000/default/3_5.json +239 -0
  450. package/pipette/definitions/2/liquid/eight_channel/p20/default/2_0.json +311 -0
  451. package/pipette/definitions/2/liquid/eight_channel/p20/default/2_1.json +191 -0
  452. package/pipette/definitions/2/liquid/eight_channel/p300/default/1_0.json +67 -0
  453. package/pipette/definitions/2/liquid/eight_channel/p300/default/1_3.json +67 -0
  454. package/pipette/definitions/2/liquid/eight_channel/p300/default/1_4.json +67 -0
  455. package/pipette/definitions/2/liquid/eight_channel/p300/default/1_5.json +67 -0
  456. package/pipette/definitions/2/liquid/eight_channel/p300/default/2_0.json +190 -0
  457. package/pipette/definitions/2/liquid/eight_channel/p300/default/2_1.json +190 -0
  458. package/pipette/definitions/2/liquid/eight_channel/p50/default/1_0.json +128 -0
  459. package/pipette/definitions/2/liquid/eight_channel/p50/default/1_3.json +128 -0
  460. package/pipette/definitions/2/liquid/eight_channel/p50/default/1_4.json +128 -0
  461. package/pipette/definitions/2/liquid/eight_channel/p50/default/1_5.json +110 -0
  462. package/pipette/definitions/2/liquid/eight_channel/p50/default/3_0.json +99 -0
  463. package/pipette/definitions/2/liquid/eight_channel/p50/default/3_3.json +99 -0
  464. package/pipette/definitions/2/liquid/eight_channel/p50/default/3_4.json +99 -0
  465. package/pipette/definitions/2/liquid/eight_channel/p50/default/3_5.json +91 -0
  466. package/pipette/definitions/2/liquid/eight_channel/p50/lowVolumeDefault/3_0.json +94 -0
  467. package/pipette/definitions/2/liquid/eight_channel/p50/lowVolumeDefault/3_3.json +89 -0
  468. package/pipette/definitions/2/liquid/eight_channel/p50/lowVolumeDefault/3_4.json +89 -0
  469. package/pipette/definitions/2/liquid/eight_channel/p50/lowVolumeDefault/3_5.json +89 -0
  470. package/pipette/definitions/2/liquid/ninety_six_channel/p1000/default/1_0.json +188 -0
  471. package/pipette/definitions/2/liquid/ninety_six_channel/p1000/default/3_0.json +188 -0
  472. package/pipette/definitions/2/liquid/ninety_six_channel/p1000/default/3_3.json +188 -0
  473. package/pipette/definitions/2/liquid/ninety_six_channel/p1000/default/3_4.json +188 -0
  474. package/pipette/definitions/2/liquid/ninety_six_channel/p1000/default/3_5.json +188 -0
  475. package/pipette/definitions/2/liquid/single_channel/p10/default/1_0.json +59 -0
  476. package/pipette/definitions/2/liquid/single_channel/p10/default/1_3.json +59 -0
  477. package/pipette/definitions/2/liquid/single_channel/p10/default/1_4.json +56 -0
  478. package/pipette/definitions/2/liquid/single_channel/p10/default/1_5.json +54 -0
  479. package/pipette/definitions/2/liquid/single_channel/p1000/default/1_0.json +48 -0
  480. package/pipette/definitions/2/liquid/single_channel/p1000/default/1_3.json +48 -0
  481. package/pipette/definitions/2/liquid/single_channel/p1000/default/1_4.json +48 -0
  482. package/pipette/definitions/2/liquid/single_channel/p1000/default/1_5.json +48 -0
  483. package/pipette/definitions/2/liquid/single_channel/p1000/default/2_0.json +105 -0
  484. package/pipette/definitions/2/liquid/single_channel/p1000/default/2_1.json +107 -0
  485. package/pipette/definitions/2/liquid/single_channel/p1000/default/2_2.json +107 -0
  486. package/pipette/definitions/2/liquid/single_channel/p1000/default/3_0.json +356 -0
  487. package/pipette/definitions/2/liquid/single_channel/p1000/default/3_3.json +356 -0
  488. package/pipette/definitions/2/liquid/single_channel/p1000/default/3_4.json +282 -0
  489. package/pipette/definitions/2/liquid/single_channel/p1000/default/3_5.json +204 -0
  490. package/pipette/definitions/2/liquid/single_channel/p20/default/2_0.json +431 -0
  491. package/pipette/definitions/2/liquid/single_channel/p20/default/2_1.json +251 -0
  492. package/pipette/definitions/2/liquid/single_channel/p20/default/2_2.json +311 -0
  493. package/pipette/definitions/2/liquid/single_channel/p300/default/1_0.json +99 -0
  494. package/pipette/definitions/2/liquid/single_channel/p300/default/1_3.json +99 -0
  495. package/pipette/definitions/2/liquid/single_channel/p300/default/1_4.json +99 -0
  496. package/pipette/definitions/2/liquid/single_channel/p300/default/1_5.json +75 -0
  497. package/pipette/definitions/2/liquid/single_channel/p300/default/2_0.json +188 -0
  498. package/pipette/definitions/2/liquid/single_channel/p300/default/2_1.json +188 -0
  499. package/pipette/definitions/2/liquid/single_channel/p50/default/1_0.json +119 -0
  500. package/pipette/definitions/2/liquid/single_channel/p50/default/1_3.json +128 -0
  501. package/pipette/definitions/2/liquid/single_channel/p50/default/1_4.json +128 -0
  502. package/pipette/definitions/2/liquid/single_channel/p50/default/1_5.json +104 -0
  503. package/pipette/definitions/2/liquid/single_channel/p50/default/3_0.json +98 -0
  504. package/pipette/definitions/2/liquid/single_channel/p50/default/3_3.json +98 -0
  505. package/pipette/definitions/2/liquid/single_channel/p50/default/3_4.json +100 -0
  506. package/pipette/definitions/2/liquid/single_channel/p50/default/3_5.json +80 -0
  507. package/pipette/definitions/2/liquid/single_channel/p50/lowVolumeDefault/3_0.json +78 -0
  508. package/pipette/definitions/2/liquid/single_channel/p50/lowVolumeDefault/3_3.json +78 -0
  509. package/pipette/definitions/2/liquid/single_channel/p50/lowVolumeDefault/3_4.json +78 -0
  510. package/pipette/definitions/2/liquid/single_channel/p50/lowVolumeDefault/3_5.json +76 -0
  511. package/pipette/fixtures/name/index.ts +19 -0
  512. package/pipette/fixtures/name/pipetteNameSpecFixtures.json +130 -0
  513. package/pipette/schemas/1/pipetteModelSpecsSchema.json +155 -0
  514. package/pipette/schemas/1/pipetteNameSpecsSchema.json +91 -0
  515. package/pipette/schemas/2/pipetteGeometrySchema.json +81 -0
  516. package/pipette/schemas/2/pipetteLiquidPropertiesSchema.json +120 -0
  517. package/pipette/schemas/2/pipettePropertiesSchema.json +287 -0
  518. package/protocol/README.md +12 -0
  519. package/protocol/fixtures/1/simple.json +73 -0
  520. package/protocol/fixtures/3/simple.json +1307 -0
  521. package/protocol/fixtures/3/testAllAtomicSingleV3.json +2281 -0
  522. package/protocol/fixtures/3/testTrickyLabwareV3.json +2577 -0
  523. package/protocol/fixtures/3/unusedPipette.json +1311 -0
  524. package/protocol/fixtures/4/pipetteMultiChannelProtocolV4.json +2561 -0
  525. package/protocol/fixtures/4/simpleV4.json +1309 -0
  526. package/protocol/fixtures/4/testMagneticModuleV4.json +2156 -0
  527. package/protocol/fixtures/4/testModulesProtocol.json +2561 -0
  528. package/protocol/fixtures/4/testTemperatureModuleV4.json +1480 -0
  529. package/protocol/fixtures/4/testThermocyclerModuleV4.json +2182 -0
  530. package/protocol/fixtures/4/transferSettings.json +5482 -0
  531. package/protocol/fixtures/5/multipleTipracks.json +2476 -0
  532. package/protocol/fixtures/5/multipleTipracksWithTC.json +3544 -0
  533. package/protocol/fixtures/5/simpleV5.json +1328 -0
  534. package/protocol/fixtures/6/heaterShakerCommands.json +1422 -0
  535. package/protocol/fixtures/6/heaterShakerCommandsWithResultsKey.json +4725 -0
  536. package/protocol/fixtures/6/multipleTempModules.json +11060 -0
  537. package/protocol/fixtures/6/multipleTipracks.json +5020 -0
  538. package/protocol/fixtures/6/multipleTipracksWithTC.json +7057 -0
  539. package/protocol/fixtures/6/oneTiprack.json +1388 -0
  540. package/protocol/fixtures/6/simpleV6.json +1494 -0
  541. package/protocol/fixtures/6/tempAndMagModuleCommands.json +1413 -0
  542. package/protocol/fixtures/6/transferSettings.json +11060 -0
  543. package/protocol/fixtures/7/moveLabware.json +1303 -0
  544. package/protocol/fixtures/7/simpleV7.json +1496 -0
  545. package/protocol/fixtures/8/moveLabware8.json +1309 -0
  546. package/protocol/fixtures/8/moveLabwareFlex8.json +1309 -0
  547. package/protocol/fixtures/8/simpleFlexV8.json +1475 -0
  548. package/protocol/fixtures/8/simpleV8.json +1473 -0
  549. package/protocol/index.ts +32 -0
  550. package/protocol/schemas/1.json +389 -0
  551. package/protocol/schemas/2.json +416 -0
  552. package/protocol/schemas/3.json +360 -0
  553. package/protocol/schemas/4.json +662 -0
  554. package/protocol/schemas/5.json +701 -0
  555. package/protocol/schemas/6.json +1225 -0
  556. package/protocol/schemas/7.json +290 -0
  557. package/protocol/schemas/8.json +157 -0
  558. package/protocol/types/schemaV1.ts +108 -0
  559. package/protocol/types/schemaV3.ts +131 -0
  560. package/protocol/types/schemaV4.ts +146 -0
  561. package/protocol/types/schemaV5.ts +34 -0
  562. package/protocol/types/schemaV5Addendum.ts +27 -0
  563. package/protocol/types/schemaV6/command/gantry.ts +146 -0
  564. package/protocol/types/schemaV6/command/index.ts +65 -0
  565. package/protocol/types/schemaV6/command/module.ts +302 -0
  566. package/protocol/types/schemaV6/command/pipetting.ts +114 -0
  567. package/protocol/types/schemaV6/command/setup.ts +127 -0
  568. package/protocol/types/schemaV6/command/timing.ts +58 -0
  569. package/protocol/types/schemaV6/index.ts +122 -0
  570. package/protocol/types/schemaV7/command/annotation.ts +37 -0
  571. package/protocol/types/schemaV7/command/calibration.ts +84 -0
  572. package/protocol/types/schemaV7/command/gantry.ts +154 -0
  573. package/protocol/types/schemaV7/command/incidental.ts +21 -0
  574. package/protocol/types/schemaV7/command/index.ts +76 -0
  575. package/protocol/types/schemaV7/command/module.ts +307 -0
  576. package/protocol/types/schemaV7/command/pipetting.ts +173 -0
  577. package/protocol/types/schemaV7/command/setup.ts +158 -0
  578. package/protocol/types/schemaV7/command/timing.ts +58 -0
  579. package/protocol/types/schemaV7/index.ts +98 -0
  580. package/protocol/types/schemaV8/index.ts +160 -0
  581. package/python/.coveragerc +4 -0
  582. package/python/.flake8 +32 -0
  583. package/python/Config.in +10 -0
  584. package/python/Makefile +134 -0
  585. package/python/Pipfile +28 -0
  586. package/python/Pipfile.lock +645 -0
  587. package/python/buildroot.mk +30 -0
  588. package/python/mypy.ini +41 -0
  589. package/python/opentrons_shared_data/__init__.py +17 -0
  590. package/python/opentrons_shared_data/_version.py +20 -0
  591. package/python/opentrons_shared_data/command/__init__.py +52 -0
  592. package/python/opentrons_shared_data/deck/__init__.py +96 -0
  593. package/python/opentrons_shared_data/deck/dev_types.py +180 -0
  594. package/python/opentrons_shared_data/errors/__init__.py +30 -0
  595. package/python/opentrons_shared_data/errors/categories.py +60 -0
  596. package/python/opentrons_shared_data/errors/codes.py +108 -0
  597. package/python/opentrons_shared_data/errors/exceptions.py +915 -0
  598. package/python/opentrons_shared_data/gripper/__init__.py +63 -0
  599. package/python/opentrons_shared_data/gripper/constants.py +5 -0
  600. package/python/opentrons_shared_data/gripper/gripper_definition.py +101 -0
  601. package/python/opentrons_shared_data/labware/__init__.py +22 -0
  602. package/python/opentrons_shared_data/labware/constants.py +7 -0
  603. package/python/opentrons_shared_data/labware/dev_types.py +140 -0
  604. package/python/opentrons_shared_data/labware/labware_definition.py +328 -0
  605. package/python/opentrons_shared_data/load.py +57 -0
  606. package/python/opentrons_shared_data/module/__init__.py +74 -0
  607. package/python/opentrons_shared_data/module/dev_types.py +141 -0
  608. package/python/opentrons_shared_data/pipette/__init__.py +107 -0
  609. package/python/opentrons_shared_data/pipette/dev_types.py +177 -0
  610. package/python/opentrons_shared_data/pipette/file_operation_helpers.py +37 -0
  611. package/python/opentrons_shared_data/pipette/load_data.py +261 -0
  612. package/python/opentrons_shared_data/pipette/model_constants.py +123 -0
  613. package/python/opentrons_shared_data/pipette/mutable_configurations.py +431 -0
  614. package/python/opentrons_shared_data/pipette/pipette_definition.py +503 -0
  615. package/python/opentrons_shared_data/pipette/pipette_load_name_conversions.py +236 -0
  616. package/python/opentrons_shared_data/pipette/scripts/__init__.py +0 -0
  617. package/python/opentrons_shared_data/pipette/scripts/build_json_script.py +469 -0
  618. package/python/opentrons_shared_data/pipette/scripts/update_configuration_files.py +450 -0
  619. package/python/opentrons_shared_data/pipette/types.py +193 -0
  620. package/python/opentrons_shared_data/protocol/__init__.py +13 -0
  621. package/python/opentrons_shared_data/protocol/constants.py +98 -0
  622. package/python/opentrons_shared_data/protocol/dev_types.py +436 -0
  623. package/python/opentrons_shared_data/protocol/models/__init__.py +48 -0
  624. package/python/opentrons_shared_data/protocol/models/protocol_schema_v6.py +145 -0
  625. package/python/opentrons_shared_data/protocol/models/protocol_schema_v7.py +95 -0
  626. package/python/opentrons_shared_data/protocol/models/protocol_schema_v8.py +108 -0
  627. package/python/opentrons_shared_data/protocol/models/shared_models.py +105 -0
  628. package/python/opentrons_shared_data/py.typed +0 -0
  629. package/python/opentrons_shared_data/robot/__init__.py +25 -0
  630. package/python/opentrons_shared_data/robot/dev_types.py +37 -0
  631. package/python/pytest.ini +2 -0
  632. package/python/setup.cfg +5 -0
  633. package/python/setup.py +179 -0
  634. package/python/tests/__init__.py +1 -0
  635. package/python/tests/conftest.py +0 -0
  636. package/python/tests/deck/__init__.py +0 -0
  637. package/python/tests/deck/test_list_names.py +12 -0
  638. package/python/tests/deck/test_position.py +113 -0
  639. package/python/tests/deck/test_typechecks.py +28 -0
  640. package/python/tests/errors/__init__.py +1 -0
  641. package/python/tests/errors/test_error_completeness.py +19 -0
  642. package/python/tests/errors/test_exceptions.py +74 -0
  643. package/python/tests/gripper/__init__.py +0 -0
  644. package/python/tests/gripper/test_definition.py +30 -0
  645. package/python/tests/gripper/test_load.py +16 -0
  646. package/python/tests/labware/__init__.py +13 -0
  647. package/python/tests/labware/test_typechecks.py +21 -0
  648. package/python/tests/module/__init__.py +20 -0
  649. package/python/tests/module/test_load.py +49 -0
  650. package/python/tests/module/test_typechecks.py +34 -0
  651. package/python/tests/pipette/__init__.py +0 -0
  652. package/python/tests/pipette/test_load_data.py +103 -0
  653. package/python/tests/pipette/test_mutable_configurations.py +266 -0
  654. package/python/tests/pipette/test_pipette_definition.py +183 -0
  655. package/python/tests/pipette/test_pipette_load_name_conversions.py +222 -0
  656. package/python/tests/pipette/test_typechecks.py +50 -0
  657. package/python/tests/pipette/test_validate_schema.py +37 -0
  658. package/python/tests/protocol/__init__.py +15 -0
  659. package/python/tests/protocol/test_protocol_schema_v6.py +107 -0
  660. package/python/tests/protocol/test_protocol_schema_v7.py +34 -0
  661. package/python/tests/protocol/test_protocol_schema_v8.py +20 -0
  662. package/python/tests/protocol/test_typechecks.py +36 -0
  663. package/python/tests/robot/__init__.py +0 -0
  664. package/python/tests/robot/test_typechecks.py +20 -0
  665. package/robot/definitions/1/ot2.json +5 -0
  666. package/robot/definitions/1/ot3.json +5 -0
  667. package/robot/schemas/1.json +30 -0
  668. package/tsconfig-data.json +24 -0
  669. package/tsconfig.json +17 -0
@@ -0,0 +1,162 @@
1
+ import assert from 'assert'
2
+ import mapValues from 'lodash/mapValues'
3
+ // TODO: Ian 2019-06-04 remove the shared-data build process for labware v1
4
+ import definitions from '../build/labware.json'
5
+
6
+ import {
7
+ FIXED_TRASH_RENDER_HEIGHT,
8
+ OPENTRONS_LABWARE_NAMESPACE,
9
+ SLOT_RENDER_HEIGHT,
10
+ } from './constants'
11
+
12
+ import type {
13
+ LabwareDefinition1,
14
+ LabwareDefinition2,
15
+ WellDefinition,
16
+ } from './types'
17
+
18
+ assert(
19
+ definitions && Object.keys(definitions).length > 0,
20
+ 'Expected v1 labware defs. Something went wrong with shared-data/build/labware.json'
21
+ )
22
+
23
+ // do not list in any "available labware" UI.
24
+ // TODO(mc, 2019-12-3): how should this correspond to RETIRED_LABWARE?
25
+ // see shared-data/js/helpers/index.js
26
+ export const LABWAREV2_DO_NOT_LIST = [
27
+ // Labware definitions only used for back-compat with legacy v1 defs:
28
+ 'opentrons_40_aluminumblock_eppendorf_24x2ml_safelock_snapcap_generic_16x0.2ml_pcr_strip',
29
+ 'opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap_acrylic',
30
+ 'opentrons_24_tuberack_generic_0.75ml_snapcap_acrylic',
31
+ 'opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical_acrylic',
32
+ 'tipone_96_tiprack_200ul',
33
+ 'eppendorf_96_tiprack_1000ul_eptips',
34
+ 'eppendorf_96_tiprack_10ul_eptips',
35
+ // Replaced by opentrons_96_wellplate_200ul_pcr_full_skirt
36
+ // (https://opentrons.atlassian.net/browse/RLAB-230):
37
+ 'armadillo_96_wellplate_200ul_pcr_full_skirt',
38
+ 'opentrons_96_pcr_adapter_armadillo_wellplate_200ul',
39
+ // Special labware that users probably shouldn't know about or load:
40
+ // these all should eventually be given a new namespace like "opentrons-internal"
41
+ // so that they can be filtered out by namespace rather than a block list like this
42
+ 'opentrons_1_trash_850ml_fixed',
43
+ 'opentrons_1_trash_1100ml_fixed',
44
+ 'opentrons_1_trash_3200ml_fixed',
45
+ 'opentrons_calibrationblock_short_side_left',
46
+ 'opentrons_calibrationblock_short_side_right',
47
+ 'opentrons_calibration_adapter_heatershaker_module',
48
+ 'opentrons_calibration_adapter_temperature_module',
49
+ 'opentrons_calibration_adapter_thermocycler_module',
50
+ 'opentrons_ot3_96_tiprack_20ul',
51
+ 'opentrons_ot3_96_tiprack_200ul',
52
+ 'opentrons_ot3_96_tiprack_1000ul',
53
+ 'opentrons_ot3_96_tiprack_50ul',
54
+ ]
55
+ // NOTE(sa, 2020-7-14): in PD we do not want to list calibration blocks
56
+ // but we still might want the rest of the labware in LABWAREV2_DO_NOT_LIST
57
+ // because of legacy protocols that might use them
58
+ export const PD_DO_NOT_LIST = [
59
+ 'opentrons_calibrationblock_short_side_left',
60
+ 'opentrons_calibrationblock_short_side_right',
61
+ 'opentrons_96_aluminumblock_biorad_wellplate_200ul',
62
+ 'opentrons_96_aluminumblock_nest_wellplate_100ul',
63
+ ]
64
+
65
+ export function getLabwareV1Def(
66
+ labwareName: string
67
+ ): LabwareDefinition1 | null | undefined {
68
+ const labware: LabwareDefinition1 | null | undefined =
69
+ // @ts-expect-error(mc, 2021-04-27): make lookup more strict or remove v1 defs entirely
70
+ definitions[labwareName]
71
+ return labware
72
+ }
73
+
74
+ export function getIsLabwareV1Tiprack(def: LabwareDefinition1): boolean {
75
+ return Boolean(def?.metadata?.isTiprack)
76
+ }
77
+
78
+ export function getIsTiprack(labwareDef: LabwareDefinition2): boolean {
79
+ return labwareDef.parameters.isTiprack
80
+ }
81
+
82
+ // NOTE: these labware definitions in _SHORT_MM_LABWARE_DEF_LOADNAMES
83
+ // were written in "short mm" = 0.5mm, but
84
+ // we will write all future definitions in actual mm.
85
+ // These allowed labware also have engage heights measured from home switch
86
+ // instead of from labware bottom, which is why we add ENGAGE_HEIGHT_OFFSET.
87
+ //
88
+ // Ideally instead of using this allow-list, we would publish a new version
89
+ // of these definitions with corrected labware heights. However, we don't
90
+ // support labware versioning well enough yet.
91
+ const _SHORT_MM_LABWARE_DEF_LOADNAMES = [
92
+ 'biorad_96_wellplate_200ul_pcr',
93
+ 'nest_96_wellplate_100ul_pcr_full_skirt',
94
+ 'usascientific_96_wellplate_2.4ml_deep',
95
+ ]
96
+
97
+ // offset added to parameters.magneticModuleEngageHeight to convert older labware
98
+ // definitions from "distance from home switch" to "distance from labware bottom"
99
+ // Note: this is in actual mm, not "short mm" :)
100
+ const ENGAGE_HEIGHT_OFFSET = -4
101
+
102
+ export function getLabwareDefaultEngageHeight(
103
+ labwareDef: LabwareDefinition2
104
+ ): number | null {
105
+ const rawEngageHeight: number | null | undefined =
106
+ labwareDef.parameters.magneticModuleEngageHeight
107
+
108
+ if (
109
+ labwareDef.namespace === OPENTRONS_LABWARE_NAMESPACE &&
110
+ _SHORT_MM_LABWARE_DEF_LOADNAMES.includes(labwareDef.parameters.loadName)
111
+ ) {
112
+ return rawEngageHeight == null
113
+ ? null
114
+ : rawEngageHeight / 2 + ENGAGE_HEIGHT_OFFSET
115
+ }
116
+
117
+ return rawEngageHeight == null ? null : rawEngageHeight
118
+ }
119
+
120
+ /* Render Helpers */
121
+ // NOTE: this doesn't account for the differing footprints of labware
122
+ // the fixed trash render height is the first bandaid to partially
123
+ // mend this, but overall the labware definitions in shared-data are
124
+ // insufficient to render labware at the resolution we'd like to
125
+ // achieve going forward.
126
+ // TODO: BC 2019-02-28 The height constants used here should be replaced with the heights
127
+ // in the dimensions field of the corresponding labware in definitions
128
+ const _getSvgYValueForWell = (
129
+ def: LabwareDefinition1,
130
+ wellDef: WellDefinition
131
+ ): number => {
132
+ const labwareName = def.metadata.name
133
+ const renderHeight =
134
+ labwareName === 'fixed-trash'
135
+ ? FIXED_TRASH_RENDER_HEIGHT
136
+ : SLOT_RENDER_HEIGHT
137
+ return renderHeight - wellDef.y
138
+ }
139
+
140
+ /** For display. Flips Y axis to match SVG, applies offset to wells */
141
+ export function getWellPropsForSVGLabwareV1(
142
+ def: LabwareDefinition1
143
+ ): Record<string, WellDefinition> {
144
+ const wellDefs = def && def.wells
145
+ // Most labware defs have a weird offset,
146
+ // but tips are mostly OK.
147
+ // This is a HACK to make the offset less "off"
148
+ const isTiprack = getIsLabwareV1Tiprack(def)
149
+ let xCorrection = 0
150
+ let yCorrection = 0
151
+
152
+ if (!isTiprack) {
153
+ xCorrection = 1
154
+ yCorrection = -3
155
+ }
156
+
157
+ return mapValues(wellDefs, (wellDef: WellDefinition) => ({
158
+ ...wellDef,
159
+ x: wellDef.x + xCorrection,
160
+ y: _getSvgYValueForWell(def, wellDef) + yCorrection,
161
+ }))
162
+ }
package/js/gripper.ts ADDED
@@ -0,0 +1,29 @@
1
+ import gripperV1 from '../gripper/definitions/1/gripperV1.json'
2
+ import gripperV1_1 from '../gripper/definitions/1/gripperV1.1.json'
3
+ import gripperV1_2 from '../gripper/definitions/1/gripperV1.2.json'
4
+
5
+ import { GRIPPER_V1, GRIPPER_V1_1, GRIPPER_V1_2 } from './constants'
6
+
7
+ import type { GripperModel, GripperDefinition } from './types'
8
+
9
+ export const getGripperDef = (
10
+ gripperModel: GripperModel
11
+ ): GripperDefinition => {
12
+ switch (gripperModel) {
13
+ case GRIPPER_V1:
14
+ return gripperV1 as GripperDefinition
15
+ case GRIPPER_V1_1:
16
+ return gripperV1_1 as GripperDefinition
17
+ case GRIPPER_V1_2:
18
+ return gripperV1_2 as GripperDefinition
19
+ default:
20
+ console.warn(
21
+ `Could not find a gripper with model ${gripperModel}, falling back to most recent definition: ${GRIPPER_V1_1}`
22
+ )
23
+ return gripperV1_1 as GripperDefinition
24
+ }
25
+ }
26
+
27
+ export function getGripperDisplayName(gripperModel: GripperModel): string {
28
+ return getGripperDef(gripperModel).displayName
29
+ }
@@ -0,0 +1,31 @@
1
+ import { getAdapterName } from '../index'
2
+
3
+ describe('getAdapterName', () => {
4
+ it(`should return the PCR adapter name`, () => {
5
+ expect(
6
+ getAdapterName(
7
+ 'opentrons_96_pcr_adapter_nest_wellplate_100ul_pcr_full_skirt'
8
+ )
9
+ ).toEqual('PCR Adapter')
10
+ })
11
+ it(`should return the Deep well adapter name`, () => {
12
+ expect(
13
+ getAdapterName('opentrons_96_deep_well_adapter_nest_wellplate_2ml_deep')
14
+ ).toEqual('Deep Well Adapter')
15
+ })
16
+ it(`should return the 96 flat bottom adapter name`, () => {
17
+ expect(
18
+ getAdapterName(
19
+ 'opentrons_96_flat_bottom_adapter_nest_wellplate_200ul_flat'
20
+ )
21
+ ).toEqual('96 Flat Bottom Adapter')
22
+ })
23
+ it(`should return universal flat adapter name when loadname is not 1 of the 3 specified loadnames`, () => {
24
+ expect(
25
+ getAdapterName(
26
+ 'opentrons_universal_flat_adapter_corning_384_wellplate_112ul_flat'
27
+ )
28
+ ).toEqual('Universal Flat Adapter')
29
+ expect(getAdapterName('random labware')).toEqual('Universal Flat Adapter')
30
+ })
31
+ })
@@ -0,0 +1,12 @@
1
+ import ot2DeckDef from '../../../deck/definitions/4/ot2_standard.json'
2
+ import ot3DeckDef from '../../../deck/definitions/4/ot3_standard.json'
3
+ import { getDeckDefFromRobotType } from '..'
4
+
5
+ describe('getDeckDefFromRobotType', () => {
6
+ it('should return an OT-2 deck when the protocol is for an OT-2', () => {
7
+ expect(getDeckDefFromRobotType('OT-2 Standard')).toBe(ot2DeckDef)
8
+ })
9
+ it('should return an OT-3 deck when the protocol is for an OT-3', () => {
10
+ expect(getDeckDefFromRobotType('OT-3 Standard')).toBe(ot3DeckDef)
11
+ })
12
+ })
@@ -0,0 +1,25 @@
1
+ import { getVectorDifference } from '../getVectorDifference'
2
+
3
+ describe('getVectorDifference', () => {
4
+ it(`should calculate difference betwen pointA and pointB with integer values`, () => {
5
+ expect(
6
+ getVectorDifference({ x: 1, y: 2, z: 3 }, { x: 1, y: 2, z: 3 })
7
+ ).toEqual({ x: 0, y: 0, z: 0 })
8
+ })
9
+ it(`should calculate difference betwen pointA and pointB with decimal values`, () => {
10
+ expect(
11
+ getVectorDifference(
12
+ { x: 1.0, y: 2.0, z: 3.0 },
13
+ { x: 1.0, y: 2.0, z: 3.0 }
14
+ )
15
+ ).toEqual({ x: 0, y: 0, z: 0 })
16
+ })
17
+ it(`should calculate difference betwen pointA and pointB with mix of negative and positive`, () => {
18
+ expect(
19
+ getVectorDifference(
20
+ { x: -1.0, y: -2.0, z: -3.0 },
21
+ { x: 1.0, y: 2.0, z: 3.0 }
22
+ )
23
+ ).toEqual({ x: -2, y: -4, z: -6 })
24
+ })
25
+ })
@@ -0,0 +1,21 @@
1
+ import { getVectorSum } from '../getVectorSum'
2
+
3
+ describe('getVectorSum', () => {
4
+ it(`should calculate sum betwen pointA and pointB with integer values`, () => {
5
+ expect(getVectorSum({ x: 1, y: 2, z: 3 }, { x: 1, y: 2, z: 3 })).toEqual({
6
+ x: 2,
7
+ y: 4,
8
+ z: 6,
9
+ })
10
+ })
11
+ it(`should calculate sum betwen pointA and pointB with decimal values`, () => {
12
+ expect(
13
+ getVectorSum({ x: 1.0, y: 2.0, z: 3.0 }, { x: 1.0, y: 2.0, z: 3.0 })
14
+ ).toEqual({ x: 2, y: 4, z: 6 })
15
+ })
16
+ it(`should calculate sum betwen pointA and pointB with mix of negative and positive`, () => {
17
+ expect(
18
+ getVectorSum({ x: -1.0, y: -2.0, z: -3.0 }, { x: 1.0, y: 2.0, z: 3.0 })
19
+ ).toEqual({ x: 0, y: 0, z: 0 })
20
+ })
21
+ })
@@ -0,0 +1,84 @@
1
+ import { getIfConsistent, getSpacingIfUniform } from '../labwareInference'
2
+
3
+ describe('getSpacingIfUniform', () => {
4
+ const testCases = [
5
+ {
6
+ testLabel: '1 well case: return 0',
7
+ wells: [{ x: 10 }],
8
+ expected: 0,
9
+ },
10
+ {
11
+ testLabel: '2 well case',
12
+ wells: [{ x: 10 }, { x: 20 }],
13
+ expected: 10,
14
+ },
15
+ {
16
+ testLabel:
17
+ '2 well case with overlapping wells (eg, single-column labware): return 0',
18
+ wells: [{ x: 10 }, { x: 10 }],
19
+ expected: 0,
20
+ },
21
+ {
22
+ testLabel: '3 well case',
23
+ wells: [{ x: 0 }, { x: 25 }, { x: 50 }],
24
+ expected: 25,
25
+ },
26
+ {
27
+ testLabel:
28
+ '3 well case with overlapping wells (eg, single-column labware): return 0',
29
+ wells: [{ x: 10 }, { x: 10 }, { x: 10 }],
30
+ expected: 0,
31
+ },
32
+ {
33
+ testLabel: '3 well case: out of order is non-uniform, return null',
34
+ wells: [{ x: 50 }, { x: 0 }, { x: 25 }],
35
+ expected: null,
36
+ },
37
+ {
38
+ testLabel: '3 well case: non-uniform with some duplicate values',
39
+ wells: [
40
+ { x: 0 },
41
+ { x: 25 },
42
+ { x: 25, spam: 'spam' },
43
+ { x: 50 },
44
+ { x: 50, foo: 'foo' },
45
+ ],
46
+ expected: 25,
47
+ },
48
+ {
49
+ testLabel: 'returns null if wells have irregular spacing',
50
+ wells: [{ x: 10 }, { x: 20 }, { x: 21 }],
51
+ expected: null,
52
+ },
53
+ {
54
+ testLabel: 'returns 0 with no wells',
55
+ wells: [],
56
+ expected: 0,
57
+ },
58
+ ]
59
+ testCases.forEach(({ wells, expected, testLabel }) =>
60
+ it(testLabel, () =>
61
+ expect(getSpacingIfUniform(wells as any[], 'x')).toBe(expected)
62
+ )
63
+ )
64
+ })
65
+
66
+ describe('getIfConsistent', () => {
67
+ it('deep equal', () => {
68
+ const items = [
69
+ { a: 123, b: [1, 2, [3]] },
70
+ { a: 123, b: [1, 2, [3]] },
71
+ { a: 123, b: [1, 2, [3]] },
72
+ ]
73
+ expect(getIfConsistent(items)).toEqual(items[0])
74
+ })
75
+
76
+ it('deep difference', () => {
77
+ const items = [
78
+ { a: 123, b: [1, 2, [3]] },
79
+ { a: 123, b: [1, 2, [999999]] },
80
+ { a: 123, b: [1, 2, [3]] },
81
+ ]
82
+ expect(getIfConsistent(items)).toBe(null)
83
+ })
84
+ })
@@ -0,0 +1,87 @@
1
+ import { orderWells } from '../orderWells'
2
+ import type { WellOrderOption } from '../orderWells'
3
+
4
+ describe('orderWells', () => {
5
+ const orderTuples: Array<[WellOrderOption, WellOrderOption]> = [
6
+ ['t2b', 'l2r'],
7
+ ['t2b', 'r2l'],
8
+ ['b2t', 'l2r'],
9
+ ['b2t', 'r2l'],
10
+ ['l2r', 't2b'],
11
+ ['l2r', 'b2t'],
12
+ ['r2l', 't2b'],
13
+ ['r2l', 'b2t'],
14
+ ]
15
+
16
+ describe('regular labware', () => {
17
+ const regularOrdering = [
18
+ ['A1', 'B1'],
19
+ ['A2', 'B2'],
20
+ ]
21
+ const regularAnswerMap: Record<
22
+ WellOrderOption,
23
+ Partial<Record<WellOrderOption, string[]>>
24
+ > = {
25
+ t2b: {
26
+ l2r: ['A1', 'B1', 'A2', 'B2'],
27
+ r2l: ['A2', 'B2', 'A1', 'B1'],
28
+ },
29
+ b2t: {
30
+ l2r: ['B1', 'A1', 'B2', 'A2'],
31
+ r2l: ['B2', 'A2', 'B1', 'A1'],
32
+ },
33
+ l2r: {
34
+ t2b: ['A1', 'A2', 'B1', 'B2'],
35
+ b2t: ['B1', 'B2', 'A1', 'A2'],
36
+ },
37
+ r2l: {
38
+ t2b: ['A2', 'A1', 'B2', 'B1'],
39
+ b2t: ['B2', 'B1', 'A2', 'A1'],
40
+ },
41
+ }
42
+ orderTuples.forEach(tuple => {
43
+ it(`first ${tuple[0]} then ${tuple[1]}`, () => {
44
+ expect(orderWells(regularOrdering, ...tuple)).toEqual(
45
+ regularAnswerMap[tuple[0]][tuple[1]]
46
+ )
47
+ })
48
+ })
49
+ describe('irregular labware', () => {
50
+ const irregularOrdering = [
51
+ ['A1', 'B1'],
52
+ ['A2', 'B2', 'C2'],
53
+ ['A3'],
54
+ ['A4', 'B4', 'C4', 'D4'],
55
+ ]
56
+ const irregularAnswerMap: Record<
57
+ WellOrderOption,
58
+ Partial<Record<WellOrderOption, string[]>>
59
+ > = {
60
+ t2b: {
61
+ l2r: ['A1', 'B1', 'A2', 'B2', 'C2', 'A3', 'A4', 'B4', 'C4', 'D4'],
62
+ r2l: ['A4', 'B4', 'C4', 'D4', 'A3', 'A2', 'B2', 'C2', 'A1', 'B1'],
63
+ },
64
+ b2t: {
65
+ l2r: ['B1', 'A1', 'C2', 'B2', 'A2', 'A3', 'D4', 'C4', 'B4', 'A4'],
66
+ r2l: ['D4', 'C4', 'B4', 'A4', 'A3', 'C2', 'B2', 'A2', 'B1', 'A1'],
67
+ },
68
+ l2r: {
69
+ t2b: ['A1', 'A2', 'A3', 'A4', 'B1', 'B2', 'B4', 'C2', 'C4', 'D4'],
70
+ b2t: ['D4', 'C2', 'C4', 'B1', 'B2', 'B4', 'A1', 'A2', 'A3', 'A4'],
71
+ },
72
+ r2l: {
73
+ t2b: ['A4', 'A3', 'A2', 'A1', 'B4', 'B2', 'B1', 'C4', 'C2', 'D4'],
74
+ b2t: ['D4', 'C4', 'C2', 'B4', 'B2', 'B1', 'A4', 'A3', 'A2', 'A1'],
75
+ },
76
+ }
77
+
78
+ orderTuples.forEach(tuple => {
79
+ it(`first ${tuple[0]} then ${tuple[1]}`, () => {
80
+ expect(orderWells(irregularOrdering, ...tuple)).toEqual(
81
+ irregularAnswerMap[tuple[0]][tuple[1]]
82
+ )
83
+ })
84
+ })
85
+ })
86
+ })
87
+ })
@@ -0,0 +1,165 @@
1
+ // json protocol file validator tests
2
+ import fixtureV1JsonProtocol from '../../../protocol/fixtures/1/simple.json'
3
+ import fixtureV3JsonProtocol from '../../../protocol/fixtures/3/simple.json'
4
+ import fixtureV4JsonProtocol from '../../../protocol/fixtures/4/simpleV4.json'
5
+ import fixtureV5JsonProtocol from '../../../protocol/fixtures/5/simpleV5.json'
6
+ import {
7
+ fileExtensionIsPython,
8
+ fileExtensionIsJson,
9
+ fileExtensionIsZip,
10
+ validateJsonProtocolFileContents,
11
+ parseProtocolData,
12
+ } from '../parseProtocolData'
13
+
14
+ describe('validateJsonProtocolFileContents', () => {
15
+ let handleError: jest.MockedFunction<any>
16
+ // beforeAll
17
+
18
+ beforeEach(() => {
19
+ handleError = jest.fn()
20
+ })
21
+
22
+ afterEach(() => {
23
+ jest.resetAllMocks()
24
+ })
25
+
26
+ it(`should validate schemaV3 JSON protocol`, () => {
27
+ const data = validateJsonProtocolFileContents(
28
+ JSON.stringify(fixtureV3JsonProtocol)
29
+ )
30
+ expect(data).toStrictEqual(fixtureV3JsonProtocol)
31
+ })
32
+
33
+ it(`should validate schemaV4 JSON protocol`, () => {
34
+ const data = validateJsonProtocolFileContents(
35
+ JSON.stringify(fixtureV4JsonProtocol)
36
+ )
37
+ expect(data).toStrictEqual(fixtureV4JsonProtocol)
38
+ })
39
+
40
+ it(`should validate schemaV5 JSON protocol`, () => {
41
+ const data = validateJsonProtocolFileContents(
42
+ JSON.stringify(fixtureV5JsonProtocol)
43
+ )
44
+ expect(data).toStrictEqual(fixtureV5JsonProtocol)
45
+ })
46
+
47
+ it('should call handleError with INVALID_FILE_TYPE if empty json', () => {
48
+ validateJsonProtocolFileContents('[]', handleError)
49
+ expect(handleError).toBeCalledWith('INVALID_JSON_FILE', {
50
+ rawError: expect.any(Error),
51
+ })
52
+ })
53
+
54
+ it('should call handleError with INVALID_JSON_FILE if json does not validate against schema', () => {
55
+ validateJsonProtocolFileContents(
56
+ JSON.stringify(fixtureV1JsonProtocol),
57
+ handleError
58
+ )
59
+ expect(handleError).toBeCalledWith('INVALID_JSON_FILE', {
60
+ schemaErrors: expect.any(Array),
61
+ })
62
+ })
63
+
64
+ it('should call handleError with INVALID_JSON_FILE if json is not parseable', () => {
65
+ const parseSpy = jest.spyOn(JSON, 'parse')
66
+ parseSpy.mockImplementation(() => {
67
+ throw new Error('not parseable as JSON')
68
+ })
69
+ validateJsonProtocolFileContents('[]', handleError)
70
+ expect(handleError).toBeCalledWith('INVALID_JSON_FILE', {
71
+ rawError: expect.any(Error),
72
+ })
73
+ parseSpy.mockRestore()
74
+ })
75
+ })
76
+
77
+ describe('file extension validators', () => {
78
+ describe('fileExtensionIsPython', () => {
79
+ it(`should return true if file name ends in .py`, () => {
80
+ expect(fileExtensionIsPython('foo.py')).toBe(true)
81
+ })
82
+ it(`should return false if file name ends in anything other than .py`, () => {
83
+ expect(fileExtensionIsPython('foo.json')).toBe(false)
84
+ expect(fileExtensionIsPython('foo.zip')).toBe(false)
85
+ expect(fileExtensionIsPython('foo.pie')).toBe(false)
86
+ })
87
+ })
88
+ describe('fileExtensionIsJson', () => {
89
+ it(`should return true if file name ends in .json`, () => {
90
+ expect(fileExtensionIsJson('foo.json')).toBe(true)
91
+ })
92
+ it(`should return false if file name ends in anything other than .json`, () => {
93
+ expect(fileExtensionIsJson('foo.py')).toBe(false)
94
+ expect(fileExtensionIsJson('foo.zip')).toBe(false)
95
+ expect(fileExtensionIsJson('foo.pie')).toBe(false)
96
+ })
97
+ })
98
+ describe('fileExtensionIsZip', () => {
99
+ it(`should return true if file name ends in .zip`, () => {
100
+ expect(fileExtensionIsZip('foo.zip')).toBe(true)
101
+ })
102
+ it(`should return false if file name ends in anything other than .zip`, () => {
103
+ expect(fileExtensionIsZip('foo.py')).toBe(false)
104
+ expect(fileExtensionIsZip('foo.json')).toBe(false)
105
+ expect(fileExtensionIsZip('foo.pie')).toBe(false)
106
+ })
107
+ })
108
+ describe('fileIsBinary', () => {
109
+ it(`should return true if file name ends in .zip`, () => {
110
+ expect(fileExtensionIsZip('foo.zip')).toBe(true)
111
+ })
112
+ it(`should return false if file name ends in anything other than .zip`, () => {
113
+ expect(fileExtensionIsZip('foo.py')).toBe(false)
114
+ expect(fileExtensionIsZip('foo.json')).toBe(false)
115
+ expect(fileExtensionIsZip('foo.pie')).toBe(false)
116
+ })
117
+ })
118
+ })
119
+
120
+ describe('parseProtocolData', () => {
121
+ let handleError: jest.MockedFunction<any>
122
+ beforeEach(() => {
123
+ handleError = jest.fn()
124
+ })
125
+
126
+ afterEach(() => {
127
+ jest.resetAllMocks()
128
+ })
129
+
130
+ it(`should return null if not JSON and metadata not given`, () => {
131
+ const contents = 'from math import sqrt'
132
+ const pythonFile = new File([contents], 'foo.py')
133
+ expect(parseProtocolData(pythonFile, contents)).toBe(null)
134
+ })
135
+ it(`should return metadata if not JSON and metadata is given`, () => {
136
+ const contents = 'from math import sqrt'
137
+ const pythonFile = new File([contents], 'foo.py')
138
+ const metadata = {
139
+ 'protocol-name': 'Foo Extraction',
140
+ author: 'Dr. Bar Baz',
141
+ } as any
142
+ expect(
143
+ parseProtocolData(pythonFile, contents, handleError, metadata)
144
+ ).toStrictEqual({ metadata })
145
+ })
146
+ it(`should return JSON protocol file if valid json protocol given`, () => {
147
+ const contents = JSON.stringify(fixtureV5JsonProtocol)
148
+ const jsonFile = new File([contents], 'valid.json')
149
+ expect(parseProtocolData(jsonFile, contents, handleError)).toStrictEqual(
150
+ fixtureV5JsonProtocol
151
+ )
152
+ })
153
+ it(`should call handleError if given JSON protocol not valid`, () => {
154
+ const contents = JSON.stringify(fixtureV1JsonProtocol)
155
+ const jsonFile = new File([contents], 'invalid.json')
156
+ expect(parseProtocolData(jsonFile, contents, handleError)).toBe(null)
157
+ expect(handleError).toHaveBeenCalled()
158
+ })
159
+ it(`should call handleError if given invalid file extension`, () => {
160
+ const contents = JSON.stringify(fixtureV1JsonProtocol)
161
+ const jsonFile = new File([contents], 'invalid.foobar')
162
+ expect(parseProtocolData(jsonFile, contents, handleError)).toBe(null)
163
+ expect(handleError).toHaveBeenCalledWith('INVALID_FILE_TYPE')
164
+ })
165
+ })