Skip to content

Commit

Permalink
Removing references to fictitious import path (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Sep 27, 2022
1 parent fe7f42f commit da952ed
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 47 deletions.
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -434,6 +434,6 @@ only use third-party Python libraries that have MIT or BSD licenses.
.. |Build Status| image:: https://github.com/terrapower/armi/actions/workflows/unittests.yaml/badge.svg?branch=main
:target: https://github.com/terrapower/armi/actions/workflows/unittests.yaml

.. |Code Coverage| image:: https://coveralls.io/repos/github/terrapower/armi/badge.svg?branch=main&kill_cache=7
.. |Code Coverage| image:: https://coveralls.io/repos/github/terrapower/armi/badge.svg?branch=main&kill_cache=2
:target: https://coveralls.io/github/terrapower/armi?branch=main

21 changes: 2 additions & 19 deletions armi/bookkeeping/report/reportInterface.py
Expand Up @@ -164,23 +164,6 @@ def writeReports(self):
# --------------------------------------------
def writeRunSummary(self):
"""Make a summary of the run"""
opt = self.o.getInterface("optimize")
if opt is None:
# The opitimization interface has some good reports that we want, even if we
# were not running with the optimization interface active. Try to make one.
# This is a proprietary plugin, and may not be present, so protect with a
# try/except. When the report system gets more attention and becomes more
# extensible in the future this will no longer be necessary
try:
from terrapower.physics.optimize import optimizationInterface
except ModuleNotFoundError:
return

opt = optimizationInterface.OptimizationInterface(self.r, self.cs)
self.o.addInterface(opt, enabled=False)
opt.interactInit()
opt.updateDependentVariables()
opt.writeOptimizationResults("{0}.optResults.dat".format(self.cs.caseTitle))

self.r.core.sfp.report() # spent fuel pool report
# spent fuel pool report
self.r.core.sfp.report()
self.r.core.sfp.count()
6 changes: 3 additions & 3 deletions armi/materials/__init__.py
Expand Up @@ -159,20 +159,20 @@ def resolveMaterialClassByName(name: str, namespaceOrder: List[str] = None):
Examples
--------
>>> resolveMaterialClassByName("UO2", ["terrapower.twr.materials", "armi.materials"])
<class 'terrapower.twr.materials.UO2'>
>>> resolveMaterialClassByName("UO2", ["something.else.materials", "armi.materials"])
<class 'something.else.materials.UO2'>
See Also
--------
armi.reactor.reactors.factory
Applies user settings to default namespace order.
"""
if ":" in name:
# assume direct package path like `armi.materials.uZr:UZr`
modPath, clsName = name.split(":")
mod = importlib.import_module(modPath)
return getattr(mod, clsName)

namespaceOrder = namespaceOrder or _MATERIAL_NAMESPACE_ORDER
for namespace in namespaceOrder:
mod = importlib.import_module(namespace)
Expand Down
8 changes: 1 addition & 7 deletions armi/nuclearDataIO/xsLibraries.py
Expand Up @@ -563,12 +563,7 @@ def _buildScatterWeights(self, scatterMatrixKey):
Returns
-------
scatterWeights : dict
(xsID, fromGroup) : weight column (sparse Gx1).
See Also
--------
terrapower.physics.neutronics.uq.sensitivities.MeshMatrix.derivativeM
(xsID, fromGroup) : weight column (sparse Gx1)
"""
runLog.info(
"Building {0} weights on cross section library".format(scatterMatrixKey)
Expand All @@ -590,7 +585,6 @@ def purgeFissionProducts(self, r):
a reactor, or None
.. warning:: Sometimes worker nodes do not have a reactor, fission products will not be purged.
"""
runLog.info("Purging detailed fission products from {}".format(self))
modeledNucs = r.blueprints.allNuclidesInProblem
Expand Down
1 change: 1 addition & 0 deletions armi/physics/fuelCycle/fuelHandlerFactory.py
Expand Up @@ -82,4 +82,5 @@ def fuelHandlerFactory(operator):
fuelHandlerModulePath, fuelHandlerClassName, cs.inputDirectory
)
)

return fuelHandler
9 changes: 2 additions & 7 deletions armi/physics/neutronics/crossSectionGroupManager.py
Expand Up @@ -28,8 +28,7 @@
Then the representative block is sent to a lattice physics kernel for actual physics
calculations.
Generally, the cross section manager is a attribute of the lattice physics code interface (e.g.
the :py:mod:`~terrapower.physics.neutronics.mc2.mc2Interface`.
Generally, the cross section manager is a attribute of the lattice physics code interface
Examples
--------
Expand Down Expand Up @@ -191,11 +190,7 @@ def calcAvgNuclideTemperatures(self):
.. math::
T = \frac{\sum{n_i v_i T_i}}{\sum{n_i v_i}}
where :math:`n_i` is a number density, :math:`v_i` is a volume, and :math:`T_i` is a temperature.
See Also
--------
terrapower.physics.neutronics.mc2.mc2Writers.Mc2Writer._getAllNuclideDensities : uses these values
where :math:`n_i` is a number density, :math:`v_i` is a volume, and :math:`T_i` is a temperature
"""
self.avgNucTemperatures = {}
nvt, nv = self._getNucTempHelper()
Expand Down
Expand Up @@ -161,7 +161,6 @@ def setGlobalLumpedFissionProducts(self, lfps):
See Also
--------
terrapower.physics.neutronics.depletion.depletion.DepletionInterface.buildFissionProducts
armi.reactor.blocks.Block.getLumpedFissionProductCollection : same thing, but block-level compatible. Use this
"""

Expand Down
Expand Up @@ -282,10 +282,6 @@ def generateLatticePhysicsInputs(
A list of what this specific writer instance returns for each representative block.
It is the responsibility of the subclassed interface to implement.
In many cases, it is the executing agent.
See Also
--------
terrapower.physics.neutronics.mc2.mc2Writers.Mc2V2Writer.write
"""
returnedFromWriters = []
baseList = set(baseList or [])
Expand Down
1 change: 0 additions & 1 deletion armi/reactor/blocks.py
Expand Up @@ -1324,7 +1324,6 @@ def getBurnupPeakingFactor(self):
See Also
--------
armi.physics.neutronics.globalFlux.globalFluxInterface.GlobalFluxInterface.updateFluenceAndDPA : uses this
terrapower.physics.neutronics.depletion.depletion.DepletionInterface._updateBlockParametersAfterDepletion : also uses this
"""
burnupPeakingFactor = settings.getMasterCs()["burnupPeakingFactor"]
if not burnupPeakingFactor and self.p.fluxPeak:
Expand Down
4 changes: 0 additions & 4 deletions armi/utils/units.py
Expand Up @@ -309,10 +309,6 @@ def getXYLineParameters(theta, x=0, y=0):
D : float
line coefficient
See Also
--------
terrapower.physics.neutronics.mcnp.mcnpInterface.getSenseWrtTheta
Notes
-----
the line is in the form of A*x + B*y + C*z - D = 0 -- this corresponds to a MCNP arbitrary line equation
Expand Down

0 comments on commit da952ed

Please sign in to comment.