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

refactor(api): use labware pool in stacker engine #17574

Open
wants to merge 11 commits into
base: edge
Choose a base branch
from

Conversation

CaseyBatten
Copy link
Contributor

@CaseyBatten CaseyBatten commented Feb 21, 2025

Overview

Make retrieve and store work with the labware pool.

flexStacker/retrieve will load up to three labwares (primary, adapter, and lid) and return all their ids. It will decrement the pool count, and set the stacker addressable area as used.

flexStacker/store will consume up to three labwares (primary, adapter, and lid) from whatever's on the carriage, and return all their ids. It doesn't have parameters, just takes whatever's on the carriage. It will fail if whatever's in the carriage doesn't match what's configured in the labware pool.

This PR only contains engine changes and it makes the protocol API a little unstable. We're still pulling the labware object out of the loaded-labwares core based on what's currently on the module; this will work as long as you've loaded the labware previously into the stacker hopper (the old API we're moving away from) and set the labware pool. Fail to load the labware, and you won't have a core; fail to configure the labware pool, and you'll get an error. The next PR will fix this by making the API properly load a labware object, but it should still work even now.

Test Plan and Hands on Testing

  • automated tests and analysis

Changelog

  • alter flexStacker/retrieve behavior to use the labware pool and not have parameters for the labware kinds anymore
  • alter flexStacker/store to modify the labware pool
  • Add batch updates for labware location and storage

Review requests

  • retrieve behavior look correct? not too awful to read?
  • ditto store?

Risk assessment

Low - Only effects new stacker behavior

Closes EXEC-1214

@CaseyBatten CaseyBatten requested a review from a team as a code owner February 21, 2025 22:45
@CaseyBatten CaseyBatten requested a review from a team as a code owner February 21, 2025 23:19
@CaseyBatten CaseyBatten requested a review from vegano1 February 21, 2025 23:19
Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 24.76%. Comparing base (f0b21f7) to head (bb32cc8).
Report is 7 commits behind head on edge.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #17574      +/-   ##
==========================================
- Coverage   25.65%   24.76%   -0.89%     
==========================================
  Files        2840     2840              
  Lines      218559   218579      +20     
  Branches    17945    17947       +2     
==========================================
- Hits        56067    54131    -1936     
- Misses     162477   164434    +1957     
+ Partials       15       14       -1     
Flag Coverage Δ
protocol-designer 18.86% <ø> (-0.01%) ⬇️
step-generation 4.37% <ø> (-0.01%) ⬇️

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

see 30 files with indirect coverage changes

@sfoster1 sfoster1 force-pushed the retrieve_store_labware_refactor branch 2 times, most recently from 0851bc7 to b92b97f Compare February 24, 2025 18:29
@sfoster1 sfoster1 marked this pull request as draft February 24, 2025 18:30
@sfoster1 sfoster1 force-pushed the retrieve_store_labware_refactor branch 2 times, most recently from 363349d to 669c6cc Compare February 24, 2025 19:07
@sfoster1 sfoster1 force-pushed the retrieve_store_labware_refactor branch from 669c6cc to 544ebaa Compare February 24, 2025 21:58
@sfoster1 sfoster1 changed the title refactor(api): Retrieve Labware refactor to support labware pools and stored labware refactor(api): place new labware from stacker retrieve Feb 24, 2025
@sfoster1 sfoster1 marked this pull request as ready for review February 24, 2025 22:09
@sfoster1 sfoster1 requested a review from ahiuchingau February 24, 2025 22:22
@sfoster1 sfoster1 changed the title refactor(api): place new labware from stacker retrieve refactor(api): use labware pool in flexStacker/retrieve Feb 25, 2025
@sfoster1 sfoster1 marked this pull request as draft February 25, 2025 15:22
@sfoster1 sfoster1 changed the title refactor(api): use labware pool in flexStacker/retrieve refactor(api): use labware pool in stacker engine Feb 25, 2025
@sfoster1 sfoster1 marked this pull request as ready for review February 25, 2025 20:49
)
originLocationSequence: LabwareLocationSequence | None = Field(
None, description="The origin location of the labware."
primaryLocationSequence: LabwareLocationSequence = Field(
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this location refer to? The deck location of the stacker where a labware started? Or is it an on-deck location or either one?

new_locations_by_id: typing.Dict[str, LabwareLocation]
"""Each new labwares's initial location keyed by Labware ID."""

offset_ids_by_id: typing.Dict[str, str | None]
Copy link
Contributor

Choose a reason for hiding this comment

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

these are stacker-specific offsets and not general labware offsets right?

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