From c6f46e5d04dc265e7a8e470fdd1977c9a4e16e3e Mon Sep 17 00:00:00 2001 From: John Stilley <1831479+john-science@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:11:18 -0700 Subject: [PATCH] Moving C5G7 into its own test dir (#1941) --- .../{tutorials => c5g7}/c5g7-blueprints.yaml | 0 .../{tutorials => c5g7}/c5g7-settings.yaml | 0 armi/tests/test_lwrInputs.py | 2 +- armi/utils/tests/test_plotting.py | 2 +- doc/tutorials/walkthrough_lwr_inputs.rst | 26 +++++++++---------- pyproject.toml | 3 +++ 6 files changed, 18 insertions(+), 15 deletions(-) rename armi/tests/{tutorials => c5g7}/c5g7-blueprints.yaml (100%) rename armi/tests/{tutorials => c5g7}/c5g7-settings.yaml (100%) diff --git a/armi/tests/tutorials/c5g7-blueprints.yaml b/armi/tests/c5g7/c5g7-blueprints.yaml similarity index 100% rename from armi/tests/tutorials/c5g7-blueprints.yaml rename to armi/tests/c5g7/c5g7-blueprints.yaml diff --git a/armi/tests/tutorials/c5g7-settings.yaml b/armi/tests/c5g7/c5g7-settings.yaml similarity index 100% rename from armi/tests/tutorials/c5g7-settings.yaml rename to armi/tests/c5g7/c5g7-settings.yaml diff --git a/armi/tests/test_lwrInputs.py b/armi/tests/test_lwrInputs.py index a7b4e6312..6cc37b81b 100644 --- a/armi/tests/test_lwrInputs.py +++ b/armi/tests/test_lwrInputs.py @@ -47,7 +47,7 @@ def test_loadC5G7(self): # load the reactor _o, r = test_reactors.loadTestReactor( - os.path.join(TEST_ROOT, "tutorials"), + os.path.join(TEST_ROOT, "c5g7"), inputFileName=TEST_INPUT_TITLE, ) diff --git a/armi/utils/tests/test_plotting.py b/armi/utils/tests/test_plotting.py index 0fdb9e1cc..2c3572cd8 100644 --- a/armi/utils/tests/test_plotting.py +++ b/armi/utils/tests/test_plotting.py @@ -116,7 +116,7 @@ def test_plotCartesianBlock(self): with TemporaryDirectoryChanger(): cs = settings.Settings( - os.path.join(TEST_ROOT, "tutorials", "c5g7-settings.yaml") + os.path.join(TEST_ROOT, "c5g7", "c5g7-settings.yaml") ) blueprint = blueprints.loadFromCs(cs) diff --git a/doc/tutorials/walkthrough_lwr_inputs.rst b/doc/tutorials/walkthrough_lwr_inputs.rst index 3afde1791..5fdc61df7 100644 --- a/doc/tutorials/walkthrough_lwr_inputs.rst +++ b/doc/tutorials/walkthrough_lwr_inputs.rst @@ -41,7 +41,7 @@ to specify their composition. The composition details below are documented in Ta `NEA/NSC/DOC(96)2 `_. -.. literalinclude:: ../../armi/tests/tutorials/c5g7-blueprints.yaml +.. literalinclude:: ../../armi/tests/c5g7/c5g7-blueprints.yaml :language: yaml :start-after: start-custom-isotopics :end-before: end-custom-isotopics @@ -64,7 +64,7 @@ position in the grid that has any of the specifiers in this list. You will see the `<<: *guide_tube` notation below. This means use the specifications of guide_tube, but make the modifications that apear below. -.. literalinclude:: ../../armi/tests/tutorials/c5g7-blueprints.yaml +.. literalinclude:: ../../armi/tests/c5g7/c5g7-blueprints.yaml :language: yaml :start-after: end-custom-isotopics :end-before: end-block-uo2 @@ -79,7 +79,7 @@ The next assembly is very similar. We define three separate fuel pins, each with different ``latticeIDs``, and then use YAML anchors to just copy the moderator, guide tube, and fission chamber from the previous assembly. -.. literalinclude:: ../../armi/tests/tutorials/c5g7-blueprints.yaml +.. literalinclude:: ../../armi/tests/c5g7/c5g7-blueprints.yaml :language: yaml :start-after: end-block-uo2 :end-before: end-block-mox @@ -88,7 +88,7 @@ The moderator block ------------------- The moderator block for the radial and axial reflectors is very simple: -.. literalinclude:: ../../armi/tests/tutorials/c5g7-blueprints.yaml +.. literalinclude:: ../../armi/tests/c5g7/c5g7-blueprints.yaml :language: yaml :start-after: end-block-mox :end-before: end-block-mod @@ -98,7 +98,7 @@ The 3-D Assembly definitions Now that the pins are defined, we stack them into assemblies, very similar to what we did in the SFR tutorial. There are three distinct assembly definitions. -.. literalinclude:: ../../armi/tests/tutorials/c5g7-blueprints.yaml +.. literalinclude:: ../../armi/tests/c5g7/c5g7-blueprints.yaml :language: yaml :start-after: end-block-mod :end-before: end-assemblies @@ -111,7 +111,7 @@ they would be here alongside the core. We also anchor the core at the global coordinates (0,0,0). If we wanted the core at some other elevation, we could adjust that here. -.. literalinclude:: ../../armi/tests/tutorials/c5g7-blueprints.yaml +.. literalinclude:: ../../armi/tests/c5g7/c5g7-blueprints.yaml :language: yaml :start-after: end-assemblies :end-before: end-systems @@ -124,7 +124,7 @@ from an XML file. In this tutorial, we define the grid directly with an textual ``lattice map`` input section. The core map is particularly simple; it only has 9 assemblies. -.. literalinclude:: ../../armi/tests/tutorials/c5g7-blueprints.yaml +.. literalinclude:: ../../armi/tests/c5g7/c5g7-blueprints.yaml :language: yaml :start-after: end-systems :end-before: end-grid-core @@ -134,14 +134,14 @@ Recall that on the ``uo2`` block above we said that we want to apply the grid with the name ``UO2 grid``, and wanted to fill any ``U`` position with the ``fuel`` component defined up there. Here's where we define that grid. -.. literalinclude:: ../../armi/tests/tutorials/c5g7-blueprints.yaml +.. literalinclude:: ../../armi/tests/c5g7/c5g7-blueprints.yaml :language: yaml :start-after: end-grid-core :end-before: end-grid-UO2 Similarly, we define the ``MOX grid`` as follows: -.. literalinclude:: ../../armi/tests/tutorials/c5g7-blueprints.yaml +.. literalinclude:: ../../armi/tests/c5g7/c5g7-blueprints.yaml :language: yaml :start-after: end-grid-UO2 :end-before: end-grid-MOX @@ -151,7 +151,7 @@ the assembly. Nuclide Flags ------------- -.. literalinclude:: ../../armi/tests/tutorials/c5g7-blueprints.yaml +.. literalinclude:: ../../armi/tests/c5g7/c5g7-blueprints.yaml :language: yaml :start-after: end-grid-MOX :end-before: end-nucflags @@ -167,7 +167,7 @@ Really, the only thing the settings file does in this case is point to the bluep file. As we turn this case into an actual run, we may add various cross section and neutrons options to evaluate the benchmark. -.. literalinclude:: ../../armi/tests/tutorials/c5g7-settings.yaml +.. literalinclude:: ../../armi/tests/c5g7/c5g7-settings.yaml :language: yaml Defining fuel management @@ -228,5 +228,5 @@ This should show a simple representation of the block. Here are the full files used in this example: -* :download:`Blueprints <../../armi/tests/tutorials/c5g7-blueprints.yaml>` -* :download:`Settings <../../armi/tests/tutorials/c5g7-settings.yaml>` +* :download:`Blueprints <../../armi/tests/c5g7/c5g7-blueprints.yaml>` +* :download:`Settings <../../armi/tests/c5g7/c5g7-settings.yaml>` diff --git a/pyproject.toml b/pyproject.toml index 069d04d41..0490fe201 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -314,6 +314,9 @@ armi = [ "tests/1DslabXSByCompTest.yaml", "tests/armiRun-SHUFFLES.txt", "tests/armiRun.yaml", + "tests/c5g7", + "tests/c5g7/c5g7-blueprints.yaml", + "tests/c5g7/c5g7-settings.yaml", "tests/COMPXS.ascii", "tests/detailedAxialExpansion/armiRun.yaml", "tests/detailedAxialExpansion/refSmallCoreGrid.yaml",