Skip to content

Conversation

@jerader
Copy link
Collaborator

@jerader jerader commented Dec 4, 2025

closes EXEC-2102

Overview

Emit fill_items() and set_stored_labware_items() instead of fill() and set_stored_labware(). you can't smoke test this yet though

Also i reverted retrieve() back to before lol.

This change came from the meeting today:

Example code we should get from this:

plate_1 = load_labware(location: offDeck)
plate_2 = load_labware(location: offDeck)
stacker_1 = load_module()
stacker_1.set_stored_labware_items([plate_1])
stacker_1.retrieve() // retrieve plate_1
stacker_1.fill_items([plate_2])
stacker_1.retrieve() // retrieve plate_2

Test Plan and Hands on Testing

review the code. i didn't wire up fill_items() state update - i'll do that later on when we have things more wired up.

you can actually test emitting set_stored_labware_items() though!

Changelog

add the missing types
refactor fill and set stored labware utils
add test cases

Risk assessment

low

@jerader jerader requested a review from a team as a code owner December 4, 2025 20:53
@jerader jerader requested review from TamarZanzouri, ddcc4 and ncdiehl11 and removed request for a team and ncdiehl11 December 4, 2025 20:53
@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 85.18519% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.58%. Comparing base (abc2673) to head (2cf4e98).
⚠️ Report is 1 commits behind head on edge.

Files with missing lines Patch % Lines
...neration/src/getNextRobotStateAndWarnings/index.ts 25.00% 6 Missing ⚠️
...src/getNextRobotStateAndWarnings/stackerUpdates.ts 16.66% 5 Missing ⚠️
step-generation/src/utils/pythonFileUtils.ts 96.42% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #20293      +/-   ##
==========================================
- Coverage   25.59%   25.58%   -0.01%     
==========================================
  Files        3636     3641       +5     
  Lines      303087   303341     +254     
  Branches    42340    42355      +15     
==========================================
+ Hits        77560    77603      +43     
- Misses     225503   225714     +211     
  Partials       24       24              
Flag Coverage Δ
protocol-designer 19.35% <14.81%> (+<0.01%) ⬆️
step-generation 5.62% <83.95%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
...src/commandCreators/atomic/flexStackerFillItems.ts 100.00% <100.00%> (ø)
.../src/commandCreators/atomic/flexStackerRetrieve.ts 100.00% <100.00%> (ø)
step-generation/src/utils/pythonFileUtils.ts 88.14% <96.42%> (+0.14%) ⬆️
...src/getNextRobotStateAndWarnings/stackerUpdates.ts 87.70% <16.66%> (-2.47%) ⬇️
...neration/src/getNextRobotStateAndWarnings/index.ts 69.33% <25.00%> (-0.97%) ⬇️

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

Copy link
Contributor

@TamarZanzouri TamarZanzouri left a comment

Choose a reason for hiding this comment

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

looks good! had a few questions but this is good to merge once we get those questions answered :-)

version=1,
count=1)`.trimStart()
flex_stacker_1 = protocol.set_stored_labware_list(
labware=[well_plate_4],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Out of curiosity: Is the PD UI not going to ask the user for a string so that the user has something to look at when the ODD prompts them to fill the hopper? (The message arg to fill_items().)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ooooh this is an option, yes. i'll add the message arg

@jerader jerader requested a review from ddcc4 December 9, 2025 20:07
},
],
python: 'wellPlate_1 = mock_flex_stacker_1.retrieve()',
python: 'mock_flex_stacker_1.retrieve()',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks!


export const PAPI_VERSION = '2.27' // latest version from api/src/opentrons/protocols/api_support/definitions.py from the RS release branch
export const PD_APPLICATION_VERSION = '8.7.0' // latest PD version to insert into DESIGNER_APPLICATION blob
export const PAPI_VERSION = '2.28' // latest version from api/src/opentrons/protocols/api_support/definitions.py from the RS release branch
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again, we should really change this to the oldest API version that supports all the code that PD generates.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point, i thought i needed to update it for the _items() but i can revert it

Copy link
Collaborator

Choose a reason for hiding this comment

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

So for this particular PD release, let's bump it up to API 2.28, because @jbleon95 added a new feature to make LC transfers more efficient that's enabled in 2.28.

But I meant that we should update the comment to say pick the oldest API version that has the features we need, rather than the latest API version.

let parentName: string
let locationArg: string | undefined
if (onAdapter) {
if (onAdapter && !isLabwareOnHopper) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this for? Under what condition would something be onAdapter and isLabwareOnHopper?

And if something is on an adaptor and in the hopper, wouldn't you still want its parent to be the adaptor?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ya i need to fix the onAdapter name. it actually means, onLabware either an adapter or a stack of labwares.

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.

4 participants