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: Add a "Reimport" button to protocols in the Opentrons GUI #15484

Open
warmsoymilk opened this issue Jun 21, 2024 · 4 comments
Open

feat: Add a "Reimport" button to protocols in the Opentrons GUI #15484

warmsoymilk opened this issue Jun 21, 2024 · 4 comments
Labels
feature-request A request for a new feature or a change that isn't a bug. May require further triage or scoping.

Comments

@warmsoymilk
Copy link

Overview

Currently, when you change the code of a protocol file, you have to delete the protocol in the GUI and then import the protocol again. This is a fairly lengthy and annoying process.

I propose that a "reimport" button should be added to the protocol overflow menu (which has options such as "start setup", "reanalyze", "delete", etc.) which reimports the protocol from the same disk location that it was originally imported from.

This would alleviate a major pain point in the Opentrons protocol developer experience.

Implementation details

We already have the functionality to:

  1. delete a protocol, and
  2. import a protocol.

The proposed functionality would have to simply perform (1) and (2) in sequence.

If a protocol's import location on disk is not currently saved, it would have to be stored somewhere for this functionality to work.

Design

No response

Acceptance criteria

  • Test that "reimport" button shows up in overflow menu for each protocol in the GUI.
  • Test that clicking the reimport button for a given protocol successfully deletes the old protocol and initiates the importation of a new protocol from the same location.
  • Test that clicking "reimport" results in an error message if the original import path is no longer accessible.
@warmsoymilk warmsoymilk added the feature-request A request for a new feature or a change that isn't a bug. May require further triage or scoping. label Jun 21, 2024
@koji
Copy link
Contributor

koji commented Jun 21, 2024

@warmsoymilk
thank you for your suggestion.

I'm not sure which version you are on. However, if you use 6.0+, you don't have to delete a protocol.

click overflow menu (3 dots button) -> show in folder
you can modify the protocol you imported and reanalyze the protocol after modifying the protocol.

protocol_list_page.mov

@warmsoymilk
Copy link
Author

@koji
Please see the attached screen recording where I show that reimporting the protocol (using Opentrons app version 7.2.2) is necessary to fully recapitulate changes made to the source script.

In particular, I show that when I add or remove raise Exception('') to run(), which should make the protocol analysis fail, I have to actually reimport test_protocol.py to see the change affect the outcome of the reanalysis.

Video: https://www.dropbox.com/scl/fi/0n6evxzihw8roy9g5x59c/Screen-Recording-2024-06-24-at-10.51.45-AM.mov?rlkey=9rrv1cpm96avj5wajgxkzj5lo&dl=0
(Upload is too large for GitHub)

@koji
Copy link
Contributor

koji commented Jun 25, 2024

@warmsoymilk
thank you for your response.

From the video you shared with me, you need to reimport an updated protocol because the file you edited and the protocol that the app analyzed were different.

When you import a protocol into app, your protocol is moved into /Users/your_user_name/Library/Application Support/Opentrons/protocols.
The protocol folder has folders, and each folder has a protocol.

Show in folder in my video opens one of the protocol folders and the app analyzes that protocol file.

@warmsoymilk
Copy link
Author

warmsoymilk commented Jun 25, 2024

@koji
I see, thanks. I think this workflow is cumbersome in the context of standard coding practices (for example, I try to use Git to manage my Python protocols), and so I think a "reimport" button would still be helpful, but thank you for pointing out that I can edit the Opentrons copy of the protocol directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A request for a new feature or a change that isn't a bug. May require further triage or scoping.
Projects
None yet
Development

No branches or pull requests

2 participants