-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(app,api): Display thermocycler profile cycles (#16414)
We identified a simple bug with the app: it displays wonky numbers for thermocycler profile cycles: ![image (1)](https://github.com/user-attachments/assets/8005c0b6-c55e-4b48-bf50-7d90f91fa63b) This wouldn't repeat anything at all, what's going on? Well, it turns out that when Protocol Designer added thermocycler support, they wanted something a bit more in depth than the Python protocol API's "list of steps, number of times to repeat the cycle" format. They wanted users to be able to add single steps and cycles, in arbitrary order. To make the two styles work with the engine, we made the engine's `thermocycler/runProfile` command take a flat list of steps - any of the structure of repeated commands was removed. In the app's `CommandText` display, we then had to fix up the way we displayed profiles to remove references to a `repetitions` value that now didn't exist... and we just didn't, instead setting the `repetitions` element to just be the number of steps in the profile. Fixing this ended up being a bit involved. ## summary - ad17260 Make a new interface for the hardware controller `execute_profile` function of the thermocycler, since it's important that thermocycler cycles execute inside an asyncio worker so that they won't be interrupted by e.g. pausing. This new interface takes the PD style of protocol. It relies under the hood on the same function that actually sends stuff to the thermocycler, so there shouldn't be any functional execution changes. - 335e25a Make a new `thermocycler/runExtendedProfile` command in the protocol engine, that takes as its parameters a structured list of either steps or cycles, adhering to PD's expectations since the PAPI's expectations are a strict subset of PD. This implements its command by using the new hardware controller. - e842a2a Use the new structured data to implement a command text for the new command that can render the equivalent of what PD makes (and, again, what the PAPI does, which is a strict subset) - e842a2a Also make the old command text not use a "repetitions" keyword that doesn't exist - 0043ab7 Switch the PAPI to emitting the new command in api 2.21 ## new UI These UI changes will be on https://s3-us-west-2.amazonaws.com/opentrons-components/rqa-2771-thermocycler-extended-profiles/index.html?path=/docs/app-molecules-command-commandtext--docs for the desktop and general text and https://s3-us-west-2.amazonaws.com/opentrons-components/rqa-2771-thermocycler-extended-profiles/index.html?path=/docs/app-molecules-command-command--docs for the ODD colored-background elements whenever they upload. Here's a screenshot of what they were like when the PR was opened: `CommandText` of `thermocycler/runProfile` : ![runProfileCommandText](https://github.com/user-attachments/assets/dcad4ce8-2f0e-418d-8618-066a084dc832) Note the change to the first line. This needs wordsmithing. `CommandText` of `thermocycler/runExtendedProfile`: ![runProfileExtended](https://github.com/user-attachments/assets/6b1a1977-9200-4d78-84dc-2961d76cfff9) Note the two-level rendering. The common case will probably be that there's only cycles ## todo - [x] wordsmith - ~[ ] add to PD?~ no, but structured in a way that it will be easy eventually - [x] Test. Oh boy Closes RQA-2771 --------- Co-authored-by: Ed Cormany <[email protected]>
- Loading branch information
Showing
30 changed files
with
6,132 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.