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(protocol-designer, app, api): step grouping foundation #15737

Open
wants to merge 11 commits into
base: edge
Choose a base branch
from

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Jul 22, 2024

addresses AUTH-573

Overview

co-authored by @jbleon95

This is the foundation for Step grouping in the system. Step grouping is part of the PD redesign follow-up (originally it was part of the PD redesign but got descoped a few days ago. it IS still part of the redesign plans but will be in a follow up): https://opentrons.atlassian.net/wiki/spaces/RPDO/pages/4331339778/WIP+Step+Grouping+Architecture+Proposal+for+JSON+protocols+only

The way step grouping works is the user in PD adds the step to a group and that information gets parsed into commandAnnotations in the schema as part of a secondOrderCommand.

When uploading the protocol to the app, the commandAnnotations is part of the CompletedProtocolAnalysis which is displayed in the Timeline tab in ProtocolDetails - only on the desktop app. Note that the Timeline tab is only visible if you have the Protocol timeline feature flag turned on.

Screen.Recording.2024-09-16.at.10.32.48.mov

Test Plan

NOTE: this is just the foundation and there are definitely bugs (i.e, if you delete a step in a group it will whitescreen right now). What you should be able to do is:

  1. turn on the step grouping ff
  2. create a flex or ot-2 protocol and create 2 steps. Click on the minus icon for both steps and then click "create group". The create group modal is not styled well! but the cancel, create and input field should work as expected. Create the group and see that the steps are added to the group.
  3. click "ungroup" to ungroup the steps
  4. make the group again and export the protocol
  5. upload the protocol to the app. make sure the Protocol timeline ff is turned on and go to the "timeline" tab in protocol details. You should see the group displayed.

Changelog

  • create a bunch of redux actions in PD
  • add 2 new keys to RootState in PD (unsavedGroup, stepGroups)
  • create a feature flag in PD since in the app, the work is already hidden behind the timeline scrubber ff
  • extend AnnotatedSteps in the app to display the steps in the group
  • @jbleon95 added api and robot-server support for commandAnnotations to show up in the CompletedProtocolAnalysis

Review requests

Risk assessment

low, behind ff in app and in PD

@jerader jerader changed the title feat(protocol-designer, app, api): step grouping proof of concept feat(protocol-designer, app, api): step grouping foundation Jul 22, 2024
Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: https://github.com/Opentrons/opentrons/pull/

1 similar comment
Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: https://github.com/Opentrons/opentrons/pull/

Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: https://github.com/Opentrons/opentrons/pull/

2 similar comments
Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: https://github.com/Opentrons/opentrons/pull/

Copy link
Contributor

A PR has been opened to address analyses snapshot changes. Please review the changes here: https://github.com/Opentrons/opentrons/pull/

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.18%. Comparing base (58a7d19) to head (f3e3a19).
Report is 17 commits behind head on edge.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #15737      +/-   ##
==========================================
- Coverage   63.31%   63.18%   -0.13%     
==========================================
  Files         300      288      -12     
  Lines       15773    15276     -497     
==========================================
- Hits         9986     9652     -334     
+ Misses       5787     5624     -163     
Flag Coverage Δ
shared-data 74.63% <ø> (+1.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 12 files with indirect coverage changes

@jerader jerader marked this pull request as ready for review September 16, 2024 15:25
@jerader jerader requested review from a team as code owners September 16, 2024 15:25
@jerader jerader requested review from smb2268, koji and SyntaxColoring and removed request for a team September 16, 2024 15:25
for command_annotation in protocol.commandAnnotations
]
else:
raise ValueError("Uh oh")
Copy link
Member

Choose a reason for hiding this comment

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

Probably needs real error :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants