@opentrons/shared-data 0.1.7-alpha.0 → 0.2.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 (372) hide show
  1. package/.coveragerc +4 -0
  2. package/.flake8 +31 -0
  3. package/Config.in +11 -0
  4. package/LICENSE +202 -0
  5. package/Makefile +13 -14
  6. package/Makefile-python.mk +134 -0
  7. package/buildroot.mk +35 -0
  8. package/command/index.ts +16 -2
  9. package/command/schemas/12.json +65 -0
  10. package/command/schemas/13.json +7039 -0
  11. package/command/schemas/14.json +7254 -0
  12. package/command/types/annotation.ts +1 -1
  13. package/command/types/calibration.ts +7 -6
  14. package/command/types/gantry.ts +7 -6
  15. package/command/types/incidental.ts +1 -1
  16. package/command/types/index.ts +79 -20
  17. package/command/types/module.ts +98 -11
  18. package/command/types/pipetting.ts +9 -3
  19. package/command/types/robot.ts +98 -0
  20. package/command/types/setup.ts +8 -8
  21. package/command/types/support.ts +14 -2
  22. package/command/types/timing.ts +1 -1
  23. package/command/types/unsafe.ts +63 -1
  24. package/deck/definitions/5/ot2_short_trash.json +37 -0
  25. package/deck/definitions/5/ot2_standard.json +37 -0
  26. package/deck/definitions/5/ot3_standard.json +152 -51
  27. package/deck/index.ts +3 -6
  28. package/deck/schemas/5.json +46 -1
  29. package/errors/definitions/1/errors.json +12 -0
  30. package/errors/index.ts +2 -1
  31. package/labware/definitions/2/agilent_1_reservoir_290ml/3.json +80 -0
  32. package/labware/definitions/2/appliedbiosystemsmicroamp_384_wellplate_40ul/3.json +4737 -0
  33. package/labware/definitions/2/axygen_96_wellplate_500ul/1.json +1036 -0
  34. package/labware/definitions/2/axygen_96_wellplate_500ul/2.json +1159 -0
  35. package/labware/definitions/2/biorad_384_wellplate_50ul/4.json +4748 -0
  36. package/labware/definitions/2/biorad_96_wellplate_200ul_pcr/4.json +1187 -0
  37. package/labware/definitions/2/corning_12_wellplate_6.9ml_flat/4.json +210 -0
  38. package/labware/definitions/2/corning_24_wellplate_3.4ml_flat/4.json +342 -0
  39. package/labware/definitions/2/corning_384_wellplate_112ul_flat/4.json +5116 -0
  40. package/labware/definitions/2/corning_48_wellplate_1.6ml_flat/4.json +605 -0
  41. package/labware/definitions/2/corning_48_wellplate_1.6ml_flat/5.json +610 -0
  42. package/labware/definitions/2/corning_6_wellplate_16.8ml_flat/4.json +134 -0
  43. package/labware/definitions/2/corning_96_wellplate_360ul_flat/4.json +1177 -0
  44. package/labware/definitions/2/corning_96_wellplate_360ul_lid/1.json +111 -0
  45. package/labware/definitions/2/ev_resin_tips_flex_96_labware/1.json +1 -1
  46. package/labware/definitions/2/ibidi_96_square_well_plate_300ul/1.json +1105 -0
  47. package/labware/definitions/2/ibidi_96_square_well_plate_300ul/2.json +1216 -0
  48. package/labware/definitions/2/ibidi_96_square_well_plate_300ul_lid/1.json +110 -0
  49. package/labware/definitions/2/nest_12_reservoir_22ml/1.json +232 -0
  50. package/labware/definitions/2/nest_1_reservoir_290ml/3.json +80 -0
  51. package/labware/definitions/2/nest_24_wellplate_10.4ml/1.json +386 -0
  52. package/labware/definitions/2/nest_8_reservoir_22ml/1.json +162 -0
  53. package/labware/definitions/2/nest_96_wellplate_100ul_pcr_full_skirt/4.json +1166 -0
  54. package/labware/definitions/2/nest_96_wellplate_200ul_flat/4.json +1145 -0
  55. package/labware/definitions/2/nest_96_wellplate_2ml_deep/4.json +1261 -0
  56. package/labware/definitions/2/opentrons_24_aluminumblock_nest_0.5ml_screwcap/3.json +370 -0
  57. package/labware/definitions/2/opentrons_24_tuberack_nest_0.5ml_screwcap/3.json +371 -0
  58. package/labware/definitions/2/opentrons_96_aluminumblock_generic_pcr_strip_200ul/4.json +1149 -0
  59. package/labware/definitions/2/opentrons_96_wellplate_200ul_pcr_full_skirt/4.json +1174 -0
  60. package/labware/definitions/2/opentrons_flex_96_filtertiprack_1000ul/1.json +5 -0
  61. package/labware/definitions/2/opentrons_flex_96_filtertiprack_200ul/1.json +5 -0
  62. package/labware/definitions/2/opentrons_flex_96_filtertiprack_20ul/1.json +5 -0
  63. package/labware/definitions/2/opentrons_flex_96_filtertiprack_50ul/1.json +5 -0
  64. package/labware/definitions/2/opentrons_flex_96_tiprack_1000ul/1.json +5 -0
  65. package/labware/definitions/2/opentrons_flex_96_tiprack_200ul/1.json +5 -0
  66. package/labware/definitions/2/opentrons_flex_96_tiprack_20ul/1.json +5 -0
  67. package/labware/definitions/2/opentrons_flex_96_tiprack_50ul/1.json +5 -0
  68. package/labware/definitions/2/opentrons_flex_tiprack_lid/1.json +15 -9
  69. package/labware/definitions/2/opentrons_tough_pcr_auto_sealing_lid/1.json +8 -0
  70. package/labware/definitions/2/opentrons_tough_universal_lid/1.json +16 -1
  71. package/labware/definitions/2/smc_384_read_plate/1.json +4701 -0
  72. package/labware/definitions/2/smc_384_read_plate/2.json +5100 -0
  73. package/labware/definitions/2/thermoscientificnunc_96_wellplate_1300ul/3.json +1141 -0
  74. package/labware/definitions/2/thermoscientificnunc_96_wellplate_2000ul/3.json +1141 -0
  75. package/labware/definitions/2/usascientific_12_reservoir_22ml/3.json +237 -0
  76. package/labware/definitions/2/usascientific_96_wellplate_2.4ml_deep/3.json +1243 -0
  77. package/labware/definitions/3/schema3test_96_well_aluminum_block/999.json +1050 -0
  78. package/labware/definitions/3/schema3test_96_wellplate_200ul_pcr_full_skirt/999.json +1202 -0
  79. package/labware/definitions/3/schema3test_aluminum_flat_bottom_plate/999.json +70 -0
  80. package/labware/definitions/3/schema3test_flex_96_tiprack_200ul/999.json +1037 -0
  81. package/labware/definitions/3/schema3test_flex_96_tiprack_adapter/999.json +70 -0
  82. package/labware/definitions/3/schema3test_flex_tiprack_lid/999.json +146 -0
  83. package/labware/definitions/3/schema3test_tough_pcr_auto_sealing_lid/999.json +162 -0
  84. package/labware/definitions/3/schema3test_universal_flat_adapter/999.json +157 -0
  85. package/labware/fixtures/2/fixture_user_volumes_prototype.json +1137 -0
  86. package/labware/fixtures/2/index.ts +4 -4
  87. package/labware/fixtures/3/fixture_2_plate.json +28 -11
  88. package/labware/fixtures/3/fixture_corning_24_plate.json +51 -34
  89. package/labware/fixtures/3/index.ts +4 -0
  90. package/labware/schemas/2.json +36 -1
  91. package/labware/schemas/3.json +115 -25
  92. package/lib/command/index.d.ts +4211 -2095
  93. package/lib/command/schemas/12.json +65 -0
  94. package/lib/command/schemas/13.json +7039 -0
  95. package/lib/command/schemas/14.json +7254 -0
  96. package/lib/command/types/annotation.d.ts +1 -1
  97. package/lib/command/types/calibration.d.ts +5 -5
  98. package/lib/command/types/gantry.d.ts +5 -4
  99. package/lib/command/types/incidental.d.ts +1 -1
  100. package/lib/command/types/index.d.ts +60 -14
  101. package/lib/command/types/module.d.ts +75 -13
  102. package/lib/command/types/pipetting.d.ts +8 -3
  103. package/lib/command/types/robot.d.ts +71 -0
  104. package/lib/command/types/setup.d.ts +5 -5
  105. package/lib/command/types/support.d.ts +3 -2
  106. package/lib/command/types/timing.d.ts +1 -1
  107. package/lib/command/types/unsafe.d.ts +44 -3
  108. package/lib/deck/definitions/5/ot2_short_trash.json +37 -0
  109. package/lib/deck/definitions/5/ot2_standard.json +37 -0
  110. package/lib/deck/definitions/5/ot3_standard.json +152 -51
  111. package/lib/deck/index.d.ts +3 -3
  112. package/lib/deck/schemas/5.json +46 -1
  113. package/lib/errors/definitions/1/errors.json +12 -0
  114. package/lib/errors/index.d.ts +1 -1
  115. package/lib/index.mjs +380872 -297265
  116. package/lib/js/constants.d.ts +45 -17
  117. package/lib/js/deck/index.d.ts +2 -2
  118. package/lib/js/fixtures.d.ts +78 -3
  119. package/lib/js/getLabware.d.ts +3 -3
  120. package/lib/js/gripper.d.ts +1 -1
  121. package/lib/js/helpers/__tests__/getMaxPushOutVolume.test.d.ts +1 -0
  122. package/lib/js/helpers/__tests__/getMmFromBottom.test.d.ts +1 -0
  123. package/lib/js/helpers/__tests__/getStackedItemsOnStartingDeck.test.d.ts +1 -0
  124. package/lib/js/helpers/__tests__/labwareSchemaShims.test.d.ts +1 -0
  125. package/lib/js/helpers/__tests__/liquidClasses.test.d.ts +1 -0
  126. package/lib/js/helpers/__tests__/pairsFromArray.test.d.ts +1 -0
  127. package/lib/js/helpers/__tests__/vectorMath.test.d.ts +1 -0
  128. package/lib/js/helpers/getFixedTrashLabwareDefinition.d.ts +2 -2
  129. package/lib/js/helpers/getLabwareDefURI.d.ts +3 -0
  130. package/lib/js/helpers/getLabwareDefinitionsByURIForProtocol.d.ts +6 -0
  131. package/lib/js/helpers/getLabwareInfoByLiquidId.d.ts +10 -0
  132. package/lib/js/helpers/getLiquidsByIdForLabware.d.ts +2 -0
  133. package/lib/js/helpers/getLoadedLabwareDefinitionsByUri.d.ts +2 -2
  134. package/lib/js/helpers/getMaxPushOutVolume.d.ts +2 -0
  135. package/lib/js/helpers/getMmFromBottom.d.ts +2 -0
  136. package/lib/js/helpers/getSimplestFlexDeckConfig.d.ts +1 -1
  137. package/lib/js/helpers/getStackedItemsOnStartingDeck.d.ts +50 -0
  138. package/lib/js/helpers/getStandardDeckViewLayerBlockList.d.ts +2 -0
  139. package/lib/js/helpers/getTipTypeFromTipRackDefinition.d.ts +2 -2
  140. package/lib/js/helpers/getWellFillFromLabwareId.d.ts +4 -0
  141. package/lib/js/helpers/getWellNamePerMultiTip.d.ts +3 -3
  142. package/lib/js/helpers/getWellRangeForLiquidLabwarePair.d.ts +6 -0
  143. package/lib/js/helpers/getWellTotalVolume.d.ts +2 -2
  144. package/lib/js/helpers/index.d.ts +25 -14
  145. package/lib/js/helpers/labwareInference.d.ts +3 -3
  146. package/lib/js/helpers/liquidClasses.d.ts +10 -0
  147. package/lib/js/helpers/matrixMath.d.ts +3 -0
  148. package/lib/js/helpers/pairsFromArray.d.ts +8 -0
  149. package/lib/js/helpers/parseAddressableArea.d.ts +1 -1
  150. package/lib/js/helpers/parseProtocolCommands.d.ts +5 -5
  151. package/lib/js/helpers/positionMath.d.ts +127 -0
  152. package/lib/js/helpers/validateCustomLabwareHelper.d.ts +2 -2
  153. package/lib/js/helpers/vectorMath.d.ts +14 -0
  154. package/lib/js/helpers/wellSets.d.ts +4 -4
  155. package/lib/js/labware.d.ts +10 -9
  156. package/lib/js/labwareTools/index.d.ts +1 -1
  157. package/lib/js/liquidClasses.d.ts +4 -0
  158. package/lib/js/modules.d.ts +2 -2
  159. package/lib/js/pipettes.d.ts +3 -2
  160. package/lib/js/types.d.ts +105 -38
  161. package/lib/labware/definitions/2/agilent_1_reservoir_290ml/3.json +80 -0
  162. package/lib/labware/definitions/2/appliedbiosystemsmicroamp_384_wellplate_40ul/3.json +4737 -0
  163. package/lib/labware/definitions/2/axygen_96_wellplate_500ul/1.json +1036 -0
  164. package/lib/labware/definitions/2/axygen_96_wellplate_500ul/2.json +1159 -0
  165. package/lib/labware/definitions/2/biorad_384_wellplate_50ul/4.json +4748 -0
  166. package/lib/labware/definitions/2/biorad_96_wellplate_200ul_pcr/4.json +1187 -0
  167. package/lib/labware/definitions/2/corning_12_wellplate_6.9ml_flat/4.json +210 -0
  168. package/lib/labware/definitions/2/corning_24_wellplate_3.4ml_flat/4.json +342 -0
  169. package/lib/labware/definitions/2/corning_384_wellplate_112ul_flat/4.json +5116 -0
  170. package/lib/labware/definitions/2/corning_48_wellplate_1.6ml_flat/4.json +605 -0
  171. package/lib/labware/definitions/2/corning_48_wellplate_1.6ml_flat/5.json +610 -0
  172. package/lib/labware/definitions/2/corning_6_wellplate_16.8ml_flat/4.json +134 -0
  173. package/lib/labware/definitions/2/corning_96_wellplate_360ul_flat/4.json +1177 -0
  174. package/lib/labware/definitions/2/corning_96_wellplate_360ul_lid/1.json +111 -0
  175. package/lib/labware/definitions/2/ev_resin_tips_flex_96_labware/1.json +1 -1
  176. package/lib/labware/definitions/2/ibidi_96_square_well_plate_300ul/1.json +1105 -0
  177. package/lib/labware/definitions/2/ibidi_96_square_well_plate_300ul/2.json +1216 -0
  178. package/lib/labware/definitions/2/ibidi_96_square_well_plate_300ul_lid/1.json +110 -0
  179. package/lib/labware/definitions/2/nest_12_reservoir_22ml/1.json +232 -0
  180. package/lib/labware/definitions/2/nest_1_reservoir_290ml/3.json +80 -0
  181. package/lib/labware/definitions/2/nest_24_wellplate_10.4ml/1.json +386 -0
  182. package/lib/labware/definitions/2/nest_8_reservoir_22ml/1.json +162 -0
  183. package/lib/labware/definitions/2/nest_96_wellplate_100ul_pcr_full_skirt/4.json +1166 -0
  184. package/lib/labware/definitions/2/nest_96_wellplate_200ul_flat/4.json +1145 -0
  185. package/lib/labware/definitions/2/nest_96_wellplate_2ml_deep/4.json +1261 -0
  186. package/lib/labware/definitions/2/opentrons_24_aluminumblock_nest_0.5ml_screwcap/3.json +370 -0
  187. package/lib/labware/definitions/2/opentrons_24_tuberack_nest_0.5ml_screwcap/3.json +371 -0
  188. package/lib/labware/definitions/2/opentrons_96_aluminumblock_generic_pcr_strip_200ul/4.json +1149 -0
  189. package/lib/labware/definitions/2/opentrons_96_wellplate_200ul_pcr_full_skirt/4.json +1174 -0
  190. package/lib/labware/definitions/2/opentrons_flex_96_filtertiprack_1000ul/1.json +5 -0
  191. package/lib/labware/definitions/2/opentrons_flex_96_filtertiprack_200ul/1.json +5 -0
  192. package/lib/labware/definitions/2/opentrons_flex_96_filtertiprack_20ul/1.json +5 -0
  193. package/lib/labware/definitions/2/opentrons_flex_96_filtertiprack_50ul/1.json +5 -0
  194. package/lib/labware/definitions/2/opentrons_flex_96_tiprack_1000ul/1.json +5 -0
  195. package/lib/labware/definitions/2/opentrons_flex_96_tiprack_200ul/1.json +5 -0
  196. package/lib/labware/definitions/2/opentrons_flex_96_tiprack_20ul/1.json +5 -0
  197. package/lib/labware/definitions/2/opentrons_flex_96_tiprack_50ul/1.json +5 -0
  198. package/lib/labware/definitions/2/opentrons_flex_tiprack_lid/1.json +15 -9
  199. package/lib/labware/definitions/2/opentrons_tough_pcr_auto_sealing_lid/1.json +8 -0
  200. package/lib/labware/definitions/2/opentrons_tough_universal_lid/1.json +16 -1
  201. package/lib/labware/definitions/2/smc_384_read_plate/1.json +4701 -0
  202. package/lib/labware/definitions/2/smc_384_read_plate/2.json +5100 -0
  203. package/lib/labware/definitions/2/thermoscientificnunc_96_wellplate_1300ul/3.json +1141 -0
  204. package/lib/labware/definitions/2/thermoscientificnunc_96_wellplate_2000ul/3.json +1141 -0
  205. package/lib/labware/definitions/2/usascientific_12_reservoir_22ml/3.json +237 -0
  206. package/lib/labware/definitions/2/usascientific_96_wellplate_2.4ml_deep/3.json +1243 -0
  207. package/lib/labware/definitions/3/schema3test_96_well_aluminum_block/999.json +1050 -0
  208. package/lib/labware/definitions/3/schema3test_96_wellplate_200ul_pcr_full_skirt/999.json +1202 -0
  209. package/lib/labware/definitions/3/schema3test_aluminum_flat_bottom_plate/999.json +70 -0
  210. package/lib/labware/definitions/3/schema3test_flex_96_tiprack_200ul/999.json +1037 -0
  211. package/lib/labware/definitions/3/schema3test_flex_96_tiprack_adapter/999.json +70 -0
  212. package/lib/labware/definitions/3/schema3test_flex_tiprack_lid/999.json +146 -0
  213. package/lib/labware/definitions/3/schema3test_tough_pcr_auto_sealing_lid/999.json +162 -0
  214. package/lib/labware/definitions/3/schema3test_universal_flat_adapter/999.json +157 -0
  215. package/lib/labware/fixtures/2/fixture_user_volumes_prototype.json +1137 -0
  216. package/lib/labware/fixtures/2/index.d.ts +4 -4
  217. package/lib/labware/fixtures/3/fixture_2_plate.json +28 -11
  218. package/lib/labware/fixtures/3/fixture_corning_24_plate.json +51 -34
  219. package/lib/labware/fixtures/3/index.d.ts +3 -0
  220. package/lib/labware/schemas/2.json +36 -1
  221. package/lib/labware/schemas/3.json +115 -25
  222. package/lib/liquid-class/definitions/1/{ethanol_80.json → ethanol_80/1.json} +1957 -1406
  223. package/lib/liquid-class/definitions/1/{glycerol_50.json → glycerol_50/1.json} +1781 -1230
  224. package/lib/liquid-class/definitions/1/{water.json → water/1.json} +1567 -1082
  225. package/lib/liquid-class/fixtures/1/fixture_glycerol50.json +67 -48
  226. package/lib/liquid-class/schemas/1.json +40 -48
  227. package/lib/module/definitions/3/absorbanceReaderV1.json +20 -150
  228. package/lib/module/definitions/3/flexStackerModuleV1.json +31 -385
  229. package/lib/module/definitions/3/heaterShakerModuleV1.json +16 -357
  230. package/lib/module/definitions/3/magneticBlockV1.json +18 -148
  231. package/lib/module/definitions/3/magneticModuleV1.json +16 -398
  232. package/lib/module/definitions/3/magneticModuleV2.json +16 -398
  233. package/lib/module/definitions/3/temperatureModuleV1.json +16 -152
  234. package/lib/module/definitions/3/temperatureModuleV2.json +16 -152
  235. package/lib/module/definitions/3/thermocyclerModuleV1.json +16 -1339
  236. package/lib/module/definitions/3/thermocyclerModuleV2.json +18 -3616
  237. package/lib/module/schemas/3.json +111 -10
  238. package/lib/pipette/definitions/1/pipetteModelSpecs.json +336 -0
  239. package/lib/pipette/definitions/2/general/ninety_six_channel/p200/3_2.json +660 -0
  240. package/lib/pipette/definitions/2/geometry/eight_channel/p50/3_5.json +4 -0
  241. package/lib/pipette/definitions/2/geometry/ninety_six_channel/p200/3_0.json +4 -0
  242. package/lib/pipette/definitions/2/geometry/ninety_six_channel/p200/3_2.json +309 -0
  243. package/lib/pipette/definitions/2/geometry/single_channel/p50/3_6.json +4 -0
  244. package/lib/pipette/definitions/2/liquid/ninety_six_channel/p200/default/1_0.json +11 -11
  245. package/lib/pipette/definitions/2/liquid/ninety_six_channel/p200/default/3_0.json +12 -12
  246. package/lib/pipette/definitions/2/liquid/ninety_six_channel/p200/default/3_1.json +28 -18
  247. package/lib/pipette/definitions/2/liquid/ninety_six_channel/p200/default/3_2.json +192 -0
  248. package/lib/pipette/definitions/2/liquid/single_channel/p50/default/3_6.json +5 -5
  249. package/lib/pipette/definitions/2/liquid/single_channel/p50/lowVolumeDefault/3_6.json +5 -5
  250. package/lib/pipette/fixtures/name/index.d.ts +1 -1
  251. package/lib/protocol/fixtures/index.d.ts +2 -2
  252. package/lib/protocol/index.d.ts +7 -7
  253. package/lib/protocol/types/schemaV4.d.ts +1 -1
  254. package/lib/protocol/types/schemaV5.d.ts +1 -1
  255. package/lib/protocol/types/schemaV5Addendum.d.ts +1 -1
  256. package/lib/protocol/types/schemaV6/command/gantry.d.ts +4 -4
  257. package/lib/protocol/types/schemaV6/command/index.d.ts +5 -5
  258. package/lib/protocol/types/schemaV6/command/module.d.ts +1 -1
  259. package/lib/protocol/types/schemaV6/command/pipetting.d.ts +1 -1
  260. package/lib/protocol/types/schemaV6/command/setup.d.ts +1 -1
  261. package/lib/protocol/types/schemaV6/command/timing.d.ts +1 -1
  262. package/lib/protocol/types/schemaV6/index.d.ts +2 -2
  263. package/lib/protocol/types/schemaV7/command/annotation.d.ts +1 -1
  264. package/lib/protocol/types/schemaV7/command/calibration.d.ts +5 -5
  265. package/lib/protocol/types/schemaV7/command/gantry.d.ts +4 -4
  266. package/lib/protocol/types/schemaV7/command/incidental.d.ts +1 -1
  267. package/lib/protocol/types/schemaV7/command/index.d.ts +7 -7
  268. package/lib/protocol/types/schemaV7/command/module.d.ts +1 -1
  269. package/lib/protocol/types/schemaV7/command/pipetting.d.ts +1 -1
  270. package/lib/protocol/types/schemaV7/command/setup.d.ts +1 -1
  271. package/lib/protocol/types/schemaV7/command/timing.d.ts +1 -1
  272. package/lib/protocol/types/schemaV7/index.d.ts +2 -2
  273. package/lib/protocol/types/schemaV8/index.d.ts +18 -2
  274. package/liquid-class/definitions/1/{ethanol_80.json → ethanol_80/1.json} +1957 -1406
  275. package/liquid-class/definitions/1/{glycerol_50.json → glycerol_50/1.json} +1781 -1230
  276. package/liquid-class/definitions/1/{water.json → water/1.json} +1567 -1082
  277. package/liquid-class/fixtures/1/fixture_glycerol50.json +67 -48
  278. package/liquid-class/schemas/1.json +40 -48
  279. package/module/definitions/3/absorbanceReaderV1.json +20 -150
  280. package/module/definitions/3/flexStackerModuleV1.json +31 -385
  281. package/module/definitions/3/heaterShakerModuleV1.json +16 -357
  282. package/module/definitions/3/magneticBlockV1.json +18 -148
  283. package/module/definitions/3/magneticModuleV1.json +16 -398
  284. package/module/definitions/3/magneticModuleV2.json +16 -398
  285. package/module/definitions/3/temperatureModuleV1.json +16 -152
  286. package/module/definitions/3/temperatureModuleV2.json +16 -152
  287. package/module/definitions/3/thermocyclerModuleV1.json +16 -1339
  288. package/module/definitions/3/thermocyclerModuleV2.json +18 -3616
  289. package/module/schemas/3.json +111 -10
  290. package/mypy.ini +22 -0
  291. package/package.json +1 -1
  292. package/pipette/definitions/1/pipetteModelSpecs.json +336 -0
  293. package/pipette/definitions/2/general/ninety_six_channel/p200/3_2.json +660 -0
  294. package/pipette/definitions/2/geometry/eight_channel/p50/3_5.json +4 -0
  295. package/pipette/definitions/2/geometry/ninety_six_channel/p200/3_0.json +4 -0
  296. package/pipette/definitions/2/geometry/ninety_six_channel/p200/3_2.json +309 -0
  297. package/pipette/definitions/2/geometry/single_channel/p50/3_6.json +4 -0
  298. package/pipette/definitions/2/liquid/ninety_six_channel/p200/default/1_0.json +11 -11
  299. package/pipette/definitions/2/liquid/ninety_six_channel/p200/default/3_0.json +12 -12
  300. package/pipette/definitions/2/liquid/ninety_six_channel/p200/default/3_1.json +28 -18
  301. package/pipette/definitions/2/liquid/ninety_six_channel/p200/default/3_2.json +192 -0
  302. package/pipette/definitions/2/liquid/single_channel/p50/default/3_6.json +5 -5
  303. package/pipette/definitions/2/liquid/single_channel/p50/lowVolumeDefault/3_6.json +5 -5
  304. package/pipette/fixtures/index.ts +12 -12
  305. package/pipette/fixtures/name/index.ts +1 -0
  306. package/protocol/fixtures/index.ts +2 -3
  307. package/protocol/index.ts +9 -8
  308. package/protocol/types/schemaV4.ts +4 -4
  309. package/protocol/types/schemaV5.ts +1 -1
  310. package/protocol/types/schemaV5Addendum.ts +1 -1
  311. package/protocol/types/schemaV6/command/gantry.ts +4 -4
  312. package/protocol/types/schemaV6/command/index.ts +6 -6
  313. package/protocol/types/schemaV6/command/module.ts +1 -1
  314. package/protocol/types/schemaV6/command/pipetting.ts +2 -1
  315. package/protocol/types/schemaV6/command/setup.ts +2 -2
  316. package/protocol/types/schemaV6/command/timing.ts +1 -1
  317. package/protocol/types/schemaV6/index.ts +3 -3
  318. package/protocol/types/schemaV7/command/annotation.ts +1 -1
  319. package/protocol/types/schemaV7/command/calibration.ts +7 -6
  320. package/protocol/types/schemaV7/command/gantry.ts +5 -5
  321. package/protocol/types/schemaV7/command/incidental.ts +1 -1
  322. package/protocol/types/schemaV7/command/index.ts +14 -14
  323. package/protocol/types/schemaV7/command/module.ts +1 -1
  324. package/protocol/types/schemaV7/command/pipetting.ts +2 -1
  325. package/protocol/types/schemaV7/command/setup.ts +2 -2
  326. package/protocol/types/schemaV7/command/timing.ts +1 -1
  327. package/protocol/types/schemaV7/index.ts +3 -3
  328. package/protocol/types/schemaV8/index.ts +32 -4
  329. package/pyproject.toml +119 -0
  330. package/pytest.ini +8 -0
  331. package/python_tests/__init__.py +1 -0
  332. package/python_tests/command/test_known_schema_ids.py +9 -0
  333. package/python_tests/conftest.py +108 -0
  334. package/python_tests/deck/__init__.py +0 -0
  335. package/python_tests/deck/test_list_names.py +12 -0
  336. package/python_tests/deck/test_position.py +101 -0
  337. package/python_tests/deck/test_typechecks.py +23 -0
  338. package/python_tests/errors/__init__.py +1 -0
  339. package/python_tests/errors/test_error_completeness.py +19 -0
  340. package/python_tests/errors/test_exceptions.py +74 -0
  341. package/python_tests/gripper/__init__.py +0 -0
  342. package/python_tests/gripper/test_definition.py +30 -0
  343. package/python_tests/gripper/test_load.py +19 -0
  344. package/python_tests/labware/__init__.py +13 -0
  345. package/python_tests/labware/test_typechecks.py +80 -0
  346. package/python_tests/liquid_classes/__init__.py +0 -0
  347. package/python_tests/liquid_classes/test_liquid_class_values.py +59 -0
  348. package/python_tests/liquid_classes/test_load.py +45 -0
  349. package/python_tests/liquid_classes/test_validations.py +192 -0
  350. package/python_tests/module/__init__.py +20 -0
  351. package/python_tests/module/test_load.py +49 -0
  352. package/python_tests/module/test_typechecks.py +26 -0
  353. package/python_tests/pipette/__init__.py +0 -0
  354. package/python_tests/pipette/test_load_data.py +109 -0
  355. package/python_tests/pipette/test_max_flow_rates_per_volume.py +112 -0
  356. package/python_tests/pipette/test_mutable_configurations.py +467 -0
  357. package/python_tests/pipette/test_pipette_definition.py +183 -0
  358. package/python_tests/pipette/test_pipette_load_name_conversions.py +244 -0
  359. package/python_tests/pipette/test_typechecks.py +47 -0
  360. package/python_tests/pipette/test_validate_schema.py +198 -0
  361. package/python_tests/protocol/__init__.py +7 -0
  362. package/python_tests/protocol/test_protocol_schema_v6.py +108 -0
  363. package/python_tests/protocol/test_protocol_schema_v7.py +35 -0
  364. package/python_tests/protocol/test_protocol_schema_v8.py +17 -0
  365. package/python_tests/protocol/test_typechecks.py +30 -0
  366. package/python_tests/robot/__init__.py +0 -0
  367. package/python_tests/robot/test_typechecks.py +13 -0
  368. package/lib/js/cypressUtils.d.ts +0 -1
  369. package/lib/js/helpers/getVectorDifference.d.ts +0 -2
  370. package/lib/js/helpers/getVectorSum.d.ts +0 -2
  371. /package/lib/js/{helpers/__tests__/getVectorDifference.test.d.ts → __tests__/fixtures.test.d.ts} +0 -0
  372. /package/lib/js/helpers/__tests__/{getVectorSum.test.d.ts → getLabwareInfoByLiquidId.test.d.ts} +0 -0
