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

Show plots #310

Merged
merged 7 commits into from
Feb 25, 2025
Merged

Show plots #310

merged 7 commits into from
Feb 25, 2025

Conversation

mastoffel
Copy link
Collaborator

@mastoffel mastoffel commented Feb 21, 2025

  • this is a PR in response to a JOSS comment in the review thread
  • plots now always show, whether run from a notebook or a terminal (previously one had to use plt.show in the terminal)
  • plotting functions now use plt.show and return the fig object when run from a terminal, but don't use plt.show when run from a notebook, as that would cause double plotting
  • added a function to determine the plot layout to avoid empty space when plotting multiple plots
  • all tests needed monkeypatching to avoid having to manually close plotting windows while testing

@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2025

Codecov Report

Attention: Patch coverage is 93.47826% with 3 lines in your changes missing coverage. Please review.

Project coverage is 94.20%. Comparing base (03d9005) to head (0d5b06d).
Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
autoemulate/plotting.py 90.90% 2 Missing ⚠️
autoemulate/sensitivity_analysis.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #310      +/-   ##
==========================================
- Coverage   94.20%   94.20%   -0.01%     
==========================================
  Files          63       65       +2     
  Lines        3691     3777      +86     
==========================================
+ Hits         3477     3558      +81     
- Misses        214      219       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Feb 21, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  autoemulate
  plotting.py 618-619
  sensitivity_analysis.py 303
  autoemulate/emulators
  gaussian_process.py
  tests
  test_plotting.py
Project Total  

This report was generated by python-coverage-comment-action

Copy link
Member

@radka-j radka-j left a comment

Choose a reason for hiding this comment

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

LGTM! I've run the quick start example from the terminal and the plots showed as expected and the intro notebook still displays correctly as well.

Co-authored-by: Radka Jersakova <[email protected]>
@mastoffel mastoffel merged commit a344091 into main Feb 25, 2025
6 checks passed
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