feat(api): implement mix() parameters aspirate_delay and dispense_delay#18000
feat(api): implement mix() parameters aspirate_delay and dispense_delay#18000
aspirate_delay and dispense_delay#18000Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## edge #18000 +/- ##
=======================================
Coverage 24.44% 24.44%
=======================================
Files 2956 2956
Lines 228425 228425
Branches 19032 19032
=======================================
Hits 55843 55843
Misses 172570 172570
Partials 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
jerader
left a comment
There was a problem hiding this comment.
this is great, getting closer to always emitting python mix() when a mix step is added.
Oh wow, thanks for testing it in the app! |
sanni-t
left a comment
There was a problem hiding this comment.
LGTM! Just some small comments
| # protocol_api_old/test_context.py does not allow push_out at all, even if | ||
| # it's set to None, so we have to hide the argument to make the test pass. | ||
| # I don't know if the test is even valid, but I'm afraid to change the test. | ||
| dispense_kwargs = {"push_out": push_out} if push_out is not None else {} | ||
| self.dispense(volume, None, rate, **dispense_kwargs) |
There was a problem hiding this comment.
Hmm, ya looks like we're raising an error if push_out is used in dispense in API versions < 2.15. The old context tests are for < v2.15.
I guess another way to write this would have been to skip the push_out based on API version but this works too. Maybe you can update the comment to mention that legacy context based dispense doesn't take a push_out arg and hence you have to do this.
| mock_instrument_core.aspirate( | ||
| input_location, | ||
| mock_well._core, | ||
| 10.0, | ||
| 1, | ||
| 4.56, | ||
| True, | ||
| None, |
There was a problem hiding this comment.
A soft opinion- it's better to use kw args when calling any functions with more than 2 args, It gets difficult to read through the calls quickly otherwise.
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way.
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way.
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way.
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way.
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way.
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way.
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way.
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way.
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way.
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)
…delay` (#18000) # Overview In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI `mix()` call, which means that we can't translate a PD Mix step into a PAPI `mix()` call. This PR introduces the parameters `aspirate_delay` and `dispense_delay` to the `InstrumentContext.mix()` function. The new parameters are gated to API version 2.24 and above. AUTH-1366 ## Test Plan and Hands on Testing I added tests to demonstrate that this implementation emits the correct calls to `delay()` when the caller requests a delay in the `mix()`. This is what the output looks like in `simulate`: ``` Mixing 2 times with a volume of 20.0 ul Aspirating 20.0 uL from C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec Delaying for 0 minutes and 2.5 seconds Dispensing 20.0 uL into C2 of (Retired) Armadillo 96 Well Plate 200 µL PCR Full Skirt on slot A2 at 716.0 uL/sec ... ``` ## Review requests `InstrumentContext.mix()` calls `InstrumentContext.aspirate()` and `InstrumentContext.dispense()` to implement the mix, which is nice because the public `aspirate()` and `dispense()` functions handle things like publishing messages for the simulator. Ideally, we would also call the public `delay()` function for the delay. But the `delay()` function is in `ProtocolContext`, and `InstrumentContext` doesn't have access to that. We only have access to the `ProtocolCore`, so we have to publish messages to the simulator manually. I ended up refactoring the code of `mix()` a bit because it was going to get too repetitive and nested with the delays and `publish_context()` messages added. ## Risk assessment Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way. (cherry picked from commit 5012148)

Overview
In PD, you can specify a delay after each aspirate and dispense in a Mix step. There is no way to specify a delay in the PAPI
mix()call, which means that we can't translate a PD Mix step into a PAPImix()call.This PR introduces the parameters
aspirate_delayanddispense_delayto theInstrumentContext.mix()function. The new parameters are gated to API version 2.24 and above. AUTH-1366Test Plan and Hands on Testing
I added tests to demonstrate that this implementation emits the correct calls to
delay()when the caller requests a delay in themix().This is what the output looks like in
simulate:Review requests
InstrumentContext.mix()callsInstrumentContext.aspirate()andInstrumentContext.dispense()to implement the mix, which is nice because the publicaspirate()anddispense()functions handle things like publishing messages for the simulator.Ideally, we would also call the public
delay()function for the delay. But thedelay()function is inProtocolContext, andInstrumentContextdoesn't have access to that. We only have access to theProtocolCore, so we have to publish messages to the simulator manually.I ended up refactoring the code of
mix()a bit because it was going to get too repetitive and nested with the delays andpublish_context()messages added.Risk assessment
Should be low. The new parameters are version-gated. The main risk is that we release this, and then decide that we don't want to change the public API this way.