Skip to content

Commit

Permalink
change multi_peek to multipeek since we do string logic that splits o…
Browse files Browse the repository at this point in the history
…n _ in a few places
  • Loading branch information
ryanthecoder committed Nov 19, 2024
1 parent a313e65 commit 1400574
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def load_serial_lookup_table() -> Dict[str, str]:
"single_channel": "single",
"ninety_six_channel": "96",
"eight_channel": "multi",
"eight_channel_peek": "multi_peek",
"eight_channel_peek": "multipeek",
}
_model_shorthand = {"p1000": "p1k", "p300": "p3h"}
for channel_dir in _dirs_in(config_path):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def channels_from_string(channels: str) -> PipetteChannelType:
"""
if channels == "96":
return PipetteChannelType.NINETY_SIX_CHANNEL
elif channels == "multi":
elif "multi" in channels:
return PipetteChannelType.EIGHT_CHANNEL
elif channels == "single":
return PipetteChannelType.SINGLE_CHANNEL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ def _update_all_models(configuration_to_update: List[str]) -> None:
"single_channel": "single",
"ninety_six_channel": "96",
"eight_channel": "multi",
"eight_channel_peek": "multipeek",
}

for channel_dir in os.listdir(paths_to_validate):
Expand Down
4 changes: 2 additions & 2 deletions shared-data/python/opentrons_shared_data/pipette/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def dict_for_encode(self) -> bool:
"p1000_single_gen2",
"p1000_single_flex",
"p1000_multi_flex",
"p1000_multi_peek",
"p1000_multipeek",
"p1000_96",
"p200_96",
]
Expand All @@ -243,7 +243,7 @@ class PipetteNameType(str, enum.Enum):
P1000_SINGLE_GEN2 = "p1000_single_gen2"
P1000_SINGLE_FLEX = "p1000_single_flex"
P1000_MULTI_FLEX = "p1000_multi_flex"
P1000_MULTI_PEEK = "p1000_multi_peek"
P1000_MULTI_PEEK = "p1000_multipeek"
P1000_96 = "p1000_96"
P200_96 = "p200_96"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def get_all_pipette_models() -> Iterator[PipetteModel]:
"single_channel": "single",
"ninety_six_channel": "96",
"eight_channel": "multi",
"eight_channel_peek": "multipeek",
}
assert os.listdir(paths_to_validate), "You have a path wrong"
for channel_dir in os.listdir(paths_to_validate):
Expand Down
3 changes: 3 additions & 0 deletions shared-data/python/tests/pipette/test_validate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def iterate_models() -> Iterator[PipetteModel]:
"single_channel": "single",
"ninety_six_channel": "96",
"eight_channel": "multi",
"eight_channel_peek": "multipeek",
}
defn_root = get_shared_data_root() / "pipette" / "definitions" / "2" / "liquid"
assert os.listdir(defn_root), "A path is wrong"
Expand Down Expand Up @@ -63,6 +64,7 @@ def test_pick_up_configs_configuration_by_nozzle_map_keys() -> None:
"single_channel": "single",
"ninety_six_channel": "96",
"eight_channel": "multi",
"eight_channel_peek": "multipeek",
}
assert os.listdir(paths_to_validate), "You have a path wrong"
for channel_dir in os.listdir(paths_to_validate):
Expand Down Expand Up @@ -105,6 +107,7 @@ def test_pick_up_configs_configuration_ordered_from_smallest_to_largest() -> Non
"single_channel": "single",
"ninety_six_channel": "96",
"eight_channel": "multi",
"eight_channel_peek": "multipeek",
}
assert os.listdir(paths_to_validate), "You have a path wrong"
for channel_dir in os.listdir(paths_to_validate):
Expand Down

0 comments on commit 1400574

Please sign in to comment.