Skip to content

Commit

Permalink
fix(hardware-testing): Actually use increment protocols so correct la…
Browse files Browse the repository at this point in the history
…bware is loaded (#13003)
  • Loading branch information
andySigler authored Jun 28, 2023
1 parent dd8efa6 commit e12ff88
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions hardware-testing/hardware_testing/gravimetric/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
gravimetric_ot3_p1000_96_1000ul_tip,
photometric_ot3_p1000_96_50ul_tip,
photometric_ot3_p1000_96_200ul_tip,
gravimetric_ot3_p50_multi_50ul_tip_increment,
gravimetric_ot3_p1000_multi_50ul_tip_increment,
gravimetric_ot3_p1000_multi_200ul_tip_increment,
gravimetric_ot3_p1000_multi_1000ul_tip_increment,
)

from . import execute, helpers, workarounds, execute_photometric
Expand Down Expand Up @@ -53,6 +57,30 @@
},
}

GRAVIMETRIC_CFG_INCREMENT = {
50: {
1: {50: gravimetric_ot3_p50_single},
8: {50: gravimetric_ot3_p50_multi_50ul_tip_increment},
},
1000: {
1: {
50: gravimetric_ot3_p1000_single,
200: gravimetric_ot3_p1000_single,
1000: gravimetric_ot3_p1000_single,
},
8: {
50: gravimetric_ot3_p1000_multi_50ul_tip_increment,
200: gravimetric_ot3_p1000_multi_200ul_tip_increment,
1000: gravimetric_ot3_p1000_multi_1000ul_tip_increment,
},
96: {
50: gravimetric_ot3_p1000_96_50ul_tip,
200: gravimetric_ot3_p1000_96_200ul_tip,
1000: gravimetric_ot3_p1000_96_1000ul_tip,
},
},
}

PHOTOMETRIC_CFG = {
50: photometric_ot3_p1000_96_50ul_tip,
200: photometric_ot3_p1000_96_200ul_tip,
Expand All @@ -75,7 +103,12 @@ def run_gravimetric(
scale_delay: int,
) -> None:
"""Run."""
protocol_cfg = GRAVIMETRIC_CFG[pipette_volume][pipette_channels][tip_volume]
if increment:
protocol_cfg = GRAVIMETRIC_CFG_INCREMENT[pipette_volume][pipette_channels][
tip_volume
]
else:
protocol_cfg = GRAVIMETRIC_CFG[pipette_volume][pipette_channels][tip_volume]
execute.run(
protocol,
GravimetricConfig(
Expand Down Expand Up @@ -173,7 +206,10 @@ def run_photometric(
print(f"\t\t{offset['definitionUri']}")
print(f"\t\t{offset['vector']}")
LABWARE_OFFSETS.append(offset)
_protocol = GRAVIMETRIC_CFG[args.pipette][args.channels][args.tip]
if args.increment:
_protocol = GRAVIMETRIC_CFG_INCREMENT[args.pipette][args.channels][args.tip]
else:
_protocol = GRAVIMETRIC_CFG[args.pipette][args.channels][args.tip]
_ctx = helpers.get_api_context(
API_LEVEL, # type: ignore[attr-defined]
is_simulating=args.simulate,
Expand Down

0 comments on commit e12ff88

Please sign in to comment.