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(engine): allow dropping tips in any labware #13504

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

sanni-t
Copy link
Member

@sanni-t sanni-t commented Sep 8, 2023

Closes RSS-277

Overview

Fixes a bug introduced in 6.3.0 that unintentionally raises an error when trying to drop tips into labware that is neither a fixed trash nor a tiprack.

Our API documentation clearly states that you can specify an arbitrary tip drop location in instrument_context.drop_tip(). Furthermore, the API allows assigning any labware as the designated trash container for a particular pipette, which is treated as the default tip drop location.
For executing both these cases, the engine needs to allow dropping tips into any labware; not just tiprack or fixed trash.

This is also necessary for the upcoming 'post-run-tip-drop' flow that the app is planning on adding.

Test Plan

This protocol should drop tips into the fixed trash, the tip rack and a reservoir as expected
(Can also be tested on the OT-2 by updating the protocol for OT-2)

requirements = {
	"robotType": "Flex",
	"apiLevel": "2.15"
}

def run(protocol_context):
	# For Flex:
	tiprack1 = protocol_context.load_labware("opentrons_flex_96_tiprack_50ul", "D2")
	pipette = protocol_context.load_instrument("flex_1channel_50", 'left', tip_racks=[tiprack1])
	
	pipette.pick_up_tip()
	pipette.drop_tip()		# Should drop tip at TOP of fixed trash in A3 (at an alternating location)

        pipette.pick_up_tip()
	pipette.drop_tip()		# Should drop tip at TOP of fixed trash in A3 (at an alternating location)

	pipette.drop_tip(pipette.trash_container['A1'].center())	# Should always drop tip in CENTER of Fixed trash

	trash_labware = protocol_context.load_labware("nest_1_reservoir_195ml", "D1")
	pipette.trash_container = trash_labware

	pipette.pick_up_tip()
	pipette.drop_tip()		# Should drop tip at CENTER TOP of Nest reservoir (NO alternating locations)

	pipette.pick_up_tip()
	pipette.drop_tip(pipette.trash_container['A1'].center())	# Should always drop tip in CENTER of Nest reservoir

	pipette.pick_up_tip()
	pipette.return_tip()	        # Should return tip to tiprack

Changelog

  • changed get_checked_tip_drop_location() to check if labware is tiprack, else drop tip to TOP of specified labware.
  • updated tests

Review requests

  • Make sure I am not messing up any side effects of tip dropping by allowing any arbitrary locations

Risk assessment

Low. Bug fix.

@sanni-t sanni-t requested a review from a team as a code owner September 8, 2023 19:01
@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Merging #13504 (64604d4) into chore_release-7.0.0 (dfa0892) will not change coverage.
Report is 25 commits behind head on chore_release-7.0.0.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           chore_release-7.0.0   #13504   +/-   ##
====================================================
  Coverage                71.33%   71.33%           
====================================================
  Files                     2418     2418           
  Lines                    67908    67908           
  Branches                  7876     7876           
====================================================
  Hits                     48443    48443           
  Misses                   17623    17623           
  Partials                  1842     1842           
Flag Coverage Δ
g-code-testing 96.44% <ø> (ø)
notify-server 89.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...i/src/opentrons/protocol_api/instrument_context.py 88.95% <ø> (ø)
...pi/src/opentrons/protocol_engine/state/geometry.py 100.00% <ø> (ø)

@sanni-t
Copy link
Member Author

sanni-t commented Sep 8, 2023

Tested on an OT-2 with above protocol.

Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grazie!

@sanni-t
Copy link
Member Author

sanni-t commented Sep 11, 2023

Tested protocol successfully on Flex as well.

api/known_hosts Outdated Show resolved Hide resolved
@sanni-t sanni-t force-pushed the api-fix_drop_tip_in_non_fixed_trash branch from 31524d8 to 64604d4 Compare September 12, 2023 19:41
@sanni-t sanni-t merged commit 57fa045 into chore_release-7.0.0 Sep 12, 2023
@sanni-t sanni-t deleted the api-fix_drop_tip_in_non_fixed_trash branch July 30, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants