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 87.20000% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.16%. Comparing base (daadb45) to head (932968c).
⚠️ Report is 16 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 ⚠️
protocol-designer/src/file-data/helpers/index.ts 0.00% 3 Missing ⚠️
...src/commandCreators/atomic/flexStackerFillItems.ts 98.55% 1 Missing ⚠️
step-generation/src/utils/pythonFileUtils.ts 96.55% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             edge   #20293       +/-   ##
===========================================
+ Coverage   25.65%   57.16%   +31.51%     
===========================================
  Files        3643     3647        +4     
  Lines      303288   304272      +984     
  Branches    42328    42850      +522     
===========================================
+ Hits        77807   173937    +96130     
+ Misses     225457   130119    -95338     
- Partials       24      216      +192     
Flag Coverage Δ
app 46.44% <4.80%> (+45.51%) ⬆️
protocol-designer 19.38% <17.60%> (-0.01%) ⬇️
step-generation 5.70% <81.60%> (+0.07%) ⬆️

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

Files with missing lines Coverage Δ
.../formLevel/stepFormToArgs/flexStackerFormToArgs.ts 97.50% <100.00%> (+0.06%) ⬆️
.../stepFormToArgs/test/flexStackerFormToArgs.test.ts 100.00% <100.00%> (ø)
.../src/commandCreators/atomic/flexStackerRetrieve.ts 100.00% <100.00%> (ø)
...ion/src/commandCreators/atomic/flexStackerStore.ts 100.00% <100.00%> (ø)
...tep-generation/src/commandCreators/atomic/index.ts 100.00% <ø> (ø)
step-generation/src/commandCreators/index.ts 100.00% <ø> (ø)
step-generation/src/index.ts 100.00% <ø> (ø)
step-generation/src/types.ts 100.00% <ø> (ø)
step-generation/src/utils/misc.ts 62.00% <100.00%> (-4.67%) ⬇️
...src/commandCreators/atomic/flexStackerFillItems.ts 98.55% <98.55%> (ø)
... and 4 more

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

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.

looking good. looking forward to smoke testing soon

Copy link
Collaborator

Choose a reason for hiding this comment

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

nice

},
],
python: `${labwarePythonName} = ${modulePythonName}.retrieve()`,
python: `${modulePythonName}.retrieve()`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

wait we decided we don't need this since the labware already has a python name associated right?

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! there is a load labware command assosciated with it so we already know the python name 😄

@jerader jerader merged commit 92c657a into edge Dec 10, 2025
78 checks passed
@jerader jerader deleted the sg_fill-items-set-items branch December 10, 2025 21:23
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.

5 participants