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): emit Python for dispense command #17601

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

ddcc4
Copy link
Contributor

@ddcc4 ddcc4 commented Feb 26, 2025

Overview

This generates the Python code for the PD atomic dispense command. AUTH-1094

As with the aspirate command, for the dispense(rate=...), we have to emit a literal division expression in the Python code because the PAPI takes a ratio, and we don't know what the PAPI default flow rate for the pipette is.

Test Plan and Hands on Testing

Added unit tests.

I also took the generated Python and used simulate to confirm that it's well-formed.

Review requests

The JSON command has a { meta: { isAirGap } } to indicate that we're dispensing air. There is no corresponding way to indicate that in the Python API. So we're supposed to just use the dispense() API for both liquid and air, right?

Risk assessment

Low. Python code generation is not used externally yet.

@ddcc4 ddcc4 requested review from sanni-t and ncdiehl11 February 26, 2025 23:05
@ddcc4 ddcc4 requested a review from a team as a code owner February 26, 2025 23:05
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.71%. Comparing base (1bcbccb) to head (459a4d8).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             edge   #17601   +/-   ##
=======================================
  Coverage   25.70%   25.71%           
=======================================
  Files        2843     2843           
  Lines      218884   218900   +16     
  Branches    17947    17949    +2     
=======================================
+ Hits        56268    56284   +16     
  Misses     162601   162601           
  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/dispense.ts 86.82% <100.00%> (+1.03%) ⬆️

... and 1 file with indirect coverage changes

Copy link
Collaborator

@ncdiehl11 ncdiehl11 left a comment

Choose a reason for hiding this comment

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

this LGTM

@ddcc4 ddcc4 merged commit e7e666c into edge Feb 27, 2025
24 checks passed
@ddcc4 ddcc4 deleted the dc-pd-py-dispense branch February 27, 2025 20:27
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