package/.coveragerc ADDED
@@ -0,0 +1,4 @@
1
+ [report]
2
+ exclude_lines =
3
+ @overload
4
+ if TYPE_CHECKING:
package/.flake8 ADDED
@@ -0,0 +1,31 @@
1
+ [flake8]
2
+
3
+ extend-exclude = venv .venv
4
+
5
+ # max cyclomatic complexity
6
+ max-complexity = 9
7
+
8
+ extend-ignore =
9
+ # defer formatting concerns to black
10
+ # E203: space around `:` operator
11
+ # E501: maximum line length
12
+ E203,
13
+ E501,
14
+ # do not require type annotations for self nor cls
15
+ ANN101,
16
+ ANN102
17
+
18
+ # configure flake8-docstrings
19
+ # https://pypi.org/project/flake8-docstrings/
20
+ docstring-convention = google
21
+
22
+ noqa-require-code = true
23
+
24
+ per-file-ignores =
25
+ python/opentrons_shared_data/load.py:D
26
+ python/opentrons_shared_data/deck/*:D
27
+ python/opentrons_shared_data/labware/*:D
28
+ python/opentrons_shared_data/module/*:D
29
+ python/opentrons_shared_data/pipette/*:D
30
+ python/opentrons_shared_data/protocol/*:D
31
+ python_tests/*:ANN,D
package/Config.in ADDED
@@ -0,0 +1,11 @@
1
+ config BR2_PACKAGE_PYTHON_OPENTRONS_SHARED_DATA
2
+ bool "python-opentrons-shared-data"
3
+ depends on BR2_PACKAGE_PYTHON3
4
+ select BR2_PACKAGE_PYTHON_JSONSCHEMA # runtime
5
+ select BR2_PACKAGE_PYTHON_TYPING_EXTENSIONS # runtime
6
+ select BR2_PACKAGE_PYTHON_NUMPY # runtime
7
+
8
+ help
9
+ Opentrons data sources. Used on an OT-2 robot.
10
+
11
+ https://opentrons.com
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/Makefile CHANGED
@@ -65,51 +65,51 @@ lint-js-prettier:
65
65
 
66
66
  .PHONY: setup-py
67
67
  setup-py:
68
- $(MAKE) -C python setup-py
68
+ $(MAKE) -f Makefile-python.mk setup-py
69
69
 
70
70
  .PHONY: dist-py
71
71
  dist-py:
72
- $(MAKE) -C python sdist wheel
72
+ $(MAKE) -f Makefile-python.mk sdist wheel
73
73
 
74
74
  .PHONY: clean-py
75
75
  clean-py:
76
- $(MAKE) -C python clean
76
+ $(MAKE) -f Makefile-python.mk clean
77
77
 
78
78
  .PHONY: teardown-py
79
79
  teardown-py:
80
- $(MAKE) -C python teardown
80
+ $(MAKE) -f Makefile-python.mk teardown
81
81
 
82
82
  .PHONY: lint-py
83
83
  lint-py:
84
- $(MAKE) -C python lint
84
+ $(MAKE) -f Makefile-python.mk lint
85
85
 
86
86
  .PHONY: format-py
87
87
  format-py:
88
- $(MAKE) -C python format
88
+ $(MAKE) -f Makefile-python.mk format
89
89
 
90
90
  .PHONY: push-no-restart
91
91
  push-no-restart:
92
- $(MAKE) -C python push-no-restart
92
+ $(MAKE) -f Makefile-python.mk push-no-restart
93
93
 
94
94
  .PHONY: push
95
95
  push:
96
- $(MAKE) -C python push
96
+ $(MAKE) -f Makefile-python.mk push
97
97
 
98
98
  .PHONY: push-no-restart-ot3
99
99
  push-no-restart-ot3:
100
- $(MAKE) -C python push-no-restart-ot3
100
+ $(MAKE) -f Makefile-python.mk push-no-restart-ot3
101
101
 
102
102
  .PHONY: push-ot3
103
103
  push-ot3:
104
- $(MAKE) -C python push-ot3
104
+ $(MAKE) -f Makefile-python.mk push-ot3
105
105
 
106
106
  .PHONY: deploy-py
107
107
  deploy-py:
108
- $(MAKE) -C python deploy
108
+ $(MAKE) -f Makefile-python.mk deploy
109
109
 
110
110
  .PHONY: test-py
111
111
  test-py:
112
- $(MAKE) -C python test
112
+ $(MAKE) -f Makefile-python.mk test
113
113
 
114
114
  .PHONY: test
115
115
  test:
@@ -117,5 +117,4 @@ test:
117
117
 
118
118
  .PHONY: test-cov
119
119
  test-cov:
120
- make -C .. test-js-shared-data tests=$(tests) test_opts="$(test_opts)" cov_opts="$(cov_opts)"
121
-
120
+ $(MAKE) -C .. test-js-shared-data tests=$(tests) test_opts="$(test_opts)" cov_opts="$(cov_opts)"
@@ -0,0 +1,134 @@
1
+ # shared-data python code makefile
2
+
3
+ include ../scripts/python.mk
4
+ include ../scripts/push.mk
5
+
6
+ # Host key location for robot
7
+ ssh_key ?= $(default_ssh_key)
8
+ # Other SSH args for robot
9
+ ssh_opts ?= $(default_ssh_opts)
10
+
11
+ # using bash instead of /bin/bash in SHELL prevents macOS optimizing away our PATH update
12
+ SHELL := bash
13
+
14
+ # add node_modules/.bin to PATH
15
+ PATH := $(shell cd ../ && yarn bin):$(PATH)
16
+
17
+ # This may be set as an environment variable (and is by CI tasks that upload
18
+ # to test pypi) to add a .dev extension to the python package versions. If
19
+ # empty, no .dev extension is appended, so this definition is here only as
20
+ # documentation
21
+ BUILD_NUMBER ?=
22
+
23
+ # this may be set as an environment variable to select the version of
24
+ # python to run if pyenv is not available. it should always be set to
25
+ # point to a python3.6.
26
+ OT_PYTHON ?= python
27
+
28
+ BUILD_DIR := dist
29
+
30
+
31
+ wheel_file = $(BUILD_DIR)/$(call python_get_wheelname,shared-data,$(PROJECT),opentrons_shared_data,$(BUILD_NUMBER),../scripts/python_build_utils.py)
32
+ sdist_file = $(BUILD_DIR)/$(call python_get_sdistname,shared-data,$(PROJECT),opentrons_shared_data,,../scripts/python_build_utils.py)
33
+
34
+ py_sources = $(filter %.py,$(shell $(SHX) find python/opentrons_shared_data)) python/opentrons_shared_data/py.typed
35
+ deck_sources = $(wildcard deck/definitions/*/*.json) $(wildcard deck/schemas/*.json)
36
+ labware_sources = $(wildcard labware/definitions/*/*.json) $(wildcard labware/schemas/*.json)
37
+ module_sources = $(wildcard module/definitions/*.json) $(wildcard module/definitions/*/*.json) $(wildcard module/schemas/*.json)
38
+ pipette_sources = $(wildcard pipette/definitions/*.json) $(wildcard pipette/schemas/*.json)
39
+ protocol_sources = $(wildcard protocol/schemas/*.json)
40
+ gripper_sources = $(wildcard gripper/definitions/*.json) $(wildcard gripper/schemas/*.json)
41
+
42
+ json_sources = $(deck_sources) $(labware_sources) $(module_sources) $(pipette_sources) $(protocol_sources) $(gripper_sources)
43
+
44
+ tests ?= python_tests
45
+
46
+ twine_auth_args := --username $(pypi_username) --password $(pypi_password)
47
+ twine_repository_url ?= $(pypi_test_upload_url)
48
+
49
+ clean_cmd = $(SHX) rm -rf build $(BUILD_DIR) .coverage coverage.xml '*.egg-info'
50
+ clean_cache_cmd = $(SHX) rm -rf '**/__pycache__' '**/*.pyc' '**/.mypy_cache'
51
+
52
+ .PHONY: all
53
+ all: clean sdist wheel
54
+
55
+ .PHONY: setup
56
+ setup: setup-py
57
+
58
+ .PHONY: setup-py
59
+ setup-py:
60
+ $(pipenv) sync $(pipenv_opts)
61
+ $(pipenv) run pip freeze
62
+
63
+ .PHONY: teardown
64
+ teardown: teardown-py
65
+
66
+ .PHONY: teardown-py
67
+ teardown-py:
68
+ -$(pipenv) --rm
69
+
70
+
71
+ .PHONY: clean
72
+ clean:
73
+ $(clean_cmd)
74
+ $(clean_cache_cmd)
75
+
76
+ .PHONY: wheel
77
+ wheel: export OPENTRONS_PROJECT=$(PROJECT)
78
+ wheel: export HATCH_VCS_TUNABLE_TAG_PATTERN=$(call git_tag_regex_for_project,$(PROJECT))
79
+ wheel: export HATCH_VCS_TUNABLE_RAW_OPTIONS=$(call hatch_raw_options_for_project,$(PROJECT))
80
+ wheel: $(py_sources) $(json_sources)
81
+ $(python) -m build --wheel $(build_wheel_opts) .
82
+ $(SHX) ls $(BUILD_DIR)
83
+
84
+
85
+ .PHONY: sdist
86
+ sdist: export OPENTRONS_PROJECT=$(PROJECT)
87
+ sdist: export HATCH_VCS_TUNABLE_TAG_PATTERN=$(call git_tag_regex_for_project,$(PROJECT))
88
+ sdist: export HATCH_VCS_TUNABLE_RAW_OPTIONS=$(call hatch_raw_options_for_project,$(PROJECT))
89
+ sdist: $(py_sources) $(json_sources)
90
+ $(python) -m build --sdist .
91
+ $(SHX) ls $(BUILD_DIR)
92
+
93
+
94
+ .PHONY: lint
95
+ lint: $(py_sources)
96
+ $(python) -m mypy python/opentrons_shared_data python_tests
97
+ $(python) -m black --check python/opentrons_shared_data python_tests
98
+ $(python) -m flake8 python/opentrons_shared_data python_tests
99
+
100
+ .PHONY: format
101
+ format:
102
+ $(python) -m black python/opentrons_shared_data python_tests
103
+
104
+ .PHONY: push-no-restart
105
+ push-no-restart: wheel
106
+ $(call push-python,$(host),$(ssh_key),$(ssh_opts),$(wheel_file),/usr/lib/python3.10/site-packages/)
107
+
108
+ .PHONY: push
109
+ push: push-no-restart
110
+ $(call restart-service,$(host),$(ssh_key),$(ssh_opts),opentrons-robot-server)
111
+
112
+ .PHONY: push-no-restart-ot3
113
+ push-no-restart-ot3: wheel
114
+ $(call push-python,$(host),$(ssh_key),$(ssh_opts),$(wheel_file),/opt/opentrons-robot-server/)
115
+
116
+ .PHONY: push-ot3
117
+ push-ot3: push-no-restart-ot3
118
+ $(call restart-service,$(host),$(ssh_key),$(ssh_opts),"opentrons-robot-server")
119
+
120
+ .PHONY: deploy
121
+ deploy: wheel sdist
122
+ $(call python_upload_package,$(twine_auth_args),$(twine_repository_url),$(wheel_file),$(sdist_file))
123
+
124
+ .PHONY: test
125
+ test:
126
+ $(python) -m pytest --cov=opentrons_shared_data --cov-report xml:coverage.xml $(tests) $(test_opts)
127
+
128
+
129
+ .PHONY: generate-schema
130
+ generate-schema:
131
+ $(python) -c "from opentrons_shared_data.$(target) import generate_schema; print(generate_schema())" > ./${target}/schemas/${version}.json
132
+
133
+ %-schema:
134
+ $(MAKE) generate-schema target=$*
package/buildroot.mk ADDED
@@ -0,0 +1,35 @@
1
+ ################################################################################
2
+ #
3
+ # python-opentrons-shared-data
4
+ #
5
+ ################################################################################
6
+ include $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH)/scripts/python.mk
7
+
8
+ define OTSHAREDDATA_CALL_PBU
9
+ $(shell python $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH)/scripts/python_build_utils.py shared-data $(or $(OPENTRONS_PROJECT),robot-stack) $(1))
10
+ endef
11
+
12
+ PYTHON_OPENTRONS_SHARED_DATA_VERSION = $(call OTSHAREDDATA_CALL_PBU,get_version)
13
+ PYTHON_OPENTRONS_SHARED_DATA_LICENSE = Apache-2
14
+ PYTHON_OPENTRONS_SHARED_DATA_LICENSE_FILES = $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH)/LICENSE
15
+ PYTHON_OPENTRONS_SHARED_DATA_SETUP_TYPE = hatch
16
+ PYTHON_OPENTRONS_SHARED_DATA_SITE_METHOD = local
17
+ PYTHON_OPENTRONS_SHARED_DATA_SITE = $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH)
18
+ PYTHON_OPENTRONS_SHARED_DATA_DEPENDENCIES = host-python-hatch-vcs host-python-hatch-vcs-tunable
19
+ PYTHON_OPENTRONS_SHARED_DATA_SUBDIR = shared-data
20
+ PYTHON_OPENTRONS_SHARED_DATA_ENV = \
21
+ HATCH_VCS_TUNABLE_TAG_PATTERN="$(call git_tag_regex_for_project,$(PROJECT))" \
22
+ HATCH_VCS_TUNABLE_RAW_OPTIONS="$(call hatch_raw_options_for_project,$(PROJECT));root=$(shell realpath --relative-to=$(PYTHON_OPENTRONS_SHARED_DATA_BUILDDIR) $(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH))"
23
+
24
+ define PYTHON_OPENTRONS_SHARED_DATA_INSTALL_VERSION
25
+ echo '$(call OTSHAREDDATA_CALL_PBU,dump_br_version)' > $(BINARIES_DIR)/opentrons-shared-data-version.json
26
+ endef
27
+
28
+ ot_sd_name := python-opentrons-shared-data
29
+
30
+ export OPENTRONS_GIT_DIR=$(BR2_EXTERNAL_OPENTRONS_MONOREPO_PATH)
31
+
32
+ # Calling inner-python-package directly instead of using python-package macro
33
+ # because our directory layout doesn’t conform to buildroot’s expectation of
34
+ # having the directory name be the package name
35
+ $(eval $(call inner-python-package,$(ot_sd_name),$(call UPPERCASE,$(ot_sd_name)),$(call UPPERCASE,$(ot_sd_name)),target))
package/command/index.ts CHANGED
@@ -2,7 +2,21 @@ import commandSchemaV7 from './schemas/7.json'
2
2
  import commandSchemaV8 from './schemas/8.json'
