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

feat(protocol-designer): generate Python for pickUpTip command #17610

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

ddcc4
Copy link
Contributor

@ddcc4 ddcc4 commented Feb 27, 2025

Overview

This emits Python for the PD atomic pickUpTip command. The Python code looks like this:

pipette_left.pick_up_tip(location=tip_rack_1)

PD implements its own tip tracking and calculates exactly which tip to pick up. However, we don't want to emit the exact tip well in the Python code because it would make it painful for someone to edit the Python code to add or remove steps.

We do emit the tiprack ID in the Python code because PD makes the user choose which tiprack to use for each transfer. If we didn't emit the tiprack ID, the PAPI would pick the next available tiprack, which may not match the tiprack that the user chose in PD.

AUTH-1093

Test Plan and Hands on Testing

There was no existing unit test for the JSON pickUpTip command, so I added one.

With this change, we can now generate a runnable Python protocol for a simple PD transfer. I checked that the protocol passes with simulate.

Risk assessment

Low. Python generation is not used externally yet.

@ddcc4 ddcc4 requested review from sanni-t and jerader February 27, 2025 22:57
@ddcc4 ddcc4 requested a review from a team as a code owner February 27, 2025 22:57
@ddcc4 ddcc4 force-pushed the dc-pdpy-pickuptip branch from 17224de to 301f4d0 Compare February 27, 2025 23:01
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.71%. Comparing base (50c487c) to head (301f4d0).
Report is 10 commits behind head on edge.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             edge   #17610   +/-   ##
=======================================
  Coverage   25.71%   25.71%           
=======================================
  Files        2843     2843           
  Lines      218924   218930    +6     
  Branches    17949    17949           
=======================================
+ Hits        56299    56305    +6     
  Misses     162610   162610           
  Partials       15       15           
Flag Coverage Δ
protocol-designer 18.96% <100.00%> (+<0.01%) ⬆️
step-generation 4.38% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
...generation/src/commandCreators/atomic/pickUpTip.ts 87.71% <100.00%> (+1.44%) ⬆️

Copy link
Collaborator

@jerader jerader left a comment

Choose a reason for hiding this comment

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

lgtm!

@ddcc4 ddcc4 merged commit 631b593 into edge Mar 3, 2025
18 checks passed
@ddcc4 ddcc4 deleted the dc-pdpy-pickuptip branch March 3, 2025 16:31
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