Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing the unused method Case.buildCommand #1773

Merged
merged 2 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions armi/cases/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,32 +618,6 @@ def summarizeDesign(self):
"""Uses the ReportInterface to create a fancy HTML page describing the design inputs."""
_ = reportsEntryPoint.createReportFromSettings(self.cs)

def buildCommand(self, python="python"):
"""
Build an execution command for running or submitting a job.

Parameters
----------
python : str, optional
The path to the python executable to use for executing the case. By default
this will be whatever "python" resolves to in the target environment.
However when running in more exotic environments (e.g. HPC cluster), it is
usually desireable to provide a specific python executable.
"""
command = ""
if self.cs["numProcessors"] > 1:
command += "mpiexec -n {} ".format(self.cs["numProcessors"])
if self.cs["mpiTasksPerNode"] > 0:
command += "-c {} ".format(self.cs["mpiTasksPerNode"])

command += "{} -u ".format(python)
if not __debug__:
command += " -O "

command += ' -m {} run "{}.yaml"'.format(context.APP_NAME, self.cs.caseTitle)

return command

def clone(
self,
additionalFiles=None,
Expand Down
7 changes: 1 addition & 6 deletions armi/cases/tests/test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
<assembly name="A3" pos="1" ring="2"/>
</reactor>
"""
# This gets made into a StringIO multiple times because
# it gets read multiple times.
# This gets made into a StringIO multiple times because it gets read multiple times.

BLUEPRINT_INPUT = """
nuclide flags:
Expand Down Expand Up @@ -429,10 +428,6 @@ def test_titleSetterGetter(self):
self.c1.title = "new_bob"
self.assertEqual(self.c1.title, "new_bob")

def test_buildCommand(self):
cmd = self.c1.buildCommand()
self.assertEqual(cmd, 'python -u -m armi run "c1.yaml"')


class TestCaseSuiteComparison(unittest.TestCase):
"""CaseSuite.compare() tests."""
Expand Down
3 changes: 2 additions & 1 deletion doc/release/0.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ API Changes
#. Removed unused methods: ``Reactor.getAllNuclidesIn()``, ``plotTriangleFlux()``. (`PR#1656 <https://github.com/terrapower/armi/pull/1656>`_)
#. Removed ``armi.utils.dochelpers``; not relevant to nuclear modeling. (`PR#1662 <https://github.com/terrapower/armi/pull/1662>`_)
#. Removing old tools created to help people convert to the current database format: ``armi.bookkeeping.db.convertDatabase()`` and ``ConvertDB``. (`PR#1658 <https://github.com/terrapower/armi/pull/1658>`_)
#. Removing the unused method ``Case.buildCommand()``. (`PR#1773 <https://github.com/terrapower/armi/pull/1773>`_)
#. Removed the variable ``armi.physics.neutronics.isotopicDepletion.ORDER``. (`PR#1671 <https://github.com/terrapower/armi/pull/1671>`_)
#. Removing extraneous ``ArmiOjbect`` methods. (`PR#1667 <https://github.com/terrapower/armi/pull/1667>`_)
* Moving ``ArmiObject.getBoronMassEnrich()`` to ``Block``.
Expand All @@ -47,7 +48,7 @@ API Changes
* Moving ``ArmiObject.getTotalEnergyGenerationConstants`` to ``Block``.
* Moving ``ArmiObject.getFissionEnergyGenerationConstants`` to ``Block``.
* Moving ``ArmiObject.getCaptureEnergyGenerationConstants`` to ``Block``.
#. Removing the parameeter ``rdIterNum``. (`PR#1704 <https://github.com/terrapower/armi/pull/1704>`_)
#. Removing the parameter ``rdIterNum``. (`PR#1704 <https://github.com/terrapower/armi/pull/1704>`_)
#. Removing the parameters ``outsideFuelRing`` and ``outsideFuelRingFluxFr``. (`PR#1700 <https://github.com/terrapower/armi/pull/1700>`_)
#. Removing the setting ``doOrificedTH``. (`PR#1706 <https://github.com/terrapower/armi/pull/1706>`_)
#. Changing the Doppler constant params to ``VOLUME_INTEGRATED``. (`PR#1659 <https://github.com/terrapower/armi/pull/1659>`_)
Expand Down
Loading