feat(api): add aspirate_flow_rate/dispense_flow_rate to mix()#18405
feat(api): add aspirate_flow_rate/dispense_flow_rate to mix()#18405
aspirate_flow_rate/dispense_flow_rate to mix()#18405Conversation
| rate, | ||
| # We have to hide all new arguments from protocol_api_old/test_context.py. | ||
| # I don't know if the test is even valid, but I'm afraid to change the test. | ||
| **{"flow_rate": aspirate_flow_rate} |
There was a problem hiding this comment.
I'd rather us remove an old test that might have questionable value than using hacks in our production code to work around it. What is the problematic test in question?
There was a problem hiding this comment.
What is the problematic test in question?
It's protocol_api_old/test_context.py, like mentioned in the comment. It has a number of problems:
- The mock functions in that test (
fake_aspirate()andfake_dispense()) have totally different argument names from what's in our current API (e.g.,fake_aspirate()takesvolandloc, whereas our API takesvolumeandlocation). That means we can't even callaspirate()anddispense()with named arguments, because it would break the test. - The mock functions in that test also has different default arguments from what we have in the API (e.g.,
fake_aspirate()takesrate=None, whereas our API takesrate=1). That makes it hard to write code that works the same with both our API and that test. - The expected calls in the test are very specific, which makes it hard to add new arguments to our API.
So ... I think the test is annoying, but I don't know the history of the test and why it's there, so I'm afraid to just change the test, because it might be enforcing some behavior we need to preserve for ancient versions of the robot stack or something.
There was a problem hiding this comment.
OK, I've removed the silly kwargs workarounds now that we no longer need to support protocol_api_old/test_context.py.
…api_old/test_context.py`
…18405) # Overview Add the `aspirate_flow_rate` and `dispense_flow_rate` absolute flow arguments to the PAPI `mix()` function. AUTH-1624 This follows the theme of adding absolute flow rate support to the `InstrumentContext` functions that previously took a `rate` ratio. PD allows you to independently specify the flow rate for the aspirate and dispense in a Mix step, but the PAPI `mix()` function previously only allowed a single `rate` argument, which is a ratio that is multiplied by the pipette's default aspirate and dispense flow rates. (PD step generation worked around this limitation by changing the pipette's default aspirate/dispense rates for every Mix step. This change will let us generate simpler code.) ## Test Plan and Hands on Testing Added unit tests. You should be able to set one or both or none of `aspirate_flow_rate` and `dispense_flow_rate`. ## Risk assessment Medium. We're changing the public API. (cherry picked from commit 6f9b158)
…18405) # Overview Add the `aspirate_flow_rate` and `dispense_flow_rate` absolute flow arguments to the PAPI `mix()` function. AUTH-1624 This follows the theme of adding absolute flow rate support to the `InstrumentContext` functions that previously took a `rate` ratio. PD allows you to independently specify the flow rate for the aspirate and dispense in a Mix step, but the PAPI `mix()` function previously only allowed a single `rate` argument, which is a ratio that is multiplied by the pipette's default aspirate and dispense flow rates. (PD step generation worked around this limitation by changing the pipette's default aspirate/dispense rates for every Mix step. This change will let us generate simpler code.) ## Test Plan and Hands on Testing Added unit tests. You should be able to set one or both or none of `aspirate_flow_rate` and `dispense_flow_rate`. ## Risk assessment Medium. We're changing the public API. (cherry picked from commit 6f9b158)
…18405) # Overview Add the `aspirate_flow_rate` and `dispense_flow_rate` absolute flow arguments to the PAPI `mix()` function. AUTH-1624 This follows the theme of adding absolute flow rate support to the `InstrumentContext` functions that previously took a `rate` ratio. PD allows you to independently specify the flow rate for the aspirate and dispense in a Mix step, but the PAPI `mix()` function previously only allowed a single `rate` argument, which is a ratio that is multiplied by the pipette's default aspirate and dispense flow rates. (PD step generation worked around this limitation by changing the pipette's default aspirate/dispense rates for every Mix step. This change will let us generate simpler code.) ## Test Plan and Hands on Testing Added unit tests. You should be able to set one or both or none of `aspirate_flow_rate` and `dispense_flow_rate`. ## Risk assessment Medium. We're changing the public API. (cherry picked from commit 6f9b158)
…18405) # Overview Add the `aspirate_flow_rate` and `dispense_flow_rate` absolute flow arguments to the PAPI `mix()` function. AUTH-1624 This follows the theme of adding absolute flow rate support to the `InstrumentContext` functions that previously took a `rate` ratio. PD allows you to independently specify the flow rate for the aspirate and dispense in a Mix step, but the PAPI `mix()` function previously only allowed a single `rate` argument, which is a ratio that is multiplied by the pipette's default aspirate and dispense flow rates. (PD step generation worked around this limitation by changing the pipette's default aspirate/dispense rates for every Mix step. This change will let us generate simpler code.) ## Test Plan and Hands on Testing Added unit tests. You should be able to set one or both or none of `aspirate_flow_rate` and `dispense_flow_rate`. ## Risk assessment Medium. We're changing the public API. (cherry picked from commit 6f9b158)
…18405) # Overview Add the `aspirate_flow_rate` and `dispense_flow_rate` absolute flow arguments to the PAPI `mix()` function. AUTH-1624 This follows the theme of adding absolute flow rate support to the `InstrumentContext` functions that previously took a `rate` ratio. PD allows you to independently specify the flow rate for the aspirate and dispense in a Mix step, but the PAPI `mix()` function previously only allowed a single `rate` argument, which is a ratio that is multiplied by the pipette's default aspirate and dispense flow rates. (PD step generation worked around this limitation by changing the pipette's default aspirate/dispense rates for every Mix step. This change will let us generate simpler code.) ## Test Plan and Hands on Testing Added unit tests. You should be able to set one or both or none of `aspirate_flow_rate` and `dispense_flow_rate`. ## Risk assessment Medium. We're changing the public API. (cherry picked from commit 6f9b158)
…18405) # Overview Add the `aspirate_flow_rate` and `dispense_flow_rate` absolute flow arguments to the PAPI `mix()` function. AUTH-1624 This follows the theme of adding absolute flow rate support to the `InstrumentContext` functions that previously took a `rate` ratio. PD allows you to independently specify the flow rate for the aspirate and dispense in a Mix step, but the PAPI `mix()` function previously only allowed a single `rate` argument, which is a ratio that is multiplied by the pipette's default aspirate and dispense flow rates. (PD step generation worked around this limitation by changing the pipette's default aspirate/dispense rates for every Mix step. This change will let us generate simpler code.) ## Test Plan and Hands on Testing Added unit tests. You should be able to set one or both or none of `aspirate_flow_rate` and `dispense_flow_rate`. ## Risk assessment Medium. We're changing the public API. (cherry picked from commit 6f9b158)
Overview
Add the
aspirate_flow_rateanddispense_flow_rateabsolute flow arguments to the PAPImix()function. AUTH-1624This follows the theme of adding absolute flow rate support to the
InstrumentContextfunctions that previously took arateratio.PD allows you to independently specify the flow rate for the aspirate and dispense in a Mix step, but the PAPI
mix()function previously only allowed a singlerateargument, which is a ratio that is multiplied by the pipette's default aspirate and dispense flow rates. (PD step generation worked around this limitation by changing the pipette's default aspirate/dispense rates for every Mix step. This change will let us generate simpler code.)Test Plan and Hands on Testing
Added unit tests. You should be able to set one or both or none of
aspirate_flow_rateanddispense_flow_rate.Risk assessment
Medium. We're changing the public API.