Skip to content

feat(monorepo): transfer command creator overhaul: pt1 #18217

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

Merged
merged 13 commits into from
May 2, 2025

Conversation

ncdiehl11
Copy link
Collaborator

@ncdiehl11 ncdiehl11 commented Apr 30, 2025

Overview

This PR begins the work of implementing the new transfer_liquid API logic in step generation logic for the transfer compound command creator. Because of the impact of these changes, I have decided to implement the command creator updates incrementally. My planned chunks for implementation are as follows:

  • aspirate submerge (scope of this PR)
  • aspirate retract
  • dispense submerge
  • dispense retract

Test Plan and Hands on Testing

Due to the scope of this PR, I recommend walking through this live with me so I can explain some of the changes made. Please reference the step generation execution doc for correctness as well.

Changelog

  • add dummy data to app/src/organisms/ODD/QuickTransferFlow/utils/generateQuickTransferArgs.ts so that typechecks pass

Review requests

see test plan

Risk assessment

medium - high. touches foundational step generation command creator logic

This PR begins the work of implementing the new `transfer_liquid` API logic in step generation logic for the `transfer` compound command creator.
Copy link

codecov bot commented Apr 30, 2025

Codecov Report

Attention: Patch coverage is 87.53943% with 79 lines in your changes missing coverage. Please review.

Project coverage is 24.08%. Comparing base (150c20c) to head (128d5df).
Report is 12 commits behind head on edge.

Files with missing lines Patch % Lines
protocol-designer/src/steplist/substepTimeline.ts 43.75% 45 Missing ⚠️
...ickTransferFlow/utils/generateQuickTransferArgs.ts 0.00% 25 Missing ⚠️
...eneration/src/commandCreators/compound/transfer.ts 95.80% 6 Missing ⚠️
...rc/components/organisms/TipPositionModal/index.tsx 50.00% 1 Missing ⚠️
...lSteps/StepForm/StepTools/MoveLiquidTools/hooks.ts 0.00% 1 Missing ⚠️
...tep-generation/src/commandCreators/compound/mix.ts 99.19% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             edge   #18217       +/-   ##
===========================================
- Coverage   57.48%   24.08%   -33.41%     
===========================================
  Files        3043     3045        +2     
  Lines      255267   256275     +1008     
  Branches    30508    30553       +45     
===========================================
- Hits       146752    61733    -85019     
- Misses     108328   194525    +86197     
+ Partials      187       17      -170     
Flag Coverage Δ
protocol-designer 19.02% <42.27%> (+0.08%) ⬆️
step-generation 4.53% <75.86%> (+0.16%) ⬆️

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

Files with missing lines Coverage Δ
...rc/components/organisms/TipPositionModal/utils.tsx 72.80% <ø> (-0.48%) ⬇️
...t/formLevel/stepFormToArgs/moveLiquidFormToArgs.ts 85.59% <100.00%> (+0.24%) ⬆️
shared-data/js/helpers/getMmFromBottom.ts 100.00% <100.00%> (ø)
shared-data/js/helpers/index.ts 67.51% <ø> (+10.99%) ⬆️
...eneration/src/commandCreators/atomic/moveToWell.ts 86.48% <100.00%> (+0.14%) ⬆️
step-generation/src/errorCreators.ts 82.32% <100.00%> (+0.43%) ⬆️
step-generation/src/fixtures/commandFixtures.ts 91.11% <100.00%> (+4.83%) ⬆️
...neration/src/getNextRobotStateAndWarnings/index.ts 76.70% <100.00%> (+1.94%) ⬆️
step-generation/src/types.ts 100.00% <ø> (ø)
...rc/components/organisms/TipPositionModal/index.tsx 79.06% <50.00%> (-0.47%) ⬇️
... and 5 more

... and 1667 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ncdiehl11 ncdiehl11 self-assigned this May 1, 2025
@ncdiehl11 ncdiehl11 requested review from shlokamin and jerader May 1, 2025 18:50
@Opentrons Opentrons deleted a comment from jthryyy May 2, 2025
@Opentrons Opentrons deleted a comment from jthryyy May 2, 2025
@Opentrons Opentrons deleted a comment from jthryyy May 2, 2025
]
: []

export const mixInPlaceUtil = (args: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

i'm a bit unclear when you use mixInPlaceUtil vs mixUtil? mixInPlaceUtil is for when you're aspirating in place?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Correct— I developed mixInPlaceUtil for use in our compound command creators (transfer/consolidate/distribute) for aspirate and submerge mixes, since those mixes are always in place.

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.

made a first pass at the PR, definitely a heroic task to update the transfer.test.ts file 🚀 😆. left a handful of comments but in general things seem to work. did some smoke testing with step details and adding different fields and nothing broke. Will review again later.

@ncdiehl11 ncdiehl11 marked this pull request as ready for review May 2, 2025 14:01
@ncdiehl11 ncdiehl11 requested review from a team as code owners May 2, 2025 14:01
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.

i followed the doc you linked and everything looks correct for the steps that transfer emits, except for retract? i'm assuming thats happening in a follow up?

otherwise this lgtm

@ncdiehl11
Copy link
Collaborator Author

i followed the doc you linked and everything looks correct for the steps that transfer emits, except for retract? i'm assuming thats happening in a follow up?

otherwise this lgtm

Correct, aspirate retract and dispense updates coming in the next PRs. Thank you so much for the reviews

@ncdiehl11 ncdiehl11 merged commit f29180b into edge May 2, 2025
50 of 51 checks passed
@ncdiehl11 ncdiehl11 deleted the sg_feat-transfer-pt1 branch May 2, 2025 17:33
minimumZHeight,
...(forceDirect != null ? { forceDirect } : {}),
...(minimumZHeight != null ? { minimumZHeight } : {}),
...(speed != null ? { speed } : null),
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey, I just saw this. We also have to remember to update the Python command below.

ddcc4 added a commit that referenced this pull request May 12, 2025
…8315)

# Overview

In PR #18217, @ncdiehl11 added support for the `moveToWell` parameters
`forceDirect`, `minimumZHeight`, `speed`. The Python `move_to()`
function has the same parameters, and we need to emit those parameters
when generating Python.

Nick will probably need the `forceDirect` option when implementing
liquid class transfers, because our Python
`transfer_with_liquid_class()` implementation uses `forceDirect=true`
when moving the pipette vertically into and out of the well.

## Test Plan and Hands on Testing

Added unit test.

## Risk assessment

Low.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants