Skip to content

Conversation

@AgnieszkaZaba
Copy link
Collaborator

No description provided.

@AgnieszkaZaba
Copy link
Collaborator Author

Running smoke tests in PySDM, notebook_vars is executed multiple times within one test-suite.
It cause this RuntimeWarning

RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface 
(`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. 
(To control this warning, see the rcParam `figure.max_open_warning`). Consider using `matplotlib.pyplot.close()`.

@AgnieszkaZaba
Copy link
Collaborator Author

Triggered warning in open-atmos/PySDM#1763, when updating test-suites.

@AgnieszkaZaba AgnieszkaZaba requested a review from slayoo December 12, 2025 07:22
@slayoo
Copy link
Member

slayoo commented Dec 12, 2025

this looks like a possible source of unintended side effect, would doing .close() instead of .clear() when replacing show_plot() above work?

@AgnieszkaZaba AgnieszkaZaba changed the title close all matplotlib figures after each notebook execution close matplotlib figures in notebook_vars; enable testing notebook_vars; add plotting logic to notebook_vars test notebook Dec 12, 2025
@slayoo slayoo added this pull request to the merge queue Dec 12, 2025
Merged via the queue into open-atmos:main with commit 553a682 Dec 12, 2025
3 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.

2 participants