From f3d16df8a1946039c0a60b0650ced60fb0600a7a Mon Sep 17 00:00:00 2001 From: John Stilley <1831479+john-science@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:37:04 -0700 Subject: [PATCH] Renaming Reactor.moveList to Reactor.moves (#1881) --- armi/physics/fuelCycle/fuelHandlerInterface.py | 4 ++-- armi/reactor/reactors.py | 13 ++++++------- doc/release/0.4.rst | 15 ++++++--------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/armi/physics/fuelCycle/fuelHandlerInterface.py b/armi/physics/fuelCycle/fuelHandlerInterface.py index c99047c98..511dc1856 100644 --- a/armi/physics/fuelCycle/fuelHandlerInterface.py +++ b/armi/physics/fuelCycle/fuelHandlerInterface.py @@ -142,7 +142,7 @@ def makeShuffleReport(self): This can be used to export shuffling to an external code or to perform explicit repeat shuffling in a restart. - It creates a ``*SHUFFLES.txt`` file based on the Reactor.moveList structure + It creates a ``*SHUFFLES.txt`` file based on the Reactor.moves structure See Also -------- @@ -155,7 +155,7 @@ def makeShuffleReport(self): # remember, we put cycle 0 in so we could do BOL branch searches. # This also syncs cycles up with external physics kernel cycles. out.write("Before cycle {0}:\n".format(cycle + 1)) - movesThisCycle = self.r.core.moveList.get(cycle) + movesThisCycle = self.r.core.moves.get(cycle) if movesThisCycle is not None: for ( fromLoc, diff --git a/armi/reactor/reactors.py b/armi/reactor/reactors.py index a0a29945f..f18f048d4 100644 --- a/armi/reactor/reactors.py +++ b/armi/reactor/reactors.py @@ -293,7 +293,7 @@ def __init__(self, name): self.timeOfStart = time.time() self.zones = zones.Zones() # initialize with empty Zones object # initialize the list that holds all shuffles - self.moveList = {} + self.moves = {} self.scalarVals = {} self._nuclideCategories = {} self.typeList = [] # list of block types to convert name - to -number. @@ -1886,13 +1886,12 @@ def _getReflectiveDuplicateAssembly(self, neighborLoc): def setMoveList(self, cycle, oldLoc, newLoc, enrichList, assemblyType, assemName): """Tracks the movements in terms of locations and enrichments.""" data = (oldLoc, newLoc, enrichList, assemblyType, assemName) - # NOTE: moveList is actually a moveDict (misnomer) - if self.moveList.get(cycle) is None: - self.moveList[cycle] = [] - if data in self.moveList[cycle]: + if self.moves.get(cycle) is None: + self.moves[cycle] = [] + if data in self.moves[cycle]: # remove the old version and throw the new on at the end. - self.moveList[cycle].remove(data) - self.moveList[cycle].append(data) + self.moves[cycle].remove(data) + self.moves[cycle].append(data) def createFreshFeed(self, cs=None): """ diff --git a/doc/release/0.4.rst b/doc/release/0.4.rst index 32244a4f8..162032549 100644 --- a/doc/release/0.4.rst +++ b/doc/release/0.4.rst @@ -11,10 +11,8 @@ New Features #. ARMI now supports Python 3.12. (`PR#1813 `_) #. Removing the ``tabulate`` dependency by ingesting it to ``armi.utils.tabulate``. (`PR#1811 `_) #. Adding ``--skip-inspection`` flag to ``CompareCases`` CLI. (`PR#1842 `_) -#. Provide utilities for determining location of a rotated object in a hexagonal lattice: - :func:`armi.utils.hexagon.getIndexOfRotatedCell` - (`PR#1846 `_) +#. Provide utilities for determining location of a rotated object in a hexagonal lattice (``getIndexOfRotatedCell``). (`PR#1846 `_) #. TBD API Changes @@ -23,9 +21,8 @@ API Changes #. Removing deprecated method ``prepSearch``. (`PR#1845 `_) #. Removing unused function ``SkippingXsGen_BuChangedLessThanTolerance``. (`PR#1845 `_) #. Allow for unknown Flags when opening a DB. (`PR#1844 `_) -#. ``Assembly.rotatePins`` and ``Block.rotatePins`` have been removed. Prefer to use - :meth:`armi.reactor.assemblies.Assembly.rotate` and meth:`armi.reactor.block.Block.rotate` - (`PR#1846 `_) #. TBD Bug Fixes @@ -41,8 +38,8 @@ Bug Fixes Quality Work ------------ -#. Removing deprecated code (``axialUnitGrid``) (`PR#1809 `_) -#. Refactoring (``axialExpansionChanger``) (`PR#1861 `_) +#. Removing deprecated code ``axialUnitGrid``. (`PR#1809 `_) +#. Refactoring ``axialExpansionChanger``. (`PR#1861 `_) #. TBD Changes that Affect Requirements