Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): simulate not logging drop_tip with no args #14606

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions api/src/opentrons/protocol_api/instrument_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,11 +1024,17 @@ def drop_tip(
if isinstance(trash_container, labware.Labware):
well = trash_container.wells()[0]
else: # implicit drop tip in disposal location, not well
self._core.drop_tip_in_disposal_location(
trash_container,
home_after=home_after,
alternate_tip_drop=True,
)
with publisher.publish_context(
broker=self.broker,
command=cmds.drop_tip_in_disposal_location(
instrument=self, location=trash_container
),
):
self._core.drop_tip_in_disposal_location(
trash_container,
home_after=home_after,
alternate_tip_drop=True,
)
self._last_tip_picked_up_from = None
return self

Expand Down
11 changes: 11 additions & 0 deletions api/tests/opentrons/data/ot2_drop_tip.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from opentrons import protocol_api

requirements = {"robotType": "OT-2", "apiLevel": "2.16"}


def run(ctx: protocol_api.ProtocolContext) -> None:
tipracks = [ctx.load_labware("opentrons_96_tiprack_300ul", "5")]
m300 = ctx.load_instrument("p300_multi_gen2", "right", tipracks)

m300.pick_up_tip()
m300.drop_tip()
7 changes: 7 additions & 0 deletions api/tests/opentrons/test_simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ def test_simulate_without_filename(protocol: Protocol, protocol_file: str) -> No
"Dropping tip into H12 of Opentrons OT-2 96 Tip Rack 1000 µL on slot 1",
],
),
(
"ot2_drop_tip.py",
[
"Picking up tip from A1 of Opentrons OT-2 96 Tip Rack 300 µL on slot 5",
"Dropping tip into Trash Bin on slot 12",
],
),
],
)
def test_simulate_function_apiv2_run_log(
Expand Down
Loading