3
3
  import commandSchemaV9 from './schemas/9.json'
4
4
  import commandSchemaV10 from './schemas/10.json'
5
+ import commandSchemaV11 from './schemas/11.json'
6
+ import commandSchemaV12 from './schemas/12.json'
7
+ import commandSchemaV13 from './schemas/13.json'
8
+ import commandSchemaV14 from './schemas/14.json'
9
+
5
10
  export * from './types/index'
6
- export const commandSchemaLatest = commandSchemaV10
11
+ export const commandSchemaLatest = commandSchemaV14
7
12
 
8
- export { commandSchemaV7, commandSchemaV8, commandSchemaV9, commandSchemaV10 }
13
+ export {
14
+ commandSchemaV7,
15
+ commandSchemaV8,
16
+ commandSchemaV9,
17
+ commandSchemaV10,
18
+ commandSchemaV11,
19
+ commandSchemaV12,
20
+ commandSchemaV13,
21
+ commandSchemaV14,
22
+ }
@@ -5755,6 +5755,67 @@
5755
5755
  "title": "UnsafeEngageAxesParams",
5756
5756
  "type": "object"
5757
5757
  },
5758
+ "UnsafeManualRetrieveCreate": {
5759
+ "description": "A request to execute a Flex Stacker manual retrieve command.",
5760
+ "properties": {
5761
+ "commandType": {
5762
+ "const": "unsafe/manualRetrieve",
5763
+ "default": "unsafe/manualRetrieve",
5764
+ "enum": ["unsafe/manualRetrieve"],
5765
+ "title": "Commandtype",
5766
+ "type": "string"
5767
+ },
5768
+ "intent": {
5769
+ "$ref": "#/$defs/CommandIntent",
5770
+ "description": "The reason the command was added. If not specified or `protocol`, the command will be treated as part of the protocol run itself, and added to the end of the existing command queue.\n\nIf `setup`, the command will be treated as part of run setup. A setup command may only be enqueued if the run has not started.\n\nUse setup commands for activities like pre-run calibration checks and module setup, like pre-heating.",
5771
+ "title": "Intent"
5772
+ },
5773
+ "key": {
5774
+ "description": "A key value, unique in this run, that can be used to track the same logical command across multiple runs of the same protocol. If a value is not provided, one will be generated.",
5775
+ "title": "Key",
5776
+ "type": "string"
5777
+ },
5778
+ "params": {
5779
+ "$ref": "#/$defs/UnsafeManualRetrieveParams"
5780
+ }
5781
+ },
5782
+ "required": ["params"],
5783
+ "title": "UnsafeManualRetrieveCreate",
5784
+ "type": "object"
5785
+ },
5786
+ "UnsafeManualRetrieveParams": {
5787
+ "description": "Input parameters for a labware retrieval command.",
5788
+ "properties": {
5789
+ "adapterId": {
5790
+ "description": "An optional ID to assign to an adapter. If None, an ID will be generated.",
5791
+ "title": "Adapterid",
5792
+ "type": "string"
5793
+ },
5794
+ "displayName": {
5795
+ "description": "An optional user-specified display name or label for this labware.",
5796
+ "title": "Displayname",
5797
+ "type": "string"
5798
+ },
5799
+ "labwareId": {
5800
+ "description": "An optional ID to assign to this labware. If None, an ID will be generated.",
5801
+ "title": "Labwareid",
5802
+ "type": "string"
5803
+ },
5804
+ "lidId": {
5805
+ "description": "An optional ID to assign to a lid. If None, an ID will be generated.",
5806
+ "title": "Lidid",
5807
+ "type": "string"
5808
+ },
5809
+ "moduleId": {
5810
+ "description": "Unique ID of the Flex Stacker.",
5811
+ "title": "Moduleid",
5812
+ "type": "string"
5813
+ }
5814
+ },
5815
+ "required": ["moduleId"],
5816
+ "title": "UnsafeManualRetrieveParams",
5817
+ "type": "object"
5818
+ },
5758
5819
  "UnsafePlaceLabwareCreate": {
5759
5820
  "description": "UnsafePlaceLabware command request model.",
5760
5821
  "properties": {
@@ -6749,6 +6810,7 @@
6749
6810
  "unsafe/blowOutInPlace": "#/$defs/UnsafeBlowOutInPlaceCreate",
6750
6811
  "unsafe/dropTipInPlace": "#/$defs/UnsafeDropTipInPlaceCreate",
6751
6812
  "unsafe/engageAxes": "#/$defs/UnsafeEngageAxesCreate",
6813
+ "unsafe/manualRetrieve": "#/$defs/UnsafeManualRetrieveCreate",
6752
6814
  "unsafe/placeLabware": "#/$defs/UnsafePlaceLabwareCreate",
6753
6815
  "unsafe/ungripLabware": "#/$defs/UnsafeUngripLabwareCreate",
6754
6816
  "unsafe/updatePositionEstimators": "#/$defs/UpdatePositionEstimatorsCreate",
@@ -7033,6 +7095,9 @@
7033
7095
  {
7034
7096
  "$ref": "#/$defs/UnsafePlaceLabwareCreate"
7035
7097
  },
7098
+ {
7099
+ "$ref": "#/$defs/UnsafeManualRetrieveCreate"
7100
+ },
7036
7101
  {
7037
7102
  "$ref": "#/$defs/MoveAxesRelativeCreate"
7038
7103
  },