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, protocol-designer): return latest pipette model def f… #14945

Merged
merged 6 commits into from
Apr 24, 2024

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Apr 18, 2024

…rom pipetteName and add max flow rates

closes AUTH-243 AUTH-245

Overview

Sorry this should really be 2 PRs but realized I needed the shared-data changes in order to properly test the protocol-designer changes.

This PR does 2 things:

  1. refactor the shared-data pipette v2 specs util to return the latest pipette model version definition that exists if it is given a pipette name. Spoke with Seth and Andy about this and they said that the first model version (3.0, 2.0, etc) are prototypes so we shouldn't use them.
  2. wire up max flow rates in PD using the uiMaxFlowRate key

Test Plan

  • create a flex or ot-2 protocol. Make sure you choose a flex or GEN2 pipette. Add a transfer or mix step and click on the flow rate input field. It should render the flow rate modal. See that the max flow rate is properly wired up.
  • review the util in shared-data and make sure the logic makes sense

Changelog

  • modify the flow rate field to use i18n strings and add a test for it and use the max flow rate from the pipette def key
  • modify the logic in the pipette spec v2 util to return the latest pipette model version given a pipette name

Review requests

see test plan

Risk assessment

low

@jerader jerader changed the title feat(shared-data, protocol-designer): return latest pipette model v f… feat(shared-data, protocol-designer): return latest pipette model def f… Apr 18, 2024
@jerader jerader marked this pull request as ready for review April 18, 2024 12:47
@jerader jerader requested review from a team as code owners April 18, 2024 12:47
@jerader jerader requested review from shlokamin, koji and ncdiehl11 and removed request for a team April 18, 2024 12:47
shared-data/js/pipettes.ts Outdated Show resolved Hide resolved
shared-data/js/pipettes.ts Outdated Show resolved Hide resolved
@koji
Copy link
Contributor

koji commented Apr 22, 2024

Screenshot 2024-04-22 at 12 57 14 PM

not an issue but it's a little bit un-user-friendly since the default is 3.78 but we don't allow users to use 1 decimal place.

For the error message, A max of 1 decimal places is allowed

maybe One decimal place is allowed is enough?

@ecormany any thought on the above error message?

@jerader
Copy link
Collaborator Author

jerader commented Apr 22, 2024

For the error message, A max of 1 decimal places is allowed

@koji good catch, this is legacy behavior haha, we can see what @ecormany says!

@ecormany
Copy link
Contributor

I don't think we should restrict the number of decimals entered, since the Python API doesn't. Any valid float between the mix and max for the pipette–tip combo should be fine. I just tested this on 2.17:

    p50.flow_rate.aspirate = 1.23456
    p50.aspirate(50, plate['A1'])

which simulates as Aspirating 50.0 uL from A1 of NEST 96 Well Plate 200 µL Flat on slot A1 at 1.23456 uL/sec

@jerader jerader requested a review from koji April 24, 2024 11:39
@koji
Copy link
Contributor

koji commented Apr 24, 2024

@jerader
#14993

Copy link
Contributor

@koji koji left a comment

Choose a reason for hiding this comment

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

There are a few e2e test errors.
But the changes look to me.

@jerader
Copy link
Collaborator Author

jerader commented Apr 24, 2024

There are a few e2e test errors. But the changes look to me.

@koji oops good catch! i didn't notice

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.77%. Comparing base (8f50b08) to head (3500eb1).
Report is 113 commits behind head on edge.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #14945      +/-   ##
==========================================
+ Coverage   67.50%   75.77%   +8.27%     
==========================================
  Files        2521       29    -2492     
  Lines       72090     2180   -69910     
  Branches     9311        0    -9311     
==========================================
- Hits        48666     1652   -47014     
+ Misses      21228      528   -20700     
+ Partials     2196        0    -2196     
Flag Coverage Δ
api ?
app ?
components ?
g-code-testing ?
hardware ?
hardware-testing ?
labware-library ?
notify-server ?
ot3-gravimetric-test ?
protocol-designer ?
react-api-client ?
robot-server ?
shared-data 75.77% <ø> (+0.46%) ⬆️
step-generation ?
system-server ?
update-server ?
usb-bridge ?

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

see 2497 files with indirect coverage changes

@jerader jerader merged commit 9d75e1f into edge Apr 24, 2024
32 checks passed
@jerader jerader deleted the pd_custom-flow-rate branch April 24, 2024 15:37
Carlos-fernandez pushed a commit that referenced this pull request May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants