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

Remove ERT splash + contextmanage GUILogHandler #3717

Merged
merged 2 commits into from
Aug 9, 2022

Conversation

pinkwah
Copy link
Contributor

@pinkwah pinkwah commented Aug 8, 2022

Remove ERT Splash Window
The vast majority of ERT's initialisation time comes from Python and all
of the imports that are required by ERT. By the time the splash screen
is displayed this work has already been done.

Additionally, we delay ERT's startup by an additional two seconds to show
the splash screen. This is just annoying. (Changelog: "Improved ERT GUI
startup times!")

Add contextmanager for GUILogHandler
Without this, anything logged after Qt exits will still attempt to
log to the GUILogHandler, causing an exception. This commit uses a
contextmanager to cleanly remove the handler after exit.

The vast majority of ERT's initialisation time comes from Python and all
of the imports that are required by ERT. By the time the splash screen
is displayed this work has already been done.

Additionally, we delay ERT's startup by an additional two seconds to show
the splash screen. This is just annoying. (Changelog: "Improved ERT GUI
startup times!")
Copy link
Contributor

@dafeda dafeda left a comment

Choose a reason for hiding this comment

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

Real nice 👍

@pinkwah pinkwah marked this pull request as ready for review August 8, 2022 12:28
@pinkwah pinkwah force-pushed the gui-atexit branch 2 times, most recently from df0870f to 8fca01d Compare August 8, 2022 12:58
Without this, anything logged after Qt exits will still attempt to
log to the GUILogHandler, causing an exception. This commit uses a
contextmanager to cleanly remove the handler after exit.
@codecov-commenter
Copy link

Codecov Report

Merging #3717 (75a111d) into main (aafc179) will decrease coverage by 0.63%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3717      +/-   ##
==========================================
- Coverage   63.36%   62.73%   -0.64%     
==========================================
  Files         594      592       -2     
  Lines       46007    45844     -163     
  Branches     4142     4127      -15     
==========================================
- Hits        29151    28758     -393     
- Misses      15565    15821     +256     
+ Partials     1291     1265      -26     
Impacted Files Coverage Δ
src/ert/gui/gert_main.py 95.65% <100.00%> (-0.74%) ⬇️
src/ert/gui/tools/event_viewer/__init__.py 100.00% <100.00%> (ø)
src/ert/gui/tools/event_viewer/panel.py 100.00% <100.00%> (ø)
src/libres/lib/job_queue/workflow.cpp 0.00% <0.00%> (-76.98%) ⬇️
src/res/job_queue/function_ert_script.py 21.21% <0.00%> (-48.49%) ⬇️
src/libres/lib/enkf/ert_test_context.cpp 34.93% <0.00%> (-34.03%) ⬇️
src/libres/lib/job_queue/workflow_joblist.cpp 66.66% <0.00%> (-27.78%) ⬇️
src/libres/lib/enkf/ert_workflow_list.cpp 44.27% <0.00%> (-18.62%) ⬇️
src/libres/lib/enkf/summary_key_matcher.cpp 28.57% <0.00%> (-14.68%) ⬇️
src/libres/lib/job_queue/job_kw_definitions.cpp 53.33% <0.00%> (-13.34%) ⬇️
... and 16 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@pinkwah pinkwah merged commit 94a29dd into equinor:main Aug 9, 2022
@pinkwah pinkwah deleted the gui-atexit branch August 9, 2022 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants