Skip to content

Commit

Permalink
better TODO comments and minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jbleon95 committed Oct 30, 2023
1 parent dccf4f0 commit 868a6b2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_api/core/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def set_last_location(
def get_deck_definition(self) -> DeckDefinitionV4:
"""Get the geometry definition of the robot's deck."""

# TODO this may or may not exist past the rapid dev part of Deck Configuration
# TODO(jbl 10-30-2023) this method may no longer need to exist post deck config work being completed
@abstractmethod
def get_slot_definition(self, slot: DeckSlotName) -> SlotDefV3:
"""Get the slot definition from the robot's deck."""
Expand Down
2 changes: 1 addition & 1 deletion api/src/opentrons/protocol_api/deck.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(
self._core_map = core_map
self._api_version = api_version

# TODO make this less hardcoded when we figure out how load slots based off of deck configuration
# TODO(jbl 10-30-2023) this hardcoding should be removed once slots are refactored to work with deck config
if self._protocol_core.robot_type == "OT-2 Standard":
ordered_slot_ids = [
"1",
Expand Down
4 changes: 3 additions & 1 deletion api/tests/opentrons/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ def _make_ot3_pe_ctx(
),
drop_tips_after_run=False,
post_run_hardware_state=PostRunHardwareState.STAY_ENGAGED_IN_PLACE,
load_fixed_trash=True, # TODO change how this works, make a new one?
# TODO(jbl 10-30-2023) load_fixed_trash being hardcoded to True will be refactored once we need tests to have
# this be False
load_fixed_trash=True,
) as (
engine,
loop,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,6 @@ def test_load_module(
[mock_hw_mod_1, mock_hw_mod_2]
)

# _get_slot_def(deck_def=deck_def, slot_name=slot_name) # type: ignore[arg-type]
decoy.when(subject.get_slot_definition(slot_name)).then_return(
cast(
SlotDefV3,
Expand Down
2 changes: 2 additions & 0 deletions api/tests/opentrons/protocol_api/test_deck.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ def test_delitem_raises_if_slot_has_module(
del subject[2]


# TODO(jbl 10-30-2023) the following commented out tests are too tightly coupled to DeckDefinitionV3 to easily port over
# Either refactor them when the deck class is updated/made anew or delete them later
# @pytest.mark.parametrize(
# "deck_definition",
# [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ def test_get_slot_definition(ot2_standard_deck_def: DeckDefinitionV4) -> None:
result = subject.get_slot_definition(DeckSlotName.SLOT_6)

assert result["id"] == "6"
# assert result == ot2_standard_deck_def["locations"]["orderedSlots"][5]
assert result["displayName"] == "Slot 6"


def test_get_slot_definition_raises_with_bad_slot_name(
Expand Down

0 comments on commit 868a6b2

Please sign in to comment.