From cf51345b197083bcbd2d135dfba75e3295485b28 Mon Sep 17 00:00:00 2001 From: jbleon95 Date: Mon, 29 Jan 2024 09:47:55 -0500 Subject: [PATCH] comments requested in code review --- api/src/opentrons/protocol_api/core/engine/protocol.py | 6 ++++++ api/src/opentrons/protocol_engine/actions/actions.py | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/api/src/opentrons/protocol_api/core/engine/protocol.py b/api/src/opentrons/protocol_api/core/engine/protocol.py index 166bc34e52c..6d5d456a78f 100644 --- a/api/src/opentrons/protocol_api/core/engine/protocol.py +++ b/api/src/opentrons/protocol_api/core/engine/protocol.py @@ -154,6 +154,12 @@ def append_disposal_location( elif isinstance(disposal_location, WasteChute): # TODO(jbl 2024-01-25) hardcoding this specific addressable area should be refactored # when analysis is fixed up + # + # We want to tell Protocol Engine that there's a waste chute in the waste chute location when it's loaded, + # so analysis can prevent the user from doing anything that would collide with it. At the same time, we + # do not want to create a false negative when it comes to addressable area conflict. We therefore use the + # addressable area `1ChannelWasteChute` because every waste chute cutout fixture provides it and it will + # provide the engine with the information it needs. self._engine_client.state.addressable_areas.raise_if_area_not_in_deck_configuration( "1ChannelWasteChute" ) diff --git a/api/src/opentrons/protocol_engine/actions/actions.py b/api/src/opentrons/protocol_engine/actions/actions.py index 29778969c44..318b6a0e676 100644 --- a/api/src/opentrons/protocol_engine/actions/actions.py +++ b/api/src/opentrons/protocol_engine/actions/actions.py @@ -161,7 +161,12 @@ class AddLiquidAction: @dataclass(frozen=True) class AddAddressableAreaAction: - """Add an addressable area to state.""" + """Add a single addressable area to state. + + This differs from the deck configuration in PlayAction which sends over a mapping of cutout fixtures. + This action will only load one addressable area and that should be pre-validated before being sent via + the action. + """ addressable_area: AddressableAreaLocation