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

refactor(api): Allow aspirate, dispense and blow-out in place in PE and PAPI #12105

Merged
merged 89 commits into from
Feb 17, 2023

Conversation

TamarZanzouri
Copy link
Contributor

@TamarZanzouri TamarZanzouri commented Feb 6, 2023

Overview

closes https://opentrons.atlassian.net/browse/RCORE-540.
Allow PE and PAPI via engine core to preform aspirate, dispense and blow-out in place.

Test Plan

Test on an OT-2 with core ff on or on an OT-3.
upload the following protocol:

from opentrons import protocol_api, types

metadata = {
    "apiLevel": "2.12",
}

def run(ctx: protocol_api.ProtocolContext) -> None:
    tip_rack = ctx.load_labware("opentrons_96_tiprack_300ul", 6)
    labware = ctx.load_labware("nest_96_wellplate_100ul_pcr_full_skirt", 3)
    pipette = ctx.load_instrument("p20_single_GEN2", types.Mount.RIGHT, [tip_rack])
    well = tip_rack.wells()[0]
    
    # offset the well to something obvious
    # to observe that the offset is not respected
    well_offset = types.Point(x=9, y=-9, z=0)

    pipette.pick_up_tip(well.top().move(well_offset))
    location_no_well = types.Location(point=labware["A1"].top().point, labware=None)
    pipette.move_to(location_no_well)
    pipette.aspirate()
    pipette.dispense(volume=20.0)
    pipette.blow_out()
    pipette.drop_tip()
  • make sure the pipette does an in-place command without a move to.

Changelog

  • Add PE aspirate and blow-out in place commands.
  • Added sync_client methods to aspirate, dispense and blow-out in place.
  • Wired up engine/core aspirate, dispense and blow-out to use in-place commands when well_core is None.
  • refactored instrumnt_context and added a method to return wether we are passing a Well or a Location to the core's.

Review requests

Does the changes make sense?
Did I forget anything for the PE commands?

Risk assessment

Low. Should act the same as the legacy papi. Should test with core ff on and off to make sure it behaves the same

@TamarZanzouri TamarZanzouri added the robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience). label Feb 6, 2023
@TamarZanzouri TamarZanzouri requested a review from a team as a code owner February 6, 2023 17:08
@TamarZanzouri TamarZanzouri marked this pull request as draft February 6, 2023 17:08
@codecov
Copy link

codecov bot commented Feb 6, 2023

Codecov Report

Merging #12105 (16b6fba) into edge (f302abb) will decrease coverage by 0.26%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #12105      +/-   ##
==========================================
- Coverage   74.02%   73.76%   -0.26%     
==========================================
  Files        2172     1458     -714     
  Lines       59816    48132   -11684     
  Branches     6104     2994    -3110     
==========================================
- Hits        44278    35504    -8774     
+ Misses      14174    12173    -2001     
+ Partials     1364      455     -909     
Flag Coverage Δ
app 46.80% <ø> (-25.66%) ⬇️
notify-server 89.13% <ø> (ø)
protocol-designer 45.89% <ø> (ø)
shared-data 75.90% <ø> (+0.72%) ⬆️
step-generation 88.46% <ø> (ø)

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

Impacted Files Coverage Δ
...i/src/opentrons/protocol_api/instrument_context.py 89.04% <ø> (+0.43%) ⬆️
api/src/opentrons/protocol_api/protocol_context.py 91.75% <ø> (+0.38%) ⬆️
...c/opentrons/protocol_engine/clients/sync_client.py 100.00% <ø> (ø)
...src/opentrons/protocol_engine/commands/__init__.py 100.00% <ø> (ø)
...entrons/protocol_engine/commands/command_unions.py 100.00% <ø> (ø)
...src/opentrons/protocol_engine/errors/exceptions.py 100.00% <ø> (ø)
shared-data/js/helpers/index.ts 78.15% <0.00%> (ø)
app/src/organisms/LabwareDetails/Gallery.tsx
app/src/pages/Devices/ProtocolRunDetails/index.tsx
...ettingsCalibration/DeckCalibrationConfirmModal.tsx
... and 712 more

@TamarZanzouri TamarZanzouri marked this pull request as ready for review February 7, 2023 19:36
@TamarZanzouri
Copy link
Contributor Author

Tested the aspirate-in-place and dispense-in-place on an OT2 with core ff on. will test blow-out-in-place

@TamarZanzouri TamarZanzouri changed the title refactor(api): Allow aspirate, dispense and blow-out in place refactor(api): Allow aspirate, dispense and blow-out in place in PE and PAPI Feb 7, 2023
TamarZanzouri and others added 25 commits February 17, 2023 09:55
Copy link
Contributor

@mcous mcous left a comment

Choose a reason for hiding this comment

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

Still LGTM!

@TamarZanzouri TamarZanzouri merged commit 14660bf into edge Feb 17, 2023
@TamarZanzouri TamarZanzouri deleted the RCORE-540-implement-in-place-commands branch February 17, 2023 19:13
@TamarZanzouri TamarZanzouri restored the RCORE-540-implement-in-place-commands branch February 17, 2023 19:16
@SyntaxColoring SyntaxColoring deleted the RCORE-540-implement-in-place-commands branch December 12, 2023 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants