Skip to content

Commit

Permalink
Remove unused CLI args from checkInputs (finishing what #754 started)
Browse files Browse the repository at this point in the history
  • Loading branch information
opotowsky committed Oct 7, 2022
1 parent 57ed9cd commit ff4496c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 deletions.
37 changes: 12 additions & 25 deletions armi/cli/checkInputs.py
Expand Up @@ -69,19 +69,6 @@ def addOptions(self):
default=False,
help="Generate a report to summarize the inputs",
)
self.parser.add_argument(
"--full-core-map",
"-m",
action="store_true",
default=False,
help="Generate the full core reactor map in the design report",
)
self.parser.add_argument(
"--disable-block-axial-mesh",
action="store_true",
default=False,
help="Remove the additional block axial mesh points on the assembly type figure(s)",
)
self.parser.add_argument(
"--recursive",
"-r",
Expand Down Expand Up @@ -117,16 +104,15 @@ def invoke(self):
if not self.args.skip_checks:
hasIssues = "PASSED" if case.checkInputs() else "HAS ISSUES"

try:
if self.args.generate_design_summary:
canStart = "UNKNOWN"
if self.args.generate_design_summary:
try:
case.summarizeDesign()
canStart = "PASSED"
else:
canStart = "UNKNOWN"
except Exception:
runLog.error("Failed to initialize/summarize {}".format(case))
runLog.error(traceback.format_exc())
canStart = "FAILED"
except Exception:
runLog.error("Failed to initialize/summarize {}".format(case))
runLog.error(traceback.format_exc())
canStart = "FAILED"

table.append((case.cs.path, case.title, canStart, hasIssues))

Expand All @@ -138,7 +124,8 @@ def invoke(self):
)
)

if any(t[2] != "PASSED" or t[3] != "PASSED" for t in table):
runLog.error(
"It is possible the case either can not run or is not self consistent"
)
if any(t[3] == "HAS ISSUES" for t in table):
runLog.error("The case is not self consistent")

if any(t[2] == "FAILED" for t in table):
runLog.error("The case can not start")
1 change: 1 addition & 0 deletions armi/cli/tests/test_runEntryPoint.py
Expand Up @@ -77,6 +77,7 @@ def test_checkInputEntryPointBasics(self):
self.assertEqual(ci.name, "check-input")
self.assertEqual(ci.args.patterns, [ARMI_RUN_PATH])
self.assertEqual(ci.args.skip_checks, True)
self.assertEqual(ci.args.generate_design_summary, False)

def test_checkInputEntryPointInvoke(self):
ci = CheckInputEntryPoint()
Expand Down

0 comments on commit ff4496c

Please sign in to comment.