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

feat(shared-data, api): add stacker max fill height in shared-data definition #17609

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

Conversation

ahiuchingau
Copy link
Contributor

Overview

The stacker's stackable labware count is limited by the interior height of the stacker.
This PR adds this property as the maxStackerFillHeight in the module definition.

The flex_stacker/fill and flex_stacker/set_stored_labware commands are updated to use this property to calculate the actual max labware count based on the height of labware pool.

@ahiuchingau ahiuchingau requested review from a team as code owners February 27, 2025 20:47
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 23.34%. Comparing base (e7e666c) to head (3dbbecf).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #17609      +/-   ##
==========================================
- Coverage   25.71%   23.34%   -2.37%     
==========================================
  Files        2843     2843              
  Lines      218900   218893       -7     
  Branches    17949    17949              
==========================================
- Hits        56284    51096    -5188     
- Misses     162601   167784    +5183     
+ Partials       15       13       -2     
Flag Coverage Δ
app 0.36% <ø> (-3.07%) ⬇️
protocol-designer 18.96% <ø> (ø)
step-generation 4.38% <ø> (ø)

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

Files with missing lines Coverage Δ
...-data/python/opentrons_shared_data/module/types.py 100.00% <ø> (ø)

... and 100 files with indirect coverage changes


def get_height_of_stacker_labware_pool(self, module_id: str) -> float:
"""Get the overall height of a stack of labware in a Stacker module."""
stacker = self._modules.get_flex_stacker_substate(module_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

stacker could be None here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't think we'd need to handle when it returns None because the only time this function will be called from a stacker command, and the command should fail anyway if there's no stacker attached?


def get_stacker_max_fill_height(self, module_id: str):
"""Get the maximum fill height for the Flex Stacker."""
definition = self.get_definition(module_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

also could fail with None

Copy link
Contributor

@vegano1 vegano1 left a comment

Choose a reason for hiding this comment

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

very nice, thank you.

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.

2 participants