Skip to content

fix(step-generation): list off-deck labware last in tip_racks arg #18758

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 3 commits into from
Jun 27, 2025

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Jun 26, 2025

closes RQA-4309

Overview

Alex ran into a bug where the tip_racks arg in load_instrument for loading a pipette listed off-deck labware too soon, so analysis would fail thinking the tiprack to use was off-deck.

This analysis error wasn't caught in PD because PD's getNextTip logic lists off-deck tipracks last. So you will use all your tips on deck first before running into the "tip is off deck" error. We needed the python to match this by also listing off-deck labware last.

Test Plan and Hands on Testing

You can smoke test but also i added test coverage to test this. so just review the code!

Changelog

  • list off-deck labware last
  • add test overage

Risk assessment

low

@jerader jerader requested review from a team as code owners June 26, 2025 20:27
@jerader jerader requested review from ncdiehl11, koji and ddcc4 and removed request for a team June 26, 2025 20:27
Copy link

codecov bot commented Jun 26, 2025

Codecov Report

Attention: Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 25.66%. Comparing base (a5adfb8) to head (dd26451).
Report is 2 commits behind head on chore_release-pd-8.5.0.

Files with missing lines Patch % Lines
...organisms/ODD/QuickTransferFlow/utils/pythonDef.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                    Coverage Diff                     @@
##           chore_release-pd-8.5.0   #18758      +/-   ##
==========================================================
+ Coverage                   25.65%   25.66%   +0.01%     
==========================================================
  Files                        3219     3219              
  Lines                      278627   278652      +25     
  Branches                    28962    28985      +23     
==========================================================
+ Hits                        71472    71524      +52     
+ Misses                     207126   207099      -27     
  Partials                       29       29              
Flag Coverage Δ
protocol-designer 19.12% <96.00%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
step-generation/src/utils/pythonFileUtils.ts 88.14% <100.00%> (+0.46%) ⬆️
...organisms/ODD/QuickTransferFlow/utils/pythonDef.ts 0.00% <0.00%> (ø)

... and 4 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.

const bOffDeck =
getSlotInLocationStack(labwareRobotState[b.id].stack) === 'offDeck'
return Number(aOffDeck) - Number(bOffDeck)
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is fine. It might take slightly less brainpower for a reader if you just split it into 2 lists though, like:

const onDeckTipracks = allTipracks.filter(...)
const offDeckTipracks = allTipracks.filter(...)
const tiprackPythonNames = [...onDeckTipracks, ...offDeckTipracks].map(...)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh ya i like that better actualy. i'm going to change it. thanks!

[]
)
// list off-deck labware last to match getNextTip logic
const tiprackPythonNames = allTipracks
Copy link
Contributor

Choose a reason for hiding this comment

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

probably protecting the original array would be better.

Suggested change
const tiprackPythonNames = allTipracks
const tiprackPythonNames = [...allTipracks]

@jerader jerader merged commit 24e3588 into chore_release-pd-8.5.0 Jun 27, 2025
28 checks passed
@jerader jerader deleted the sg_off-deck-tips-last branch June 27, 2025 12:25
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.

3 participants