Skip to content

Commit

Permalink
Default to show_warning=False in SQAReport
Browse files Browse the repository at this point in the history
  • Loading branch information
hugary1995 authored and GiudGiud committed Dec 2, 2024
1 parent b40b168 commit 23eafbe
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions modules/solid_mechanics/doc/sqa_reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Applications:
- ${MOOSE_DIR}/framework/doc/unregister.yml
remove:
- ${MOOSE_DIR}/framework/doc/remove.yml
log_stub_files: NONE
log_stub_files: WARNING

Documents:
software_quality_plan: sqa/inl_records.md#software_quality_plan
Expand All @@ -34,4 +34,4 @@ Requirements:
solid_mechanics:
directories:
- ${MOOSE_DIR}/modules/solid_mechanics
log_missing: NONE
log_missing: WARNING
3 changes: 2 additions & 1 deletion python/MooseDocs/commands/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def _print_reports(title, reports, status):
if reports:
print(mooseutils.colorText('\n{0}\n{1} REPORT(S):\n{0}\n'.format('-'*80, title.upper()), 'MAGENTA'), end='', flush=True)
for report in reports:
print(report.getReport(), '\n')
if report.status != 1 or report.show_warning:
print(report.getReport(), '\n')
status = report.status if status < report.status else status
return status

Expand Down
2 changes: 1 addition & 1 deletion python/moosesqa/SQAReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Status(enum.IntEnum):

def __init__(self, **kwargs):
self.title = kwargs.pop('title', '')
self.show_warning = kwargs.pop('show_warning', True)
self.show_warning = kwargs.pop('show_warning', False)
self.show_error = kwargs.pop('show_error', True)
self.show_critical = kwargs.pop('show_critical', True)
self.status = kwargs.pop('status', SQAReport.Status.PASS)
Expand Down
10 changes: 5 additions & 5 deletions python/moosesqa/test/test_SQAReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ def execute(self):
self.assertIn('log_warning: 1', r)
self.assertIn('log_error: 1', r)
self.assertIn('log_critical: 1', r)
self.assertIn('warning message', r)
self.assertNotIn('warning message', r)
self.assertIn('error message', r)
self.assertIn('critical message', r)

report = TestReport(show_warning=False)
report = TestReport(show_warning=True)
r = str(report.getReport())
self.assertEqual(report.status, SQAReport.Status.ERROR)
self.assertIn('log_warning: 1', r)
self.assertIn('log_error: 1', r)
self.assertIn('log_critical: 1', r)
self.assertNotIn('warning message', r)
self.assertIn('warning message', r)
self.assertIn('error message', r)
self.assertIn('critical message', r)

Expand All @@ -59,7 +59,7 @@ def execute(self):
self.assertIn('log_warning: 1', r)
self.assertIn('log_error: 1', r)
self.assertIn('log_critical: 1', r)
self.assertIn('warning message', r)
self.assertNotIn('warning message', r)
self.assertNotIn('error message', r)
self.assertIn('critical message', r)

Expand All @@ -69,7 +69,7 @@ def execute(self):
self.assertIn('log_warning: 1', r)
self.assertIn('log_error: 1', r)
self.assertIn('log_critical: 1', r)
self.assertIn('warning message', r)
self.assertNotIn('warning message', r)
self.assertIn('error message', r)
self.assertNotIn('critical message', r)

Expand Down

0 comments on commit 23eafbe

Please sign in to comment.