Conversation
…ific log messages for the progress bar.
…ific log messages for the progress bar.
…ndler. Remove escape sequences from log.
…to setup_gui_v1_03
The one vet test failure was an issue fixed by PR 2086 |
debora-pe
left a comment
There was a problem hiding this comment.
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!
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. |
debora-pe
left a comment
There was a problem hiding this comment.
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!
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