@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.
- package/Makefile +100 -0
- package/command/schemas/7.json +3301 -0
- package/command/schemas/8.json +3632 -0
- package/command/types/annotation.ts +37 -0
- package/command/types/calibration.ts +84 -0
- package/command/types/gantry.ts +176 -0
- package/command/types/incidental.ts +21 -0
- package/command/types/index.ts +77 -0
- package/command/types/module.ts +307 -0
- package/command/types/pipetting.ts +228 -0
- package/command/types/setup.ts +199 -0
- package/command/types/timing.ts +58 -0
- package/commandAnnotation/schemas/1.json +74 -0
- package/commandAnnotation/types/index.ts +19 -0
- package/deck/definitions/3/ot2_short_trash.json +477 -0
- package/deck/definitions/3/ot2_standard.json +477 -0
- package/deck/definitions/3/ot3_standard.json +989 -0
- package/deck/definitions/4/ot2_short_trash.json +403 -0
- package/deck/definitions/4/ot2_standard.json +403 -0
- package/deck/definitions/4/ot3_standard.json +597 -0
- package/deck/fixtures/3/deckExample.json +481 -0
- package/deck/index.ts +1 -0
- package/deck/schemas/1.json +240 -0
- package/deck/schemas/2.json +250 -0
- package/deck/schemas/3.json +297 -0
- package/deck/schemas/4.json +321 -0
- package/deck/types/schemaV4.ts +84 -0
- package/errors/definitions/1/errors.json +222 -0
- package/errors/schemas/1.json +50 -0
- package/gripper/definitions/1/gripperV1.1.json +28 -0
- package/gripper/definitions/1/gripperV1.2.json +28 -0
- package/gripper/definitions/1/gripperV1.json +27 -0
- package/gripper/schemas/1.json +181 -0
- package/js/__tests__/__snapshots__/pipettes.test.ts.snap +5969 -0
- package/js/__tests__/deckSchemas.test.ts +87 -0
- package/js/__tests__/errors.test.js +21 -0
- package/js/__tests__/getAreSlotsAdjacent.test.ts +128 -0
- package/js/__tests__/getWellNamePerMultiTip.test.ts +162 -0
- package/js/__tests__/labwareDefQuirks.test.ts +37 -0
- package/js/__tests__/labwareDefSchemaV1.test.ts +82 -0
- package/js/__tests__/labwareDefSchemaV2.test.ts +298 -0
- package/js/__tests__/moduleAccessors.test.ts +50 -0
- package/js/__tests__/moduleSpecsSchema.test.ts +77 -0
- package/js/__tests__/pipetteSchemaV2.test.ts +107 -0
- package/js/__tests__/pipetteSpecSchemas.test.ts +48 -0
- package/js/__tests__/pipettes.test.ts +58 -0
- package/js/__tests__/protocolSchemaV4.test.ts +137 -0
- package/js/__tests__/protocolSchemaV5.test.ts +137 -0
- package/js/__tests__/protocolSchemaV6.test.ts +132 -0
- package/js/__tests__/protocolSchemaV7.test.ts +64 -0
- package/js/__tests__/protocolValidation.test.ts +83 -0
- package/js/__tests__/sortWells.test.ts +40 -0
- package/js/__tests__/splitWellsOnColumn.test.ts +21 -0
- package/js/__tests__/validateErrors.test.js +34 -0
- package/js/constants.ts +336 -0
- package/js/cypressUtils.ts +35 -0
- package/js/errors.ts +33 -0
- package/js/fixtures.ts +161 -0
- package/js/getLabware.ts +162 -0
- package/js/gripper.ts +29 -0
- package/js/helpers/__tests__/getAdapterName.test.ts +31 -0
- package/js/helpers/__tests__/getDeckDefFromLoadedLabware.test.ts +12 -0
- package/js/helpers/__tests__/getVectorDifference.test.ts +25 -0
- package/js/helpers/__tests__/getVectorSum.test.ts +21 -0
- package/js/helpers/__tests__/labwareInference.test.ts +84 -0
- package/js/helpers/__tests__/orderWells.test.ts +87 -0
- package/js/helpers/__tests__/parseProtocolData.test.ts +165 -0
- package/js/helpers/__tests__/volume.test.ts +108 -0
- package/js/helpers/__tests__/wellSets.test.ts +352 -0
- package/js/helpers/get96Channel384WellPlateWells.ts +44 -0
- package/js/helpers/getLoadedLabwareDefinitionsByUri.ts +30 -0
- package/js/helpers/getModuleVizDims.ts +118 -0
- package/js/helpers/getOccludedSlotCountForModule.ts +13 -0
- package/js/helpers/getVectorDifference.ts +12 -0
- package/js/helpers/getVectorSum.ts +12 -0
- package/js/helpers/getWellNamePerMultiTip.ts +86 -0
- package/js/helpers/getWellTotalVolume.ts +16 -0
- package/js/helpers/index.ts +346 -0
- package/js/helpers/labwareInference.ts +92 -0
- package/js/helpers/orderWells.ts +69 -0
- package/js/helpers/parseProtocolData.ts +141 -0
- package/js/helpers/volume.ts +35 -0
- package/js/helpers/wellIsRect.ts +6 -0
- package/js/helpers/wellSets.ts +150 -0
- package/js/index.ts +14 -0
- package/js/labwareTools/__tests__/__snapshots__/createIrregularLabware.test.ts.snap +3 -0
- package/js/labwareTools/__tests__/__snapshots__/createLabware.test.ts.snap +3 -0
- package/js/labwareTools/__tests__/createDefaultDisplayName.test.ts +111 -0
- package/js/labwareTools/__tests__/createIrregularLabware.test.ts +226 -0
- package/js/labwareTools/__tests__/createLabware.test.ts +147 -0
- package/js/labwareTools/index.ts +452 -0
- package/js/modules.ts +97 -0
- package/js/pipettes.ts +89 -0
- package/js/protocols.ts +290 -0
- package/js/schema.ts +80 -0
- package/js/scripts/build.js +32 -0
- package/js/scripts/generateDeckLayersFromSVG.js +46 -0
- package/js/titleCase.ts +30 -0
- package/js/types.ts +600 -0
- package/labware/definitions/1/12-well-plate.json +147 -0
- package/labware/definitions/1/24-vial-rack.json +281 -0
- package/labware/definitions/1/24-well-plate.json +281 -0
- package/labware/definitions/1/384-plate.json +4667 -0
- package/labware/definitions/1/48-vial-plate.json +547 -0
- package/labware/definitions/1/48-well-plate.json +547 -0
- package/labware/definitions/1/5ml-3x4.json +147 -0
- package/labware/definitions/1/6-well-plate.json +80 -0
- package/labware/definitions/1/96-PCR-flat.json +1079 -0
- package/labware/definitions/1/96-PCR-tall.json +1079 -0
- package/labware/definitions/1/96-deep-well.json +1079 -0
- package/labware/definitions/1/96-flat.json +1079 -0
- package/labware/definitions/1/96-well-plate-20mm.json +1079 -0
- package/labware/definitions/1/MALDI-plate.json +4282 -0
- package/labware/definitions/1/PCR-strip-tall.json +1079 -0
- package/labware/definitions/1/T25-flask.json +20 -0
- package/labware/definitions/1/T75-flask.json +20 -0
- package/labware/definitions/1/alum-block-pcr-strips.json +188 -0
- package/labware/definitions/1/biorad-hardshell-96-PCR.json +1079 -0
- package/labware/definitions/1/e-gelgol.json +1078 -0
- package/labware/definitions/1/fixed-trash.json +19 -0
- package/labware/definitions/1/hampton-1ml-deep-block.json +1078 -0
- package/labware/definitions/1/opentrons-aluminum-block-2ml-eppendorf.json +281 -0
- package/labware/definitions/1/opentrons-aluminum-block-2ml-screwcap.json +281 -0
- package/labware/definitions/1/opentrons-aluminum-block-96-PCR-plate.json +1079 -0
- package/labware/definitions/1/opentrons-aluminum-block-PCR-strips-200ul.json +1079 -0
- package/labware/definitions/1/opentrons-tiprack-10ul.json +986 -0
- package/labware/definitions/1/opentrons-tiprack-300ul.json +986 -0
- package/labware/definitions/1/opentrons-tuberack-1.5ml-eppendorf.json +281 -0
- package/labware/definitions/1/opentrons-tuberack-15_50ml.json +125 -0
- package/labware/definitions/1/opentrons-tuberack-15ml.json +181 -0
- package/labware/definitions/1/opentrons-tuberack-2ml-eppendorf.json +281 -0
- package/labware/definitions/1/opentrons-tuberack-2ml-screwcap.json +281 -0
- package/labware/definitions/1/opentrons-tuberack-50ml.json +80 -0
- package/labware/definitions/1/point.json +18 -0
- package/labware/definitions/1/rigaku-compact-crystallization-plate.json +2146 -0
- package/labware/definitions/1/small_vial_rack_16x45.json +280 -0
- package/labware/definitions/1/tall-fixed-trash.json +19 -0
- package/labware/definitions/1/tiprack-1000ul-H.json +503 -0
- package/labware/definitions/1/tiprack-1000ul-chem.json +1034 -0
- package/labware/definitions/1/tiprack-1000ul.json +986 -0
- package/labware/definitions/1/tiprack-10ul-H.json +503 -0
- package/labware/definitions/1/tiprack-10ul.json +986 -0
- package/labware/definitions/1/tiprack-200ul.json +986 -0
- package/labware/definitions/1/trash-box.json +20 -0
- package/labware/definitions/1/trough-12row-short.json +143 -0
- package/labware/definitions/1/trough-12row.json +143 -0
- package/labware/definitions/1/trough-1row-25ml.json +21 -0
- package/labware/definitions/1/tube-rack-.75ml.json +281 -0
- package/labware/definitions/1/tube-rack-15_50ml.json +125 -0
- package/labware/definitions/1/tube-rack-2ml-9x9.json +911 -0
- package/labware/definitions/1/tube-rack-2ml.json +281 -0
- package/labware/definitions/1/tube-rack-5ml-96.json +1079 -0
- package/labware/definitions/1/tube-rack-80well.json +907 -0
- package/labware/definitions/1/wheaton_vial_rack.json +565 -0
- package/labware/definitions/2/agilent_1_reservoir_290ml/1.json +54 -0
- package/labware/definitions/2/appliedbiosystemsmicroamp_384_wellplate_40ul/1.json +4320 -0
- package/labware/definitions/2/armadillo_96_wellplate_200ul_pcr_full_skirt/1.json +1019 -0
- package/labware/definitions/2/armadillo_96_wellplate_200ul_pcr_full_skirt/2.json +1045 -0
- package/labware/definitions/2/axygen_1_reservoir_90ml/1.json +56 -0
- package/labware/definitions/2/biorad_384_wellplate_50ul/1.json +4329 -0
- package/labware/definitions/2/biorad_384_wellplate_50ul/2.json +4331 -0
- package/labware/definitions/2/biorad_96_wellplate_200ul_pcr/1.json +1020 -0
- package/labware/definitions/2/biorad_96_wellplate_200ul_pcr/2.json +1036 -0
- package/labware/definitions/2/corning_12_wellplate_6.9ml_flat/1.json +171 -0
- package/labware/definitions/2/corning_12_wellplate_6.9ml_flat/2.json +180 -0
- package/labware/definitions/2/corning_24_wellplate_3.4ml_flat/1.json +293 -0
- package/labware/definitions/2/corning_24_wellplate_3.4ml_flat/2.json +300 -0
- package/labware/definitions/2/corning_384_wellplate_112ul_flat/1.json +4703 -0
- package/labware/definitions/2/corning_384_wellplate_112ul_flat/2.json +4717 -0
- package/labware/definitions/2/corning_48_wellplate_1.6ml_flat/1.json +535 -0
- package/labware/definitions/2/corning_48_wellplate_1.6ml_flat/2.json +544 -0
- package/labware/definitions/2/corning_6_wellplate_16.8ml_flat/1.json +103 -0
- package/labware/definitions/2/corning_6_wellplate_16.8ml_flat/2.json +110 -0
- package/labware/definitions/2/corning_96_wellplate_360ul_flat/1.json +1049 -0
- package/labware/definitions/2/corning_96_wellplate_360ul_flat/2.json +1063 -0
- package/labware/definitions/2/eppendorf_96_tiprack_1000ul_eptips/1.json +1019 -0
- package/labware/definitions/2/eppendorf_96_tiprack_10ul_eptips/1.json +1019 -0
- package/labware/definitions/2/geb_96_tiprack_1000ul/1.json +1017 -0
- package/labware/definitions/2/geb_96_tiprack_10ul/1.json +1017 -0
- package/labware/definitions/2/nest_12_reservoir_15ml/1.json +190 -0
- package/labware/definitions/2/nest_1_reservoir_195ml/1.json +54 -0
- package/labware/definitions/2/nest_1_reservoir_195ml/2.json +56 -0
- package/labware/definitions/2/nest_1_reservoir_290ml/1.json +54 -0
- package/labware/definitions/2/nest_96_wellplate_100ul_pcr_full_skirt/1.json +1018 -0
- package/labware/definitions/2/nest_96_wellplate_100ul_pcr_full_skirt/2.json +1039 -0
- package/labware/definitions/2/nest_96_wellplate_200ul_flat/1.json +1017 -0
- package/labware/definitions/2/nest_96_wellplate_200ul_flat/2.json +1031 -0
- package/labware/definitions/2/nest_96_wellplate_2ml_deep/1.json +1121 -0
- package/labware/definitions/2/nest_96_wellplate_2ml_deep/2.json +1137 -0
- package/labware/definitions/2/opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical/1.json +164 -0
- package/labware/definitions/2/opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical_acrylic/1.json +162 -0
- package/labware/definitions/2/opentrons_10_tuberack_nest_4x50ml_6x15ml_conical/1.json +160 -0
- package/labware/definitions/2/opentrons_15_tuberack_falcon_15ml_conical/1.json +211 -0
- package/labware/definitions/2/opentrons_15_tuberack_nest_15ml_conical/1.json +209 -0
- package/labware/definitions/2/opentrons_1_trash_1100ml_fixed/1.json +50 -0
- package/labware/definitions/2/opentrons_1_trash_3200ml_fixed/1.json +50 -0
- package/labware/definitions/2/opentrons_1_trash_850ml_fixed/1.json +50 -0
- package/labware/definitions/2/opentrons_24_aluminumblock_generic_2ml_screwcap/1.json +300 -0
- package/labware/definitions/2/opentrons_24_aluminumblock_generic_2ml_screwcap/2.json +301 -0
- package/labware/definitions/2/opentrons_24_aluminumblock_nest_0.5ml_screwcap/1.json +299 -0
- package/labware/definitions/2/opentrons_24_aluminumblock_nest_1.5ml_screwcap/1.json +299 -0
- package/labware/definitions/2/opentrons_24_aluminumblock_nest_1.5ml_snapcap/1.json +301 -0
- package/labware/definitions/2/opentrons_24_aluminumblock_nest_2ml_screwcap/1.json +299 -0
- package/labware/definitions/2/opentrons_24_aluminumblock_nest_2ml_snapcap/1.json +301 -0
- package/labware/definitions/2/opentrons_24_tuberack_eppendorf_1.5ml_safelock_snapcap/1.json +312 -0
- package/labware/definitions/2/opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap/1.json +311 -0
- package/labware/definitions/2/opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap_acrylic/1.json +309 -0
- package/labware/definitions/2/opentrons_24_tuberack_generic_0.75ml_snapcap_acrylic/1.json +298 -0
- package/labware/definitions/2/opentrons_24_tuberack_generic_2ml_screwcap/1.json +300 -0
- package/labware/definitions/2/opentrons_24_tuberack_nest_0.5ml_screwcap/1.json +300 -0
- package/labware/definitions/2/opentrons_24_tuberack_nest_1.5ml_screwcap/1.json +300 -0
- package/labware/definitions/2/opentrons_24_tuberack_nest_1.5ml_snapcap/1.json +302 -0
- package/labware/definitions/2/opentrons_24_tuberack_nest_2ml_screwcap/1.json +300 -0
- package/labware/definitions/2/opentrons_24_tuberack_nest_2ml_snapcap/1.json +302 -0
- package/labware/definitions/2/opentrons_40_aluminumblock_eppendorf_24x2ml_safelock_snapcap_generic_16x0.2ml_pcr_strip/1.json +481 -0
- package/labware/definitions/2/opentrons_6_tuberack_falcon_50ml_conical/1.json +112 -0
- package/labware/definitions/2/opentrons_6_tuberack_nest_50ml_conical/1.json +110 -0
- package/labware/definitions/2/opentrons_96_aluminumblock_biorad_wellplate_200ul/1.json +1029 -0
- package/labware/definitions/2/opentrons_96_aluminumblock_generic_pcr_strip_200ul/1.json +1026 -0
- package/labware/definitions/2/opentrons_96_aluminumblock_generic_pcr_strip_200ul/2.json +1027 -0
- package/labware/definitions/2/opentrons_96_aluminumblock_nest_wellplate_100ul/1.json +1027 -0
- package/labware/definitions/2/opentrons_96_deep_well_adapter/1.json +41 -0
- package/labware/definitions/2/opentrons_96_deep_well_adapter_nest_wellplate_2ml_deep/1.json +1121 -0
- package/labware/definitions/2/opentrons_96_filtertiprack_1000ul/1.json +1017 -0
- package/labware/definitions/2/opentrons_96_filtertiprack_10ul/1.json +1017 -0
- package/labware/definitions/2/opentrons_96_filtertiprack_200ul/1.json +1017 -0
- package/labware/definitions/2/opentrons_96_filtertiprack_20ul/1.json +1017 -0
- package/labware/definitions/2/opentrons_96_flat_bottom_adapter/1.json +41 -0
- package/labware/definitions/2/opentrons_96_flat_bottom_adapter_nest_wellplate_200ul_flat/1.json +1027 -0
- package/labware/definitions/2/opentrons_96_pcr_adapter/1.json +1032 -0
- package/labware/definitions/2/opentrons_96_pcr_adapter_armadillo_wellplate_200ul/1.json +1027 -0
- package/labware/definitions/2/opentrons_96_pcr_adapter_nest_wellplate_100ul_pcr_full_skirt/1.json +1025 -0
- package/labware/definitions/2/opentrons_96_tiprack_1000ul/1.json +1019 -0
- package/labware/definitions/2/opentrons_96_tiprack_10ul/1.json +1019 -0
- package/labware/definitions/2/opentrons_96_tiprack_20ul/1.json +1019 -0
- package/labware/definitions/2/opentrons_96_tiprack_300ul/1.json +1019 -0
- package/labware/definitions/2/opentrons_96_well_aluminum_block/1.json +1032 -0
- package/labware/definitions/2/opentrons_96_wellplate_200ul_pcr_full_skirt/1.json +1019 -0
- package/labware/definitions/2/opentrons_96_wellplate_200ul_pcr_full_skirt/2.json +1045 -0
- package/labware/definitions/2/opentrons_aluminum_flat_bottom_plate/1.json +41 -0
- package/labware/definitions/2/opentrons_calibration_adapter_heatershaker_module/1.json +62 -0
- package/labware/definitions/2/opentrons_calibration_adapter_temperature_module/1.json +62 -0
- package/labware/definitions/2/opentrons_calibration_adapter_thermocycler_module/1.json +69 -0
- package/labware/definitions/2/opentrons_calibrationblock_short_side_left/1.json +71 -0
- package/labware/definitions/2/opentrons_calibrationblock_short_side_right/1.json +71 -0
- package/labware/definitions/2/opentrons_flex_96_filtertiprack_1000ul/1.json +1026 -0
- package/labware/definitions/2/opentrons_flex_96_filtertiprack_200ul/1.json +1026 -0
- package/labware/definitions/2/opentrons_flex_96_filtertiprack_50ul/1.json +1026 -0
- package/labware/definitions/2/opentrons_flex_96_tiprack_1000ul/1.json +1026 -0
- package/labware/definitions/2/opentrons_flex_96_tiprack_200ul/1.json +1026 -0
- package/labware/definitions/2/opentrons_flex_96_tiprack_50ul/1.json +1026 -0
- package/labware/definitions/2/opentrons_flex_96_tiprack_adapter/1.json +41 -0
- package/labware/definitions/2/opentrons_universal_flat_adapter/1.json +151 -0
- package/labware/definitions/2/opentrons_universal_flat_adapter_corning_384_wellplate_112ul_flat/1.json +4710 -0
- package/labware/definitions/2/thermoscientificnunc_96_wellplate_1300ul/1.json +1019 -0
- package/labware/definitions/2/thermoscientificnunc_96_wellplate_2000ul/1.json +1019 -0
- package/labware/definitions/2/tipone_96_tiprack_200ul/1.json +1017 -0
- package/labware/definitions/2/usascientific_12_reservoir_22ml/1.json +192 -0
- package/labware/definitions/2/usascientific_96_wellplate_2.4ml_deep/1.json +1116 -0
- package/labware/fixtures/2/fixture_12_trough.json +188 -0
- package/labware/fixtures/2/fixture_12_trough_v2.json +188 -0
- package/labware/fixtures/2/fixture_24_tuberack.json +295 -0
- package/labware/fixtures/2/fixture_384_plate.json +4316 -0
- package/labware/fixtures/2/fixture_96_plate.json +1015 -0
- package/labware/fixtures/2/fixture_flex_96_tiprack_1000ul.json +1026 -0
- package/labware/fixtures/2/fixture_flex_96_tiprack_adapter.json +41 -0
- package/labware/fixtures/2/fixture_irregular_example_1.json +600 -0
- package/labware/fixtures/2/fixture_overlappy_wellplate.json +1113 -0
- package/labware/fixtures/2/fixture_regular_example_1.json +57 -0
- package/labware/fixtures/2/fixture_regular_example_2.json +95 -0
- package/labware/fixtures/2/fixture_tiprack_1000_ul.json +1015 -0
- package/labware/fixtures/2/fixture_tiprack_10_ul.json +1015 -0
- package/labware/fixtures/2/fixture_tiprack_300_ul.json +1014 -0
- package/labware/fixtures/2/fixture_trash.json +50 -0
- package/labware/schemas/2.json +372 -0
- package/liquid/schemas/1.json +21 -0
- package/liquid/types/index.ts +5 -0
- package/module/definitions/1.json +57 -0
- package/module/definitions/2/magneticModuleV1.json +22 -0
- package/module/definitions/2/magneticModuleV2.json +69 -0
- package/module/definitions/2/temperatureModuleV1.json +22 -0
- package/module/definitions/2/temperatureModuleV2.json +69 -0
- package/module/definitions/2/thermocyclerModuleV1.json +23 -0
- package/module/definitions/3/heaterShakerModuleV1.json +521 -0
- package/module/definitions/3/magneticBlockV1.json +199 -0
- package/module/definitions/3/magneticModuleV1.json +435 -0
- package/module/definitions/3/magneticModuleV2.json +488 -0
- package/module/definitions/3/temperatureModuleV1.json +190 -0
- package/module/definitions/3/temperatureModuleV2.json +315 -0
- package/module/definitions/3/thermocyclerModuleV1.json +1380 -0
- package/module/definitions/3/thermocyclerModuleV2.json +3686 -0
- package/module/fixtures/3/compatibleGenerationV1.json +69 -0
- package/module/fixtures/3/compatibleGenerationV2.json +69 -0
- package/module/fixtures/3/incompatibleGenerationV1.json +22 -0
- package/module/fixtures/3/incompatibleGenerationV2.json +69 -0
- package/module/schemas/1.json +55 -0
- package/module/schemas/2.json +112 -0
- package/module/schemas/3.json +206 -0
- package/package.json +20 -0
- package/pipette/README.md +50 -0
- package/pipette/definitions/1/pipetteModelSpecs.json +10214 -0
- package/pipette/definitions/1/pipetteNameSpecs.json +679 -0
- package/pipette/definitions/2/general/eight_channel/p10/1_0.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p10/1_3.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p10/1_4.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p10/1_5.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p10/1_6.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p1000/1_0.json +68 -0
- package/pipette/definitions/2/general/eight_channel/p1000/3_0.json +68 -0
- package/pipette/definitions/2/general/eight_channel/p1000/3_3.json +68 -0
- package/pipette/definitions/2/general/eight_channel/p1000/3_4.json +68 -0
- package/pipette/definitions/2/general/eight_channel/p1000/3_5.json +68 -0
- package/pipette/definitions/2/general/eight_channel/p20/2_0.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p20/2_1.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p300/1_0.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p300/1_3.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p300/1_4.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p300/1_5.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p300/2_0.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p300/2_1.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p50/1_0.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p50/1_3.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p50/1_4.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p50/1_5.json +59 -0
- package/pipette/definitions/2/general/eight_channel/p50/3_0.json +74 -0
- package/pipette/definitions/2/general/eight_channel/p50/3_3.json +74 -0
- package/pipette/definitions/2/general/eight_channel/p50/3_4.json +74 -0
- package/pipette/definitions/2/general/eight_channel/p50/3_5.json +74 -0
- package/pipette/definitions/2/general/ninety_six_channel/p1000/1_0.json +87 -0
- package/pipette/definitions/2/general/ninety_six_channel/p1000/3_0.json +92 -0
- package/pipette/definitions/2/general/ninety_six_channel/p1000/3_3.json +87 -0
- package/pipette/definitions/2/general/ninety_six_channel/p1000/3_4.json +88 -0
- package/pipette/definitions/2/general/ninety_six_channel/p1000/3_5.json +87 -0
- package/pipette/definitions/2/general/single_channel/p10/1_0.json +52 -0
- package/pipette/definitions/2/general/single_channel/p10/1_3.json +52 -0
- package/pipette/definitions/2/general/single_channel/p10/1_4.json +52 -0
- package/pipette/definitions/2/general/single_channel/p10/1_5.json +52 -0
- package/pipette/definitions/2/general/single_channel/p1000/1_0.json +52 -0
- package/pipette/definitions/2/general/single_channel/p1000/1_3.json +52 -0
- package/pipette/definitions/2/general/single_channel/p1000/1_4.json +52 -0
- package/pipette/definitions/2/general/single_channel/p1000/1_5.json +52 -0
- package/pipette/definitions/2/general/single_channel/p1000/2_0.json +52 -0
- package/pipette/definitions/2/general/single_channel/p1000/2_1.json +52 -0
- package/pipette/definitions/2/general/single_channel/p1000/2_2.json +52 -0
- package/pipette/definitions/2/general/single_channel/p1000/3_0.json +61 -0
- package/pipette/definitions/2/general/single_channel/p1000/3_3.json +61 -0
- package/pipette/definitions/2/general/single_channel/p1000/3_4.json +61 -0
- package/pipette/definitions/2/general/single_channel/p1000/3_5.json +61 -0
- package/pipette/definitions/2/general/single_channel/p20/2_0.json +52 -0
- package/pipette/definitions/2/general/single_channel/p20/2_1.json +52 -0
- package/pipette/definitions/2/general/single_channel/p20/2_2.json +52 -0
- package/pipette/definitions/2/general/single_channel/p300/1_0.json +52 -0
- package/pipette/definitions/2/general/single_channel/p300/1_3.json +52 -0
- package/pipette/definitions/2/general/single_channel/p300/1_4.json +52 -0
- package/pipette/definitions/2/general/single_channel/p300/1_5.json +52 -0
- package/pipette/definitions/2/general/single_channel/p300/2_0.json +52 -0
- package/pipette/definitions/2/general/single_channel/p300/2_1.json +52 -0
- package/pipette/definitions/2/general/single_channel/p50/1_0.json +52 -0
- package/pipette/definitions/2/general/single_channel/p50/1_3.json +52 -0
- package/pipette/definitions/2/general/single_channel/p50/1_4.json +52 -0
- package/pipette/definitions/2/general/single_channel/p50/1_5.json +52 -0
- package/pipette/definitions/2/general/single_channel/p50/3_0.json +67 -0
- package/pipette/definitions/2/general/single_channel/p50/3_3.json +67 -0
- package/pipette/definitions/2/general/single_channel/p50/3_4.json +67 -0
- package/pipette/definitions/2/general/single_channel/p50/3_5.json +67 -0
- package/pipette/definitions/2/geometry/eight_channel/p10/1_0.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p10/1_3.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p10/1_4.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p10/1_5.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p10/1_6.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p10/placeholder.gltf +0 -0
- package/pipette/definitions/2/geometry/eight_channel/p1000/1_0.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p1000/3_0.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p1000/3_3.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p1000/3_4.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p1000/3_5.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p1000/placeholder.gltf +0 -0
- package/pipette/definitions/2/geometry/eight_channel/p20/2_0.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p20/2_1.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p20/placeholder.gltf +0 -0
- package/pipette/definitions/2/geometry/eight_channel/p300/1_0.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p300/1_3.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p300/1_4.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p300/1_5.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p300/2_0.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p300/2_1.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p300/placeholder.gltf +0 -0
- package/pipette/definitions/2/geometry/eight_channel/p50/1_0.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p50/1_3.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p50/1_4.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p50/1_5.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p50/3_0.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p50/3_3.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p50/3_4.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p50/3_5.json +37 -0
- package/pipette/definitions/2/geometry/eight_channel/p50/placeholder.gltf +0 -0
- package/pipette/definitions/2/geometry/ninety_six_channel/p1000/1_0.json +291 -0
- package/pipette/definitions/2/geometry/ninety_six_channel/p1000/3_0.json +291 -0
- package/pipette/definitions/2/geometry/ninety_six_channel/p1000/3_3.json +291 -0
- package/pipette/definitions/2/geometry/ninety_six_channel/p1000/3_4.json +291 -0
- package/pipette/definitions/2/geometry/ninety_six_channel/p1000/3_5.json +291 -0
- package/pipette/definitions/2/geometry/ninety_six_channel/p1000/placeholder.gltf +0 -0
- package/pipette/definitions/2/geometry/single_channel/p10/1_0.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p10/1_3.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p10/1_4.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p10/1_5.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p10/placeholder.gltf +0 -0
- package/pipette/definitions/2/geometry/single_channel/p1000/1_0.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p1000/1_3.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p1000/1_4.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p1000/1_5.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p1000/2_0.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p1000/2_1.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p1000/2_2.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p1000/3_0.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p1000/3_3.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p1000/3_4.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p1000/3_5.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p1000/placeholder.gltf +0 -0
- package/pipette/definitions/2/geometry/single_channel/p20/2_0.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p20/2_1.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p20/2_2.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p20/placeholder.gltf +0 -0
- package/pipette/definitions/2/geometry/single_channel/p300/1_0.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p300/1_3.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p300/1_4.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p300/1_5.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p300/2_0.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p300/2_1.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p300/placeholder.gltf +0 -0
- package/pipette/definitions/2/geometry/single_channel/p50/1_0.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p50/1_3.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p50/1_4.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p50/1_5.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p50/3_0.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p50/3_3.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p50/3_4.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p50/3_5.json +10 -0
- package/pipette/definitions/2/geometry/single_channel/p50/placeholder.gltf +0 -0
- package/pipette/definitions/2/liquid/eight_channel/p10/default/1_0.json +58 -0
- package/pipette/definitions/2/liquid/eight_channel/p10/default/1_3.json +58 -0
- package/pipette/definitions/2/liquid/eight_channel/p10/default/1_4.json +58 -0
- package/pipette/definitions/2/liquid/eight_channel/p10/default/1_5.json +47 -0
- package/pipette/definitions/2/liquid/eight_channel/p10/default/1_6.json +55 -0
- package/pipette/definitions/2/liquid/eight_channel/p1000/default/1_0.json +356 -0
- package/pipette/definitions/2/liquid/eight_channel/p1000/default/3_0.json +359 -0
- package/pipette/definitions/2/liquid/eight_channel/p1000/default/3_3.json +359 -0
- package/pipette/definitions/2/liquid/eight_channel/p1000/default/3_4.json +359 -0
- package/pipette/definitions/2/liquid/eight_channel/p1000/default/3_5.json +239 -0
- package/pipette/definitions/2/liquid/eight_channel/p20/default/2_0.json +311 -0
- package/pipette/definitions/2/liquid/eight_channel/p20/default/2_1.json +191 -0
- package/pipette/definitions/2/liquid/eight_channel/p300/default/1_0.json +67 -0
- package/pipette/definitions/2/liquid/eight_channel/p300/default/1_3.json +67 -0
- package/pipette/definitions/2/liquid/eight_channel/p300/default/1_4.json +67 -0
- package/pipette/definitions/2/liquid/eight_channel/p300/default/1_5.json +67 -0
- package/pipette/definitions/2/liquid/eight_channel/p300/default/2_0.json +190 -0
- package/pipette/definitions/2/liquid/eight_channel/p300/default/2_1.json +190 -0
- package/pipette/definitions/2/liquid/eight_channel/p50/default/1_0.json +128 -0
- package/pipette/definitions/2/liquid/eight_channel/p50/default/1_3.json +128 -0
- package/pipette/definitions/2/liquid/eight_channel/p50/default/1_4.json +128 -0
- package/pipette/definitions/2/liquid/eight_channel/p50/default/1_5.json +110 -0
- package/pipette/definitions/2/liquid/eight_channel/p50/default/3_0.json +99 -0
- package/pipette/definitions/2/liquid/eight_channel/p50/default/3_3.json +99 -0
- package/pipette/definitions/2/liquid/eight_channel/p50/default/3_4.json +99 -0
- package/pipette/definitions/2/liquid/eight_channel/p50/default/3_5.json +91 -0
- package/pipette/definitions/2/liquid/eight_channel/p50/lowVolumeDefault/3_0.json +94 -0
- package/pipette/definitions/2/liquid/eight_channel/p50/lowVolumeDefault/3_3.json +89 -0
- package/pipette/definitions/2/liquid/eight_channel/p50/lowVolumeDefault/3_4.json +89 -0
- package/pipette/definitions/2/liquid/eight_channel/p50/lowVolumeDefault/3_5.json +89 -0
- package/pipette/definitions/2/liquid/ninety_six_channel/p1000/default/1_0.json +188 -0
- package/pipette/definitions/2/liquid/ninety_six_channel/p1000/default/3_0.json +188 -0
- package/pipette/definitions/2/liquid/ninety_six_channel/p1000/default/3_3.json +188 -0
- package/pipette/definitions/2/liquid/ninety_six_channel/p1000/default/3_4.json +188 -0
- package/pipette/definitions/2/liquid/ninety_six_channel/p1000/default/3_5.json +188 -0
- package/pipette/definitions/2/liquid/single_channel/p10/default/1_0.json +59 -0
- package/pipette/definitions/2/liquid/single_channel/p10/default/1_3.json +59 -0
- package/pipette/definitions/2/liquid/single_channel/p10/default/1_4.json +56 -0
- package/pipette/definitions/2/liquid/single_channel/p10/default/1_5.json +54 -0
- package/pipette/definitions/2/liquid/single_channel/p1000/default/1_0.json +48 -0
- package/pipette/definitions/2/liquid/single_channel/p1000/default/1_3.json +48 -0
- package/pipette/definitions/2/liquid/single_channel/p1000/default/1_4.json +48 -0
- package/pipette/definitions/2/liquid/single_channel/p1000/default/1_5.json +48 -0
- package/pipette/definitions/2/liquid/single_channel/p1000/default/2_0.json +105 -0
- package/pipette/definitions/2/liquid/single_channel/p1000/default/2_1.json +107 -0
- package/pipette/definitions/2/liquid/single_channel/p1000/default/2_2.json +107 -0
- package/pipette/definitions/2/liquid/single_channel/p1000/default/3_0.json +356 -0
- package/pipette/definitions/2/liquid/single_channel/p1000/default/3_3.json +356 -0
- package/pipette/definitions/2/liquid/single_channel/p1000/default/3_4.json +282 -0
- package/pipette/definitions/2/liquid/single_channel/p1000/default/3_5.json +204 -0
- package/pipette/definitions/2/liquid/single_channel/p20/default/2_0.json +431 -0
- package/pipette/definitions/2/liquid/single_channel/p20/default/2_1.json +251 -0
- package/pipette/definitions/2/liquid/single_channel/p20/default/2_2.json +311 -0
- package/pipette/definitions/2/liquid/single_channel/p300/default/1_0.json +99 -0
- package/pipette/definitions/2/liquid/single_channel/p300/default/1_3.json +99 -0
- package/pipette/definitions/2/liquid/single_channel/p300/default/1_4.json +99 -0
- package/pipette/definitions/2/liquid/single_channel/p300/default/1_5.json +75 -0
- package/pipette/definitions/2/liquid/single_channel/p300/default/2_0.json +188 -0
- package/pipette/definitions/2/liquid/single_channel/p300/default/2_1.json +188 -0
- package/pipette/definitions/2/liquid/single_channel/p50/default/1_0.json +119 -0
- package/pipette/definitions/2/liquid/single_channel/p50/default/1_3.json +128 -0
- package/pipette/definitions/2/liquid/single_channel/p50/default/1_4.json +128 -0
- package/pipette/definitions/2/liquid/single_channel/p50/default/1_5.json +104 -0
- package/pipette/definitions/2/liquid/single_channel/p50/default/3_0.json +98 -0
- package/pipette/definitions/2/liquid/single_channel/p50/default/3_3.json +98 -0
- package/pipette/definitions/2/liquid/single_channel/p50/default/3_4.json +100 -0
- package/pipette/definitions/2/liquid/single_channel/p50/default/3_5.json +80 -0
- package/pipette/definitions/2/liquid/single_channel/p50/lowVolumeDefault/3_0.json +78 -0
- package/pipette/definitions/2/liquid/single_channel/p50/lowVolumeDefault/3_3.json +78 -0
- package/pipette/definitions/2/liquid/single_channel/p50/lowVolumeDefault/3_4.json +78 -0
- package/pipette/definitions/2/liquid/single_channel/p50/lowVolumeDefault/3_5.json +76 -0
- package/pipette/fixtures/name/index.ts +19 -0
- package/pipette/fixtures/name/pipetteNameSpecFixtures.json +130 -0
- package/pipette/schemas/1/pipetteModelSpecsSchema.json +155 -0
- package/pipette/schemas/1/pipetteNameSpecsSchema.json +91 -0
- package/pipette/schemas/2/pipetteGeometrySchema.json +81 -0
- package/pipette/schemas/2/pipetteLiquidPropertiesSchema.json +120 -0
- package/pipette/schemas/2/pipettePropertiesSchema.json +287 -0
- package/protocol/README.md +12 -0
- package/protocol/fixtures/1/simple.json +73 -0
- package/protocol/fixtures/3/simple.json +1307 -0
- package/protocol/fixtures/3/testAllAtomicSingleV3.json +2281 -0
- package/protocol/fixtures/3/testTrickyLabwareV3.json +2577 -0
- package/protocol/fixtures/3/unusedPipette.json +1311 -0
- package/protocol/fixtures/4/pipetteMultiChannelProtocolV4.json +2561 -0
- package/protocol/fixtures/4/simpleV4.json +1309 -0
- package/protocol/fixtures/4/testMagneticModuleV4.json +2156 -0
- package/protocol/fixtures/4/testModulesProtocol.json +2561 -0
- package/protocol/fixtures/4/testTemperatureModuleV4.json +1480 -0
- package/protocol/fixtures/4/testThermocyclerModuleV4.json +2182 -0
- package/protocol/fixtures/4/transferSettings.json +5482 -0
- package/protocol/fixtures/5/multipleTipracks.json +2476 -0
- package/protocol/fixtures/5/multipleTipracksWithTC.json +3544 -0
- package/protocol/fixtures/5/simpleV5.json +1328 -0
- package/protocol/fixtures/6/heaterShakerCommands.json +1422 -0
- package/protocol/fixtures/6/heaterShakerCommandsWithResultsKey.json +4725 -0
- package/protocol/fixtures/6/multipleTempModules.json +11060 -0
- package/protocol/fixtures/6/multipleTipracks.json +5020 -0
- package/protocol/fixtures/6/multipleTipracksWithTC.json +7057 -0
- package/protocol/fixtures/6/oneTiprack.json +1388 -0
- package/protocol/fixtures/6/simpleV6.json +1494 -0
- package/protocol/fixtures/6/tempAndMagModuleCommands.json +1413 -0
- package/protocol/fixtures/6/transferSettings.json +11060 -0
- package/protocol/fixtures/7/moveLabware.json +1303 -0
- package/protocol/fixtures/7/simpleV7.json +1496 -0
- package/protocol/fixtures/8/moveLabware8.json +1309 -0
- package/protocol/fixtures/8/moveLabwareFlex8.json +1309 -0
- package/protocol/fixtures/8/simpleFlexV8.json +1475 -0
- package/protocol/fixtures/8/simpleV8.json +1473 -0
- package/protocol/index.ts +32 -0
- package/protocol/schemas/1.json +389 -0
- package/protocol/schemas/2.json +416 -0
- package/protocol/schemas/3.json +360 -0
- package/protocol/schemas/4.json +662 -0
- package/protocol/schemas/5.json +701 -0
- package/protocol/schemas/6.json +1225 -0
- package/protocol/schemas/7.json +290 -0
- package/protocol/schemas/8.json +157 -0
- package/protocol/types/schemaV1.ts +108 -0
- package/protocol/types/schemaV3.ts +131 -0
- package/protocol/types/schemaV4.ts +146 -0
- package/protocol/types/schemaV5.ts +34 -0
- package/protocol/types/schemaV5Addendum.ts +27 -0
- package/protocol/types/schemaV6/command/gantry.ts +146 -0
- package/protocol/types/schemaV6/command/index.ts +65 -0
- package/protocol/types/schemaV6/command/module.ts +302 -0
- package/protocol/types/schemaV6/command/pipetting.ts +114 -0
- package/protocol/types/schemaV6/command/setup.ts +127 -0
- package/protocol/types/schemaV6/command/timing.ts +58 -0
- package/protocol/types/schemaV6/index.ts +122 -0
- package/protocol/types/schemaV7/command/annotation.ts +37 -0
- package/protocol/types/schemaV7/command/calibration.ts +84 -0
- package/protocol/types/schemaV7/command/gantry.ts +154 -0
- package/protocol/types/schemaV7/command/incidental.ts +21 -0
- package/protocol/types/schemaV7/command/index.ts +76 -0
- package/protocol/types/schemaV7/command/module.ts +307 -0
- package/protocol/types/schemaV7/command/pipetting.ts +173 -0
- package/protocol/types/schemaV7/command/setup.ts +158 -0
- package/protocol/types/schemaV7/command/timing.ts +58 -0
- package/protocol/types/schemaV7/index.ts +98 -0
- package/protocol/types/schemaV8/index.ts +160 -0
- package/python/.coveragerc +4 -0
- package/python/.flake8 +32 -0
- package/python/Config.in +10 -0
- package/python/Makefile +134 -0
- package/python/Pipfile +28 -0
- package/python/Pipfile.lock +645 -0
- package/python/buildroot.mk +30 -0
- package/python/mypy.ini +41 -0
- package/python/opentrons_shared_data/__init__.py +17 -0
- package/python/opentrons_shared_data/_version.py +20 -0
- package/python/opentrons_shared_data/command/__init__.py +52 -0
- package/python/opentrons_shared_data/deck/__init__.py +96 -0
- package/python/opentrons_shared_data/deck/dev_types.py +180 -0
- package/python/opentrons_shared_data/errors/__init__.py +30 -0
- package/python/opentrons_shared_data/errors/categories.py +60 -0
- package/python/opentrons_shared_data/errors/codes.py +108 -0
- package/python/opentrons_shared_data/errors/exceptions.py +915 -0
- package/python/opentrons_shared_data/gripper/__init__.py +63 -0
- package/python/opentrons_shared_data/gripper/constants.py +5 -0
- package/python/opentrons_shared_data/gripper/gripper_definition.py +101 -0
- package/python/opentrons_shared_data/labware/__init__.py +22 -0
- package/python/opentrons_shared_data/labware/constants.py +7 -0
- package/python/opentrons_shared_data/labware/dev_types.py +140 -0
- package/python/opentrons_shared_data/labware/labware_definition.py +328 -0
- package/python/opentrons_shared_data/load.py +57 -0
- package/python/opentrons_shared_data/module/__init__.py +74 -0
- package/python/opentrons_shared_data/module/dev_types.py +141 -0
- package/python/opentrons_shared_data/pipette/__init__.py +107 -0
- package/python/opentrons_shared_data/pipette/dev_types.py +177 -0
- package/python/opentrons_shared_data/pipette/file_operation_helpers.py +37 -0
- package/python/opentrons_shared_data/pipette/load_data.py +261 -0
- package/python/opentrons_shared_data/pipette/model_constants.py +123 -0
- package/python/opentrons_shared_data/pipette/mutable_configurations.py +431 -0
- package/python/opentrons_shared_data/pipette/pipette_definition.py +503 -0
- package/python/opentrons_shared_data/pipette/pipette_load_name_conversions.py +236 -0
- package/python/opentrons_shared_data/pipette/scripts/__init__.py +0 -0
- package/python/opentrons_shared_data/pipette/scripts/build_json_script.py +469 -0
- package/python/opentrons_shared_data/pipette/scripts/update_configuration_files.py +450 -0
- package/python/opentrons_shared_data/pipette/types.py +193 -0
- package/python/opentrons_shared_data/protocol/__init__.py +13 -0
- package/python/opentrons_shared_data/protocol/constants.py +98 -0
- package/python/opentrons_shared_data/protocol/dev_types.py +436 -0
- package/python/opentrons_shared_data/protocol/models/__init__.py +48 -0
- package/python/opentrons_shared_data/protocol/models/protocol_schema_v6.py +145 -0
- package/python/opentrons_shared_data/protocol/models/protocol_schema_v7.py +95 -0
- package/python/opentrons_shared_data/protocol/models/protocol_schema_v8.py +108 -0
- package/python/opentrons_shared_data/protocol/models/shared_models.py +105 -0
- package/python/opentrons_shared_data/py.typed +0 -0
- package/python/opentrons_shared_data/robot/__init__.py +25 -0
- package/python/opentrons_shared_data/robot/dev_types.py +37 -0
- package/python/pytest.ini +2 -0
- package/python/setup.cfg +5 -0
- package/python/setup.py +179 -0
- package/python/tests/__init__.py +1 -0
- package/python/tests/conftest.py +0 -0
- package/python/tests/deck/__init__.py +0 -0
- package/python/tests/deck/test_list_names.py +12 -0
- package/python/tests/deck/test_position.py +113 -0
- package/python/tests/deck/test_typechecks.py +28 -0
- package/python/tests/errors/__init__.py +1 -0
- package/python/tests/errors/test_error_completeness.py +19 -0
- package/python/tests/errors/test_exceptions.py +74 -0
- package/python/tests/gripper/__init__.py +0 -0
- package/python/tests/gripper/test_definition.py +30 -0
- package/python/tests/gripper/test_load.py +16 -0
- package/python/tests/labware/__init__.py +13 -0
- package/python/tests/labware/test_typechecks.py +21 -0
- package/python/tests/module/__init__.py +20 -0
- package/python/tests/module/test_load.py +49 -0
- package/python/tests/module/test_typechecks.py +34 -0
- package/python/tests/pipette/__init__.py +0 -0
- package/python/tests/pipette/test_load_data.py +103 -0
- package/python/tests/pipette/test_mutable_configurations.py +266 -0
- package/python/tests/pipette/test_pipette_definition.py +183 -0
- package/python/tests/pipette/test_pipette_load_name_conversions.py +222 -0
- package/python/tests/pipette/test_typechecks.py +50 -0
- package/python/tests/pipette/test_validate_schema.py +37 -0
- package/python/tests/protocol/__init__.py +15 -0
- package/python/tests/protocol/test_protocol_schema_v6.py +107 -0
- package/python/tests/protocol/test_protocol_schema_v7.py +34 -0
- package/python/tests/protocol/test_protocol_schema_v8.py +20 -0
- package/python/tests/protocol/test_typechecks.py +36 -0
- package/python/tests/robot/__init__.py +0 -0
- package/python/tests/robot/test_typechecks.py +20 -0
- package/robot/definitions/1/ot2.json +5 -0
- package/robot/definitions/1/ot3.json +5 -0
- package/robot/schemas/1.json +30 -0
- package/tsconfig-data.json +24 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
"""A script for updating pre-existing V2 Pipette configurations."""
|
|
2
|
+
import os
|
|
3
|
+
import json
|
|
4
|
+
import argparse
|
|
5
|
+
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from typing import List, Dict, Tuple, Any, Iterator, Type
|
|
8
|
+
|
|
9
|
+
from pydantic import BaseModel
|
|
10
|
+
from pydantic.main import ModelMetaclass
|
|
11
|
+
from enum import Enum
|
|
12
|
+
|
|
13
|
+
from opentrons_shared_data import get_shared_data_root
|
|
14
|
+
|
|
15
|
+
from ..pipette_definition import (
|
|
16
|
+
PipetteConfigurations,
|
|
17
|
+
PipetteGeometryDefinition,
|
|
18
|
+
PipettePhysicalPropertiesDefinition,
|
|
19
|
+
PipetteLiquidPropertiesDefinition,
|
|
20
|
+
PipetteModelVersionType,
|
|
21
|
+
SupportedTipsDefinition,
|
|
22
|
+
)
|
|
23
|
+
from ..types import (
|
|
24
|
+
PipetteModelType,
|
|
25
|
+
PipetteChannelType,
|
|
26
|
+
PipetteVersionType,
|
|
27
|
+
PipetteTipType,
|
|
28
|
+
PipetteModelMajorVersion,
|
|
29
|
+
PipetteModelMinorVersion,
|
|
30
|
+
LiquidClasses,
|
|
31
|
+
)
|
|
32
|
+
from ..load_data import _geometry, _physical, _liquid
|
|
33
|
+
from ..pipette_load_name_conversions import convert_pipette_model
|
|
34
|
+
from ..dev_types import PipetteModel
|
|
35
|
+
|
|
36
|
+
"""
|
|
37
|
+
Instructions:
|
|
38
|
+
|
|
39
|
+
To run this script, you must be in `shared-data/python`. To invoke, use the command:
|
|
40
|
+
|
|
41
|
+
`pipenv run python -m opentrons_shared_data.pipette.scripts.update_configuration_files`
|
|
42
|
+
|
|
43
|
+
If you want to update all files, you can simply use the argument `--update_all_models`.
|
|
44
|
+
|
|
45
|
+
Make sure to run `make format-js` afterwards to ensure formatting of the json files
|
|
46
|
+
is good.
|
|
47
|
+
|
|
48
|
+
*Note* If you are adding a brand-new key, you MUST update the pydantic models
|
|
49
|
+
found in `python/pipette/pipette_definition.py` before running this script.
|
|
50
|
+
|
|
51
|
+
*Note* When you are entering in your data, please utilize the exact type. I.e. if it's a
|
|
52
|
+
list, you must input the list like: [1, 2, 3] or if it's a dict, like: {"data": 1}..
|
|
53
|
+
|
|
54
|
+
For now, we do not support updating pipetting functions in this script.
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
ROOT = get_shared_data_root() / "pipette" / "definitions" / "2"
|
|
58
|
+
NOZZLE_LOCATION_CONFIGS = ["nozzle_offset", "nozzle_map"]
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _change_to_camel_case(c: str) -> str:
|
|
62
|
+
# Tiny helper function to convert to camelCase.
|
|
63
|
+
config_name = c.split("_")
|
|
64
|
+
if len(config_name) == 1:
|
|
65
|
+
return config_name[0]
|
|
66
|
+
return f"{config_name[0]}" + "".join(s.capitalize() for s in config_name[1::])
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def list_configuration_keys() -> Tuple[List[str], Dict[int, str]]:
|
|
70
|
+
"""List out the model keys available to modify at the top level."""
|
|
71
|
+
lookup = {i: v for (i, v) in enumerate(PipetteConfigurations.__fields__)}
|
|
72
|
+
return [
|
|
73
|
+
f"{i}: {v}" for (i, v) in enumerate(PipetteConfigurations.__fields__)
|
|
74
|
+
], lookup
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def list_available_enum(enum_type: Type[Enum]) -> List[str]:
|
|
78
|
+
"""List available pipette models"""
|
|
79
|
+
return [f"{i}: {v}" for (i, v) in enumerate(enum_type)] # type: ignore[var-annotated]
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def handle_subclass_model(
|
|
83
|
+
top_level_configuration: List[str], base_model: BaseModel, is_basemodel: bool
|
|
84
|
+
) -> List[str]:
|
|
85
|
+
"""Handle sub-classed basemodels and update the top level model as necessary."""
|
|
86
|
+
if is_basemodel:
|
|
87
|
+
if base_model.__fields__ == SupportedTipsDefinition.__fields__:
|
|
88
|
+
# pydantic does something weird with the types in ModelFields so
|
|
89
|
+
# we cannot use isinstance checks to confirm if the base model
|
|
90
|
+
# is a supported tips definition
|
|
91
|
+
print(f"choose {PipetteTipType.__name__}:")
|
|
92
|
+
for row in list_available_enum(PipetteTipType):
|
|
93
|
+
print(f"\t{row}")
|
|
94
|
+
tip_type = list(PipetteTipType)[
|
|
95
|
+
int(input("select the tip volume size to modify"))
|
|
96
|
+
]
|
|
97
|
+
top_level_configuration.append(tip_type.name)
|
|
98
|
+
|
|
99
|
+
lookup = {i: v for (i, v) in enumerate(base_model.__fields__)}
|
|
100
|
+
config_list = [f"{i}: {v}" for (i, v) in enumerate(base_model.__fields__)]
|
|
101
|
+
print(f"you selected the basemodel {base_model.__name__}:") # type: ignore[attr-defined]
|
|
102
|
+
for row in config_list:
|
|
103
|
+
print(f"\t{row}")
|
|
104
|
+
|
|
105
|
+
configuration_to_update = lookup[
|
|
106
|
+
int(input("select a specific configuration from above\n"))
|
|
107
|
+
]
|
|
108
|
+
field_type = base_model.__fields__[configuration_to_update].type_
|
|
109
|
+
is_basemodel = isinstance(field_type, ModelMetaclass)
|
|
110
|
+
|
|
111
|
+
top_level_configuration.append(configuration_to_update)
|
|
112
|
+
return handle_subclass_model(top_level_configuration, field_type, is_basemodel)
|
|
113
|
+
else:
|
|
114
|
+
return top_level_configuration
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def check_from_version(version: str) -> str:
|
|
118
|
+
"""Check that the version requested is supported in the system."""
|
|
119
|
+
version_int = [int(v) for v in version.split(".")]
|
|
120
|
+
if version_int[0] not in PipetteModelMajorVersion:
|
|
121
|
+
raise ValueError(f"Major version {version_int[0]} is not supported.")
|
|
122
|
+
if version_int[1] not in PipetteModelMinorVersion:
|
|
123
|
+
raise ValueError(f"Minor version {version_int[1]} is not supported.")
|
|
124
|
+
return version
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def save_data_to_file(
|
|
128
|
+
directorypath: Path,
|
|
129
|
+
file_name: str,
|
|
130
|
+
data: Dict[str, Any],
|
|
131
|
+
) -> None:
|
|
132
|
+
"""
|
|
133
|
+
Function used to save data to a file
|
|
134
|
+
"""
|
|
135
|
+
directorypath.mkdir(parents=True, exist_ok=True)
|
|
136
|
+
filepath = directorypath / f"{file_name}.json"
|
|
137
|
+
with open(filepath, "w") as f:
|
|
138
|
+
json.dump(data, f, indent=2)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def update(
|
|
142
|
+
dict_to_update: Dict[str, Any], iter_of_configs: Iterator[str], value_to_update: Any
|
|
143
|
+
) -> Dict[str, Any]:
|
|
144
|
+
"""
|
|
145
|
+
Recursively update the given dictionary to ensure no data is lost when updating.
|
|
146
|
+
"""
|
|
147
|
+
next_key = next(iter_of_configs, None)
|
|
148
|
+
if next_key and isinstance(dict_to_update.get(next_key), dict):
|
|
149
|
+
dict_to_update[next_key] = update(
|
|
150
|
+
dict_to_update.get(next_key, {}), iter_of_configs, value_to_update
|
|
151
|
+
)
|
|
152
|
+
elif next_key:
|
|
153
|
+
dict_to_update[next_key] = value_to_update
|
|
154
|
+
return dict_to_update
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def build_nozzle_map(
|
|
158
|
+
nozzle_offset: List[float], channels: PipetteChannelType
|
|
159
|
+
) -> Dict[str, List[float]]:
|
|
160
|
+
Y_OFFSET = -9
|
|
161
|
+
X_OFFSET = 9
|
|
162
|
+
if channels == PipetteChannelType.SINGLE_CHANNEL:
|
|
163
|
+
return {"A1": nozzle_offset}
|
|
164
|
+
elif channels == PipetteChannelType.EIGHT_CHANNEL:
|
|
165
|
+
return {
|
|
166
|
+
f"{chr(ord('A') + 1*row)}1": [
|
|
167
|
+
nozzle_offset[0],
|
|
168
|
+
nozzle_offset[1] + Y_OFFSET * row,
|
|
169
|
+
nozzle_offset[2],
|
|
170
|
+
]
|
|
171
|
+
for row in range(8)
|
|
172
|
+
}
|
|
173
|
+
elif channels == PipetteChannelType.NINETY_SIX_CHANNEL:
|
|
174
|
+
return {
|
|
175
|
+
f"{chr(ord('A') + 1*row)}{1 + 1*col}": [
|
|
176
|
+
nozzle_offset[0] + X_OFFSET * col,
|
|
177
|
+
nozzle_offset[1] + Y_OFFSET * row,
|
|
178
|
+
nozzle_offset[2],
|
|
179
|
+
]
|
|
180
|
+
for row in range(8)
|
|
181
|
+
for col in range(12)
|
|
182
|
+
}
|
|
183
|
+
raise ValueError(f"Unsupported channel type {channels}")
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def load_and_update_file_from_config(
|
|
187
|
+
config_to_update: List[str],
|
|
188
|
+
value_to_update: Any,
|
|
189
|
+
model_to_update: PipetteModelVersionType,
|
|
190
|
+
) -> None:
|
|
191
|
+
"""Update the requested config and save to disk.
|
|
192
|
+
|
|
193
|
+
Load the requested config sub type (physical, geometry or liquid). Then
|
|
194
|
+
update the current file and save to disk.
|
|
195
|
+
|
|
196
|
+
"""
|
|
197
|
+
camel_list_to_update = iter([_change_to_camel_case(i) for i in config_to_update])
|
|
198
|
+
|
|
199
|
+
if config_to_update[0] in PipetteGeometryDefinition.__fields__:
|
|
200
|
+
geometry = _geometry(
|
|
201
|
+
model_to_update.pipette_channels,
|
|
202
|
+
model_to_update.pipette_type,
|
|
203
|
+
model_to_update.pipette_version,
|
|
204
|
+
)
|
|
205
|
+
if config_to_update[0] == "nozzle_map":
|
|
206
|
+
nozzle_to_use = (
|
|
207
|
+
value_to_update if value_to_update else geometry["nozzleOffset"]
|
|
208
|
+
)
|
|
209
|
+
geometry["nozzleMap"] = build_nozzle_map(
|
|
210
|
+
nozzle_to_use, model_to_update.pipette_channels
|
|
211
|
+
)
|
|
212
|
+
elif config_to_update[0] == "nozzle_offset":
|
|
213
|
+
geometry["nozzleMap"] = build_nozzle_map(
|
|
214
|
+
value_to_update, model_to_update.pipette_channels
|
|
215
|
+
)
|
|
216
|
+
geometry["nozzleOffset"] = value_to_update
|
|
217
|
+
else:
|
|
218
|
+
geometry = update(geometry, camel_list_to_update, value_to_update)
|
|
219
|
+
PipetteGeometryDefinition.parse_obj(geometry)
|
|
220
|
+
|
|
221
|
+
filepath = (
|
|
222
|
+
ROOT
|
|
223
|
+
/ "geometry"
|
|
224
|
+
/ model_to_update.pipette_channels.name.lower()
|
|
225
|
+
/ model_to_update.pipette_type.value
|
|
226
|
+
)
|
|
227
|
+
save_data_to_file(
|
|
228
|
+
filepath,
|
|
229
|
+
f"{model_to_update.pipette_version.major}_{model_to_update.pipette_version.minor}",
|
|
230
|
+
geometry,
|
|
231
|
+
)
|
|
232
|
+
elif config_to_update[0] in PipettePhysicalPropertiesDefinition.__fields__:
|
|
233
|
+
physical = _physical(
|
|
234
|
+
model_to_update.pipette_channels,
|
|
235
|
+
model_to_update.pipette_type,
|
|
236
|
+
model_to_update.pipette_version,
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
physical = update(physical, camel_list_to_update, value_to_update)
|
|
240
|
+
|
|
241
|
+
PipettePhysicalPropertiesDefinition.parse_obj(physical)
|
|
242
|
+
filepath = (
|
|
243
|
+
ROOT
|
|
244
|
+
/ "general"
|
|
245
|
+
/ model_to_update.pipette_channels.name.lower()
|
|
246
|
+
/ model_to_update.pipette_type.value
|
|
247
|
+
)
|
|
248
|
+
save_data_to_file(
|
|
249
|
+
filepath,
|
|
250
|
+
f"{model_to_update.pipette_version.major}_{model_to_update.pipette_version.minor}",
|
|
251
|
+
physical,
|
|
252
|
+
)
|
|
253
|
+
elif config_to_update[0] == "liquid_properties":
|
|
254
|
+
next(camel_list_to_update)
|
|
255
|
+
liquid = _liquid(
|
|
256
|
+
model_to_update.pipette_channels,
|
|
257
|
+
model_to_update.pipette_type,
|
|
258
|
+
model_to_update.pipette_version,
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
print(
|
|
262
|
+
"Please select what liquid class you wish to update.\n If you want to update all liquid classes then type 'all'.\n"
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
print(f"choose {LiquidClasses.__name__} or type 'all':")
|
|
266
|
+
for row in list_available_enum(LiquidClasses):
|
|
267
|
+
print(f"\t{row}")
|
|
268
|
+
liquid_classes = input("liquid class: ")
|
|
269
|
+
if liquid_classes == "all":
|
|
270
|
+
for c in LiquidClasses:
|
|
271
|
+
liquid = update(
|
|
272
|
+
liquid[c.name.lower()], camel_list_to_update, value_to_update
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
PipetteLiquidPropertiesDefinition.parse_obj(liquid)
|
|
276
|
+
filepath = (
|
|
277
|
+
ROOT
|
|
278
|
+
/ "liquid"
|
|
279
|
+
/ model_to_update.pipette_channels.name.lower()
|
|
280
|
+
/ model_to_update.pipette_type.value
|
|
281
|
+
/ c.name.lower()
|
|
282
|
+
)
|
|
283
|
+
save_data_to_file(
|
|
284
|
+
filepath,
|
|
285
|
+
f"{model_to_update.pipette_version.major}_{model_to_update.pipette_version.minor}",
|
|
286
|
+
liquid,
|
|
287
|
+
)
|
|
288
|
+
else:
|
|
289
|
+
lc = list(LiquidClasses)[int(liquid_classes)]
|
|
290
|
+
liquid = update(
|
|
291
|
+
liquid[lc.name.lower()], camel_list_to_update, value_to_update
|
|
292
|
+
)
|
|
293
|
+
PipetteLiquidPropertiesDefinition.parse_obj(liquid)
|
|
294
|
+
|
|
295
|
+
filepath = (
|
|
296
|
+
ROOT
|
|
297
|
+
/ "liquid"
|
|
298
|
+
/ model_to_update.pipette_channels.name.lower()
|
|
299
|
+
/ model_to_update.pipette_type.value
|
|
300
|
+
/ lc.name.lower()
|
|
301
|
+
)
|
|
302
|
+
save_data_to_file(
|
|
303
|
+
filepath,
|
|
304
|
+
f"{model_to_update.pipette_version.major}_{model_to_update.pipette_version.minor}",
|
|
305
|
+
liquid,
|
|
306
|
+
)
|
|
307
|
+
else:
|
|
308
|
+
raise KeyError(
|
|
309
|
+
f"{config_to_update} is not saved to a file. Check `pipette_definition.py` for more information."
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
def _update_single_model(configuration_to_update: List[str]) -> None:
|
|
314
|
+
"""Helper function to update single model."""
|
|
315
|
+
print(f"choose {PipetteModelType.__name__}:")
|
|
316
|
+
for row in list_available_enum(PipetteModelType):
|
|
317
|
+
print(f"\t{row}")
|
|
318
|
+
model = list(PipetteModelType)[int(input("Please select from above\n"))]
|
|
319
|
+
|
|
320
|
+
print(f"choose {PipetteChannelType.__name__}:")
|
|
321
|
+
for row in list_available_enum(PipetteChannelType):
|
|
322
|
+
print(f"\t{row}")
|
|
323
|
+
channels = list(PipetteChannelType)[int(input("Please select from above\n"))]
|
|
324
|
+
|
|
325
|
+
version = PipetteVersionType.convert_from_float(
|
|
326
|
+
float(check_from_version(input("Please input the version of the model\n")))
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
built_model: PipetteModel = PipetteModel(
|
|
330
|
+
f"{model.name}_{str(channels)}_v{version.major}.{version.minor}"
|
|
331
|
+
)
|
|
332
|
+
|
|
333
|
+
if configuration_to_update[0] == NOZZLE_LOCATION_CONFIGS[1]:
|
|
334
|
+
print(
|
|
335
|
+
"You selected nozzle_map to edit. If you wish to update the nozzle offset, enter it on the next line.\n"
|
|
336
|
+
)
|
|
337
|
+
print("Otherwise, please type 'null' on the next line.\n")
|
|
338
|
+
|
|
339
|
+
value_to_update = json.loads(
|
|
340
|
+
input(
|
|
341
|
+
f"Please select what you would like to update {configuration_to_update[-1]} to for {built_model}\n"
|
|
342
|
+
)
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
model_version = convert_pipette_model(built_model)
|
|
346
|
+
|
|
347
|
+
load_and_update_file_from_config(
|
|
348
|
+
configuration_to_update, value_to_update, model_version
|
|
349
|
+
)
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
def _update_all_models(configuration_to_update: List[str]) -> None:
|
|
353
|
+
paths_to_validate = ROOT / "general"
|
|
354
|
+
_channel_model_str = {
|
|
355
|
+
"single_channel": "single",
|
|
356
|
+
"ninety_six_channel": "96",
|
|
357
|
+
"eight_channel": "multi",
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
for channel_dir in os.listdir(paths_to_validate):
|
|
361
|
+
for model_dir in os.listdir(paths_to_validate / channel_dir):
|
|
362
|
+
for version_file in os.listdir(paths_to_validate / channel_dir / model_dir):
|
|
363
|
+
version_list = version_file.split(".json")[0].split("_")
|
|
364
|
+
built_model: PipetteModel = PipetteModel(
|
|
365
|
+
f"{model_dir}_{_channel_model_str[channel_dir]}_v{version_list[0]}.{version_list[1]}"
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
if configuration_to_update[0] == NOZZLE_LOCATION_CONFIGS[1]:
|
|
369
|
+
print(
|
|
370
|
+
"You selected nozzle_map to edit. If you wish to update the nozzle offset, enter it on the next line.\n"
|
|
371
|
+
)
|
|
372
|
+
print("Otherwise, please type 'null' on the next line.\n")
|
|
373
|
+
|
|
374
|
+
value_to_update = json.loads(
|
|
375
|
+
input(
|
|
376
|
+
f"Please select what you would like to update {configuration_to_update} to for {built_model}\n"
|
|
377
|
+
)
|
|
378
|
+
)
|
|
379
|
+
|
|
380
|
+
model_version = convert_pipette_model(built_model)
|
|
381
|
+
load_and_update_file_from_config(
|
|
382
|
+
configuration_to_update, value_to_update, model_version
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
def determine_models_to_update(update_all_models: bool) -> None:
|
|
387
|
+
try:
|
|
388
|
+
while True:
|
|
389
|
+
print(f"choose {PipetteConfigurations.__name__}:")
|
|
390
|
+
config_list, table_lookup = list_configuration_keys()
|
|
391
|
+
for row in config_list:
|
|
392
|
+
print(f"\t{row}")
|
|
393
|
+
|
|
394
|
+
configuration_to_update = [
|
|
395
|
+
table_lookup[int(input("select a configuration from above\n"))]
|
|
396
|
+
]
|
|
397
|
+
|
|
398
|
+
if configuration_to_update[0] == NOZZLE_LOCATION_CONFIGS[0]:
|
|
399
|
+
print(
|
|
400
|
+
f"NOTE: updating the {configuration_to_update[0]} will automatically update the {NOZZLE_LOCATION_CONFIGS[1]}\n"
|
|
401
|
+
)
|
|
402
|
+
|
|
403
|
+
field_type = PipetteConfigurations.__fields__[
|
|
404
|
+
configuration_to_update[0]
|
|
405
|
+
].type_
|
|
406
|
+
is_basemodel = isinstance(field_type, ModelMetaclass)
|
|
407
|
+
|
|
408
|
+
configuration_to_update = handle_subclass_model(
|
|
409
|
+
configuration_to_update, field_type, is_basemodel
|
|
410
|
+
)
|
|
411
|
+
if update_all_models:
|
|
412
|
+
_update_all_models(configuration_to_update)
|
|
413
|
+
else:
|
|
414
|
+
_update_single_model(configuration_to_update)
|
|
415
|
+
except KeyboardInterrupt:
|
|
416
|
+
print("Finished updating! Validate that your files updated successfully.")
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
def main() -> None:
|
|
420
|
+
"""Entry point."""
|
|
421
|
+
parser = argparse.ArgumentParser(
|
|
422
|
+
description="96 channel tip handling testing script."
|
|
423
|
+
)
|
|
424
|
+
parser.add_argument(
|
|
425
|
+
"--update_all_models",
|
|
426
|
+
type=bool,
|
|
427
|
+
help="update all",
|
|
428
|
+
default=False,
|
|
429
|
+
)
|
|
430
|
+
|
|
431
|
+
args = parser.parse_args()
|
|
432
|
+
|
|
433
|
+
determine_models_to_update(args.update_all_models)
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
if __name__ == "__main__":
|
|
437
|
+
"""
|
|
438
|
+
A script to automate building a pipette configuration definition.
|
|
439
|
+
|
|
440
|
+
This script can either perform migrations from a v1 -> v2 schema format
|
|
441
|
+
or build a brand new script from scratch.
|
|
442
|
+
|
|
443
|
+
When building a new pipette configuration model, you will either need
|
|
444
|
+
to provide CSVs or use command line inputs.
|
|
445
|
+
|
|
446
|
+
If you choose CSVs you will need one CSV for the general pipette configuration
|
|
447
|
+
data (such as pipette model or number of channels) and one for every tip
|
|
448
|
+
type that this pipette model can support.
|
|
449
|
+
"""
|
|
450
|
+
main()
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import enum
|
|
2
|
+
from dataclasses import dataclass
|
|
3
|
+
from typing import Union, Dict, Mapping, Tuple, cast
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
"""Pipette Definition V2 Types"""
|
|
7
|
+
|
|
8
|
+
# Needed for Int Comparison. Keeping it next to
|
|
9
|
+
# the Literal type for ease of readability
|
|
10
|
+
PipetteModelMajorVersion = [1, 2, 3]
|
|
11
|
+
PipetteModelMinorVersion = [0, 1, 2, 3, 4, 5, 6]
|
|
12
|
+
|
|
13
|
+
# TODO Literals are only good for writing down
|
|
14
|
+
# exact values. Is there a better typing mechanism
|
|
15
|
+
# so we don't need to keep track of versions in two
|
|
16
|
+
# different places?
|
|
17
|
+
PipetteModelMajorVersionType = Literal[1, 2, 3]
|
|
18
|
+
PipetteModelMinorVersionType = Literal[0, 1, 2, 3, 4, 5, 6]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class LiquidClasses(enum.Enum):
|
|
22
|
+
default = enum.auto()
|
|
23
|
+
lowVolumeDefault = enum.auto()
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class PipetteTipType(enum.Enum):
|
|
27
|
+
t10 = 10
|
|
28
|
+
t20 = 20
|
|
29
|
+
t50 = 50
|
|
30
|
+
t200 = 200
|
|
31
|
+
t300 = 300
|
|
32
|
+
t1000 = 1000
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def check_and_return_type(
|
|
36
|
+
cls, working_volume: int, maximum_volume: int
|
|
37
|
+
) -> "PipetteTipType":
|
|
38
|
+
try:
|
|
39
|
+
return cls(working_volume)
|
|
40
|
+
except ValueError:
|
|
41
|
+
return cls(maximum_volume)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class PipetteChannelType(int, enum.Enum):
|
|
45
|
+
SINGLE_CHANNEL = 1
|
|
46
|
+
EIGHT_CHANNEL = 8
|
|
47
|
+
NINETY_SIX_CHANNEL = 96
|
|
48
|
+
|
|
49
|
+
def __str__(self) -> str:
|
|
50
|
+
if self.value == 96:
|
|
51
|
+
return "96"
|
|
52
|
+
elif self.value == 8:
|
|
53
|
+
return "multi"
|
|
54
|
+
else:
|
|
55
|
+
return "single"
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class PipetteModelType(enum.Enum):
|
|
59
|
+
p10 = "p10"
|
|
60
|
+
p20 = "p20"
|
|
61
|
+
p50 = "p50"
|
|
62
|
+
p300 = "p300"
|
|
63
|
+
p1000 = "p1000"
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class PipetteGenerationType(enum.Enum):
|
|
67
|
+
GEN1 = "GEN1"
|
|
68
|
+
GEN2 = "GEN2"
|
|
69
|
+
FLEX = "FLEX"
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
@dataclass(frozen=True)
|
|
73
|
+
class PipetteVersionType:
|
|
74
|
+
major: PipetteModelMajorVersionType
|
|
75
|
+
minor: PipetteModelMinorVersionType
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def convert_from_float(cls, version: float) -> "PipetteVersionType":
|
|
79
|
+
major = cast(PipetteModelMajorVersionType, int(version // 1))
|
|
80
|
+
minor = cast(PipetteModelMinorVersionType, int(round((version % 1), 2) * 10))
|
|
81
|
+
return cls(major=major, minor=minor)
|
|
82
|
+
|
|
83
|
+
def __str__(self) -> str:
|
|
84
|
+
if self.major == 1 and self.minor == 0:
|
|
85
|
+
# Maintain the format of V1 pipettes that
|
|
86
|
+
# do not contain a minor version at all.
|
|
87
|
+
return f"{self.major}"
|
|
88
|
+
else:
|
|
89
|
+
return f"{self.major}.{self.minor}"
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def as_tuple(
|
|
93
|
+
self,
|
|
94
|
+
) -> Tuple[PipetteModelMajorVersionType, PipetteModelMinorVersionType]:
|
|
95
|
+
return (self.major, self.minor)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
"""Mutable Configs Types"""
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class Quirks(enum.Enum):
|
|
102
|
+
pickupTipShake = "pickupTipShake"
|
|
103
|
+
dropTipShake = "dropTipShake"
|
|
104
|
+
doubleDropTip = "doubleDropTip"
|
|
105
|
+
needsUnstick = "needsUnstick"
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class AvailableUnits(enum.Enum):
|
|
109
|
+
mm = "mm"
|
|
110
|
+
amps = "amps"
|
|
111
|
+
speed = "mm/s"
|
|
112
|
+
presses = "presses"
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@dataclass
|
|
116
|
+
class RobotMountConfigs:
|
|
117
|
+
stepsPerMM: float
|
|
118
|
+
homePosition: float
|
|
119
|
+
travelDistance: float
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
@dataclass
|
|
123
|
+
class MutableConfig:
|
|
124
|
+
value: Union[int, float]
|
|
125
|
+
default: Union[int, float]
|
|
126
|
+
units: AvailableUnits
|
|
127
|
+
type: str
|
|
128
|
+
min: float
|
|
129
|
+
max: float
|
|
130
|
+
name: str
|
|
131
|
+
|
|
132
|
+
@classmethod
|
|
133
|
+
def build(
|
|
134
|
+
cls,
|
|
135
|
+
value: Union[int, float],
|
|
136
|
+
default: Union[int, float],
|
|
137
|
+
units: str,
|
|
138
|
+
type: str,
|
|
139
|
+
min: float,
|
|
140
|
+
max: float,
|
|
141
|
+
name: str,
|
|
142
|
+
) -> "MutableConfig":
|
|
143
|
+
if units == "mm/sec":
|
|
144
|
+
units = "mm/s"
|
|
145
|
+
return cls(
|
|
146
|
+
value=value,
|
|
147
|
+
default=default,
|
|
148
|
+
units=AvailableUnits(units),
|
|
149
|
+
type=type,
|
|
150
|
+
min=min,
|
|
151
|
+
max=max,
|
|
152
|
+
name=name,
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
def validate_and_add(self, new_value: Union[int, float]) -> None:
|
|
156
|
+
if new_value < self.min or new_value > self.max:
|
|
157
|
+
raise ValueError(f"{self.name} out of range with {new_value}")
|
|
158
|
+
self.value = new_value
|
|
159
|
+
|
|
160
|
+
def dict_for_encode(self) -> Dict[str, Union[int, float, str]]:
|
|
161
|
+
return {
|
|
162
|
+
"value": self.value,
|
|
163
|
+
"default": self.default,
|
|
164
|
+
"units": self.units.value,
|
|
165
|
+
"type": self.type,
|
|
166
|
+
"min": self.min,
|
|
167
|
+
"max": self.max,
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
@dataclass
|
|
172
|
+
class QuirkConfig:
|
|
173
|
+
value: bool
|
|
174
|
+
name: Quirks
|
|
175
|
+
|
|
176
|
+
@classmethod
|
|
177
|
+
def validate_and_build(cls, name: str, value: bool) -> "QuirkConfig":
|
|
178
|
+
quirk_name = Quirks(name)
|
|
179
|
+
cls.validate(name, value)
|
|
180
|
+
return cls(value=value, name=quirk_name)
|
|
181
|
+
|
|
182
|
+
@classmethod
|
|
183
|
+
def validate(cls, name: str, value: bool) -> None:
|
|
184
|
+
if not isinstance(value, bool):
|
|
185
|
+
raise ValueError(f"{value} is invalid for {name}")
|
|
186
|
+
|
|
187
|
+
def dict_for_encode(self) -> bool:
|
|
188
|
+
return self.value
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
TypeOverrides = Mapping[str, Union[float, bool, None]]
|
|
192
|
+
|
|
193
|
+
OverrideType = Dict[str, Union[Dict[str, QuirkConfig], MutableConfig, str]]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""
|
|
2
|
+
opentrons_shared_data.protocol: types and bindings for json protocols
|
|
3
|
+
"""
|
|
4
|
+
import json
|
|
5
|
+
from typing import Any, NewType, Dict
|
|
6
|
+
|
|
7
|
+
from .. import load_shared_data
|
|
8
|
+
|
|
9
|
+
Schema = NewType("Schema", Dict[str, Any])
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def load_schema(version: int) -> "Schema":
|
|
13
|
+
return json.loads(load_shared_data(f"protocol/schemas/{version}.json"))
|