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 uiMaxFlowRate key to pipette definitions #14859

Merged
merged 16 commits into from
Apr 17, 2024

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Apr 10, 2024

closes AUTH-328

Overview

This PR add max flow rate values to each GEN2 and GEN3 pipette model definition to be used for FE applications, based off of the calculations here

Rather than having a max flow rate for every pipette's supported tip's volume for aspirate and dispense, we have only 1 max flow rate for every pipette's supported tip that is. That value is based off of the lowest volume minus 2% to account for safety.

For example:
p1000_single_v3.6 has a minVolume of 5uL. The t50 tips has a max flow rate at volume 5uL of 801.3. So the uiMaxFlowRate value is 98% of that which is 785.2

The new key in the definition is called uiMaxFlowRate because it is limited to the lowest volume's max flow rate, which will be used for FE applications only (Quick transfer and PD)

🔈 Additionally, the lowVolumeDefault default flow rates for aspirate, dispense, and blowout have been changed to match the uiMaxFlowRate. This DOES NOT result in a physical change behavior and the change is needed for ui purposes.

Test Plan

Review the additions to the definitions
Review the pytest

Changelog

  • add uiMaxFlowRate key to each pipette liquid definitions's supported tips
  • change the lowVolumeDefault flowrates to match the uiMaxFlowRate
  • add to JS type and add to schema
  • make a pytest that asserts that the ui max flow rate value is less than all the max flow rate values for aspirate and dispense for that pipette's supported tip
  • create new ul_per_mm python file and copy over the piecewise_volume_conversion fn from the api hardware directory, removing the old version

Review requests

see test plan

Risk assessment

low-ish, nothing is using these new values yet

@jerader jerader requested a review from a team as a code owner April 10, 2024 18:26
@jerader jerader requested review from brenthagen, andySigler, sfoster1, a team, sanni-t, jbleon95, koji and ecormany and removed request for a team and brenthagen April 10, 2024 18:26
@jerader jerader requested a review from a team as a code owner April 10, 2024 21:08
@jerader jerader changed the title feat(shared-data): create getMaxFlowRateByVolume util feat(shared-data): add maxFlowRate key to pipette definitions Apr 10, 2024
@jerader jerader marked this pull request as draft April 12, 2024 16:54
@jerader jerader removed the request for review from jbleon95 April 12, 2024 17:45
@jerader jerader marked this pull request as ready for review April 15, 2024 12:26
@jerader jerader requested a review from a team as a code owner April 15, 2024 12:26
@jerader jerader changed the title feat(shared-data): add maxFlowRate key to pipette definitions feat(shared-data): add uiMaxFlowRate key to pipette definitions Apr 15, 2024
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Looks great overall, but a couple things

  • Definitely need to call out the actual lowVolumeDefault changes in the description a bit more; as we discussed, they're fine because they won't result in actual changed physical behavior, but they should be highlighted
  • This is less significant of an opinion - it could also be a followup - but we need to switch the python over to importing ul_per_mm from the new location at some point

"24": 10.0,
"48": 10.0
},
"speed": 10.0,
Copy link
Member

Choose a reason for hiding this comment

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

this is going to cause issues when merged and is because this is based on an old edge - may want to merge recent edge into this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops i did not catch this when i merged edge in, thank you!

"defaultAspirateFlowRate": {
"default": 35,
"valuesByApiLevel": { "2.14": 35 }
"default": 32.6,
Copy link
Member

Choose a reason for hiding this comment

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

Let's call this out in the PR description and thus the eventual commit message a little more please

@@ -0,0 +1,33 @@
from typing import List, Tuple
Copy link
Member

Choose a reason for hiding this comment

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

We prooobably should change the code that imports this to import it from here also

@@ -92,6 +92,11 @@
"dispense": {
"type": "array",
"items": { "$ref": "#/definitions/liquidHandlingSpecs" }
},
"uiMaxFlowRate": {
"type": "string",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"type": "string",
"type": "number",

or probably better is to use a reference to the existing positiveNumber

@jerader jerader changed the title feat(shared-data): add uiMaxFlowRate key to pipette definitions feat(shared-data, api): add uiMaxFlowRate key to pipette definitions Apr 16, 2024
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@jerader jerader merged commit aae8a10 into edge Apr 17, 2024
58 checks passed
@jerader jerader deleted the shared-data_create-max-flowrate-util branch April 17, 2024 18:34
Carlos-fernandez pushed a commit that referenced this pull request May 20, 2024
…14859)

closes AUTH-328

This PR add max flow rate values to each GEN2 and GEN3 pipette model
definition to be used for FE applications.

Rather than having a max flow rate for every pipette's supported tip's
volume for aspirate and dispense, we have only 1 max flow rate for every
pipette's supported tip that is. That value is based off of the lowest
volume minus 2% to account for safety.

For example:
`p1000_single_v3.6` has a `minVolume` of 5uL. The `t50` tips has a max
flow rate at volume 5uL of `801.3`. So the `uiMaxFlowRate` value is 98%
of that which is `785.2`

🔈 Additionally, the `lowVolumeDefault` default flow rates for
`aspirate`, `dispense`, and `blowout` have been changed to match the
`uiMaxFlowRate`. This DOES NOT result in a physical change behavior and
the change is needed for ui purposes.
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.

5 participants