armi
armi copied to clipboard
Organize the `armi/tests/` directory and `armi/testing/` module
The armi/tests/ directory has a bunch of unorganized data files. I would like these to be organized.
For instance, there are three YAML files to define the ZPPR benchmark reactor, those could go in their own directory!
Listed here are the data files, and where I would like them to go (with some notes about downstream repos that will need to be touched):
├── armi/tests/
└── anl-afci-177/
├── anl-afci-177-blueprints.yaml
├── anl-afci-177-fuelManagement.py
├── anl-afci-177.yaml
├── anl-afci-177-coreMap.yaml
└── c5g7/
├── c5g7-blueprints.yaml
├── c5g7-settings.yaml
└── resources/
├── armiRun-SHUFFLES.txt
├── COMPXS.ascii
├── geom.xml
├── geom1Assem.xml
├── ISOAA (easy, because of the ISOAA_PATH variable)
└── sodiumHexReactor/ (downstream: cluster, deplection, neutronics, rxcoeffs)
├── armiRun.yaml
├── refSmallReactorShuffleLogic.py
├── refSmallReactor.yaml
├── refSmallSfpGrid.yaml
├── refSmallCoreGrid.yaml
├── refSmallReactorBase.yaml
└── thetarz/ (downstream: neutronics)
├── ThRZGeom.xml
├── ThRZloading.yaml
├── ThRZSettings.yaml
├── trz_geom.xml
└── zppr/ (downstream: mcnp, neutronics)
├── 1DslabXSByCompTest.yaml
├── zpprTest.yaml
├── zpprTestGeom.xml
I expect this to be done in stages, because it will require cleanup downstream:
- [x]
anl-afci-177/ - [x]
c5g7/ - [ ]
resources/ - [ ]
sodiumHexReactor/ - [ ]
thetarz/ - [ ]
zppr/
Also, while we're at it, when not add a comment at the top of these files explaining what is in them, and what they are for.
Let's go nuts!
Other strange or messy things in ARMI I should investigate:
The book keeping test file _constants.py seems silly.
Here is a full list of everything I can find downstream where people are directly importing from the ARMI unit tests.
I would very much like to expunge ALL of these, so the ARMI unit tests can be removed from the API:
from armi.materials.tests.test_materials import _Material_Testfrom armi.nuclearDataIO.cccc.tests.test_labels import THIS_DIRfrom armi.nuclearDataIO.tests import test_xsLibraries # DLAYXS_MCC3, UFG_FLUX_EDIT, PMATRX_AA, ISOTXS_AAfrom armi.nuclearDataIO.tests.test_xsCollections import MockBlockfrom armi.physics.neutronics.fissionProductModel.tests.test_lumpedFissionProduct import getDummyLFPFilefrom armi.physics.neutronics.globalFlux.tests.test_globalFluxInterface import applyDummyFluxfrom armi.physics.neutronics.latticePhysics.tests.test_latticeInterface import TestLatticePhysicsInterfacefrom armi.reactor.converters.tests.test_axialExpansionChanger import AxialExpansionTestBasefrom armi.reactor.converters.tests.test_axialExpansionChanger import buildTestAssemblyWithFakeMaterialfrom armi.reactor.tests.test_assemblies import buildTestAssembliesfrom armi.reactor.tests.test_blocks import buildSimpleFuelBlockfrom armi.reactor.tests.test_blocks import loadTestBlockfrom armi.reactor.tests.test_components import TestShapedComponentfrom armi.reactor.tests.test_reactors import buildOperatorOfEmptyHexBlocksfrom armi.tests import ARMI_RUN_PATHfrom armi.tests import ArmiTestHelperfrom armi.tests import getEmptyHexReactorfrom armi.tests import ISOAA_PATHfrom armi.tests import mockRunLogsfrom armi.tests import TEST_ROOTfrom armi.tests.test_plugins import TestPlugin
We have a few options for removing the need for these imports downstream:
- Move the test utility into
armi.testing - Help the downstream dev refactor their test
- Copy the test code into the downstream repo
I have had a request from @keckler to ensure that mockRunLogs.py makes its way into the new armi/testing/ module.
I think that is a very high priority item to keep. Agreed.