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(api): add execution of dispense steps for liquid class based transfer #17138

Open
wants to merge 4 commits into
base: AUTH-866-add-transfer-flow-builder
Choose a base branch
from

Conversation

sanni-t
Copy link
Member

@sanni-t sanni-t commented Dec 18, 2024

Addresses AUTH-866

Overview

Part 2 of the three-part series of implementing transfer function.

This PR adds InstrumentCore.dispense_liquid_class() which utilizes the TransferComponentsExecutor to execute the dispense steps in specific order. dispense_liquid_class() will then be utilized by the InstrumentCore.transfer_liquid() method to perform dispense during each transfer step. This method can also be accessed in the protocol by using private API accessors for testing purposes.

Changes to TransferComponentsExecutor:

  1. adds retract_after_dispensing() to execute post-dispense retraction steps
  2. adds a tip state tracker to the class in order to keep track of whether the pipette is 'ready to aspirate' and also track the liquid and air gap in the tip that either the single aspirate or dispense steps will be handling.

Test Plan and Hands on Testing

  • Integrated and on-robot testing will have to wait until this implementation is wired up to the public API
  • Added unit tests for all new functions and classes

Review requests

  • Some suggestions from the aspirate PR will still hold to this PR- eg, naming of TransferComponentsExecutor. Those will be addressed in the final PR. But let me know if there are any critical changes that should be made here.
  • Usual code review stuff

Risk assessment

Low. Makes no changes to the existing code.

Comment on lines 87 to 99
def update(
self,
liquid: Optional[float] = None,
air_gap: Optional[float] = None,
ready_to_aspirate: Optional[bool] = None,
) -> None:
"""Update the tip state contents with given values."""
if liquid is not None:
self.last_liquid_and_air_gap_in_tip.liquid = liquid
if air_gap is not None:
self.last_liquid_and_air_gap_in_tip.air_gap = air_gap
if ready_to_aspirate is not None:
self.ready_to_aspirate = ready_to_aspirate
Copy link
Member Author

Choose a reason for hiding this comment

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

Remove

`TransferComponentsExecutor`s should be ready_to_aspirate == True.
"""

ready_to_aspirate: bool = True
Copy link
Member Author

Choose a reason for hiding this comment

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

Consider making this an enum that keeps track of where the plunger is

@sanni-t sanni-t changed the base branch from AUTH-866-add-transfer-flow-builder to edge December 19, 2024 18:44
@sanni-t sanni-t force-pushed the AUTH-866-add-transfer-flow-builder-2 branch from c3cc384 to 9b2de59 Compare December 20, 2024 06:21
@sanni-t sanni-t changed the base branch from edge to AUTH-866-add-transfer-flow-builder December 20, 2024 06:21
@sanni-t sanni-t marked this pull request as ready for review January 2, 2025 15:53
@sanni-t sanni-t requested a review from a team as a code owner January 2, 2025 15:53
@sanni-t sanni-t requested review from jbleon95 and ddcc4 January 2, 2025 15:53
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.

1 participant