Conversation
|
It's also not clear to me why |
Codecov Report
@@ Coverage Diff @@
## master #959 +/- ##
==========================================
- Coverage 86.97% 86.92% -0.06%
==========================================
Files 36 36
Lines 9060 9063 +3
==========================================
- Hits 7880 7878 -2
- Misses 1180 1185 +5 |
@banesullivan, you added that in at some point... what was the reasoning? |
|
Okay CIs are happy, this is ready for review/merge from my end |
akaszynski
left a comment
There was a problem hiding this comment.
Thanks for cleaning this up. I'd still like to know why we have deep_clean but we can consider removing/refactoring that in a later PR.
* TST: Make CIs happy * Revert rest of #959
|
I implemented this way to have it work well with sphinx-gallery. I think at this point, we've fixed the issues that lead to me having |
It seems strange to me that
Plotter.__init__adds a ref to this global_ALL_PLOTTERSbut callingPlotter.closedoes not remove the reference. It really seems like it should. Otherwise you get memory accumulation even when closing your plotters, unless you callpyvista.close_all()(not a good solution because it closes all plotters, not just the one you might be trying to close) or modifypyvista._ALL_PLOTTERS(not a good solution -- private var).This PR suggests that instead, let
plotter.closetake care of both keeping track of whether or not it's closed (by short-circuiting the.closeoperation if it has been done already) and keeping itself in_ALL_PLOTTERS.