armi
armi copied to clipboard
Closing all the plots that ARMI opens
What is the change?
This PR makes sure that matplotlib plots in ARMI are closed.
Why is the change being made?
Someone recently complained to me that during their recent ARMI Application runs, they were getting matplotlib warnings that they had more than 20 plots open at a time.
I believe this is the result of an old design idea that ARMI should traffic in figure objects, passing them around freely. Maybe it was a nice idea, we could discuss, but I think it leaves open the real possibility that plots aren't closed when they should be.
Checklist
- [X] This PR has only one purpose or idea.
- [X] Tests have been added/updated to verify any new/changed code.
- [X] The code style follows good practices.
- [X] The commit message(s) follow good practices.
- [X] The release notes have been updated if necessary.
- [X] The documentation is still up-to-date in the
docfolder. - [X] The dependencies are still up-to-date in
pyproject.toml.
I think a lot of ARMI PRs are failing right now because the unit tests aren't cleaning up after themselves.
In particular, after all the tests are run, a file named armiRun.h5 appears to be left in the base dir of the working area.
This should be remedied.
I think a lot of ARMI PRs are failing right now because the unit tests aren't cleaning up after themselves.
In particular, after all the tests are run, a file named
armiRun.h5appears to be left in the base dir of the working area.This should be remedied.
Interesting that it looks like it's only happening on windows and not linux
So, matplotlib released a new version to PyPI.org today. This removed (or changed?) the old color map logic we are using:
https://github.com/terrapower/armi/blob/872e2dac316d937d06a9d3a7a314c48075204a2b/armi/utils/reportPlotting.py#L732
You will see get_cmap() in matplotlib==3.7.5, but not in matplotlib==3.8.4.