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): dynamic liquid tracking instrument papi changes #17294

Closed
wants to merge 13 commits into from

Conversation

caila-marashaj
Copy link
Contributor

@caila-marashaj caila-marashaj commented Jan 16, 2025

Overview

This pr contains the protocol_api changes that will allow you to call dynamic liquid tracking from a protocol.
It won't actually work yet because the hardware api changes need to get merged in, but they're a-comin.

Static Liquid Tracking

The introduction of dynamic liquid tracking will also amend static liquid tracking behavior. Before, you would call an aspirate with static liquid tracking like this:
pip.aspirate(volume=whatever, location=w.meniscus(z=z_offset))

Currently on edge, the location well.meniscus() will automatically and immutably point to the projected liquid meniscus at the end of a liquid handling operation, which is not always what you want. For example, if you were to do this with a dispense, the pipette tip would hover above the liquid and then dispense into the air.

Using this code, however, you can call aspirate with static liquid tracking to target the ending liquid height:
pip.aspirate(volume=whatever, location=w.meniscus(z=z_offset, target="end")),

call dispense with static liquid tracking to target the beginning liquid height:
pip.dispense(volume=whatever, location=w.meniscus(z=z_offset, target="beginning")),

or call either one with dynamic liquid tracking:
pip.aspirate(volume=whatever, location=w.meniscus(z=z_offset, target="dynamic_meniscus"))
pip.dispense(volume=whatever, location=w.meniscus(z=z_offset, target="dynamic_meniscus"))

This won't break any existing protocols with static liquid tracking, because if the location meniscus is specified but no target given, the target will default to end, which was the previous behavior.

Changelog

  • create a MeniscusTracking type to store the desired target for liquid tracking
  • some wiring in papi to call down to the new AspirateWhileTracking/DispenseWhileTracking commands when dynamic liquid tracking is requested

Tests

Dynamic liquid tracking won't work in a protocol yet since the hardware control changes still need to be added, but:

  • make sure regular aspirate and dispense still work in a protocol
  • make sure aspirate and dispense with target="beginning" work as expected in a protocol
  • make sure aspirate and dispense with target="end" work as expected in a protocol
  • add some instrument context tests

@caila-marashaj caila-marashaj force-pushed the liquid-tracking-instrument-changes branch 2 times, most recently from b46ea46 to 155a465 Compare January 22, 2025 16:45
@caila-marashaj caila-marashaj marked this pull request as ready for review January 22, 2025 17:38
@caila-marashaj caila-marashaj requested a review from a team as a code owner January 22, 2025 17:38
@caila-marashaj caila-marashaj force-pushed the liquid-tracking-instrument-changes branch from 4d97743 to cd274cc Compare January 22, 2025 20:10
@caila-marashaj caila-marashaj force-pushed the liquid-tracking-instrument-changes branch 2 times, most recently from 303da65 to 02d0473 Compare February 3, 2025 22:21
@caila-marashaj caila-marashaj force-pushed the liquid-tracking-instrument-changes branch from 02d0473 to 7e74712 Compare February 25, 2025 16:26
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 24.06%. Comparing base (38905cf) to head (d57fe55).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #17294      +/-   ##
==========================================
- Coverage   25.72%   24.06%   -1.66%     
==========================================
  Files        2851     2851              
  Lines      219520   219517       -3     
  Branches    17975    17975              
==========================================
- Hits        56462    52836    -3626     
- Misses     163043   166672    +3629     
+ Partials       15        9       -6     
Flag Coverage Δ
app 1.09% <ø> (-2.34%) ⬇️
protocol-designer 18.96% <ø> (ø)
step-generation 4.39% <ø> (ø)

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

see 73 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.

@caila-marashaj caila-marashaj force-pushed the liquid-tracking-instrument-changes branch 3 times, most recently from 584cc3a to 709bb60 Compare February 28, 2025 17:01
@caila-marashaj caila-marashaj force-pushed the liquid-tracking-instrument-changes branch from 709bb60 to d57fe55 Compare March 5, 2025 19:58
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