Add new loadMinimalTestReactor() test method #1563
Labels
help wanted
Extra attention is needed
optimization
related to measuring and speeding up the code or reducing memory
testing
Related to tests
Our current function to create a reactor for unit tests is widely used in ARMI and the ARMI ecosystem:
https://github.com/terrapower/armi/blob/main/armi/reactor/tests/test_reactors.py#L139-L143
However, it loads a full reactor and is this rather slow if you are using it in thousands of unit tests. That's why we have this helper method:
https://github.com/terrapower/armi/blob/main/armi/reactor/tests/test_reactors.py#L203
It reduces the size of the reactor. Which doesn't speed up the "loading" part of the unit test, but it does make a smaller reactor, which makes many unit tests faster.
What would be nice is if we had a new, faster function to generate a test reactor; something like
loadMinimalTestReactor()
. The idea is that it would generate a simple one-assembly reactor core, with only one block, and one parameter. And it would be even better if you could pass it a number of assemblies, blocks-per-assembly, and number of parameters.The goal is to make loading times faster. But, also, the goal would be to replace as many full
loadTestReactor()
tests as possible with the new, faster version.The text was updated successfully, but these errors were encountered: