Skip to content

Setup gui updates#2088

Open
badpandabear wants to merge 9 commits intodevelopfrom
setup_gui_v1_03
Open

Setup gui updates#2088
badpandabear wants to merge 9 commits intodevelopfrom
setup_gui_v1_03

Conversation

@badpandabear
Copy link
Collaborator

@badpandabear badpandabear commented Mar 6, 2026

Update the setup gui to:

No longer use specific log messages to track progress.
Re-enable the "cancel" button.
Use a dragable button bar
Increase the font size

This requires an associated dev-suite PR: pypeit/PypeIt-development-suite#394

@badpandabear
Copy link
Collaborator Author

Test Summary
--------------------------------------------------------
--- PYTEST PYPEIT UNIT TESTS PASSED  330 passed, 448 warnings in 793.52s (0:13:13) ---
--- PYTEST UNIT TESTS PASSED  159 passed, 1450 warnings in 1808.29s (0:30:08) ---
--- PYTEST VET TESTS FAILED  1 failed, 73 passed, 1672 warnings in 10847.33s (3:00:47) ---
--- PYPEIT DEVELOPMENT SUITE PASSED 292/292 TESTS  ---

The one vet test failure was an issue fixed by PR 2086

Copy link
Collaborator

@debora-pe debora-pe left a comment

Choose a reason for hiding this comment

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

Hey @badpandabear. I played a bit with this - I cannot really understand the code itself. But it looks good. All the new functionalities work for me.
I only had a question.
I did not understand what you mean with "Re-enable the "cancel" button.", so I don't think I tested that. Could you explain a little bit more what you mean? Thanks!

@badpandabear
Copy link
Collaborator Author

I did not understand what you mean with "Re-enable the "cancel" button.", so I don't think I tested that. Could you explain a little bit more what you mean? Thanks!

The cancel button is part of the in progress dialog that only comes up when running a long setup process. To test this I would typically give it the entire RAW_DATA/keck_deimos directory. To to cancel a background PypeIt thread in code that doesn't know anything about the GUI, I use the "requestInterruption" method on the Qt thread running the setup. Then a wrapper I put around the logging methods that runs inside that thread checks for that interruption and throws an exception to cancel the operation.

This had stopped working when Kyle made his logging refactor, so it was disabled. I discovered that it was Python's logging infrastructure catching the cancel exception, so I decided to derive my "OpCanceledError" exception from BaseException instead of Exception. Which means normal exception handlers that just catch Exception won't catch it. And then re-enable the feature.

The other progress dialog change I made was based on earlier feedback from Kyle. He didn't like that I was looking for a specific log message for progress as that introduced a hidden dependency that would break if the log message changed, and I agreed. So now it just shows a progress bar going back and forth to show that something is going on, but not a specific percentage complete. I'm hoping the state feature X and Austin are working on for the Dashboard will allow for a cleaner solution but I don't want to wait.

I probably should have put this level of detail into the original PR text, sorry about that.

Copy link
Collaborator

@debora-pe debora-pe left a comment

Choose a reason for hiding this comment

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

Ok @badpandabear! No worries, thank you for the explanation. I was indeed only using small datasets and I did not notice the progress dialog. I, now, tested with a larger dataset and I can see the cancel button and the progress bar.
All looks good to me.
Thanks!

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.

2 participants