feat(protocol-designer): generate Python for pickUpTip command #17610
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This emits Python for the PD atomic pickUpTip command. The Python code looks like this:
PD implements its own tip tracking and calculates exactly which tip to pick up. However, we don't want to emit the exact tip well in the Python code because it would make it painful for someone to edit the Python code to add or remove steps.
We do emit the tiprack ID in the Python code because PD makes the user choose which tiprack to use for each transfer. If we didn't emit the tiprack ID, the PAPI would pick the next available tiprack, which may not match the tiprack that the user chose in PD.
AUTH-1093
Test Plan and Hands on Testing
There was no existing unit test for the JSON
pickUpTip
command, so I added one.With this change, we can now generate a runnable Python protocol for a simple PD transfer. I checked that the protocol passes with
simulate
.Risk assessment
Low. Python generation is not used externally yet.