From fe5fc8f0c274673758f1905bda381f30d2178fae Mon Sep 17 00:00:00 2001 From: Andrew E Slaughter Date: Wed, 11 Nov 2020 14:48:10 -0700 Subject: [PATCH 1/4] Create separate generate command and improve testing (closes #16155) --- python/MooseDocs/commands/check.py | 6 +- python/MooseDocs/commands/generate.py | 107 ++++++++++++++++++ python/MooseDocs/main.py | 5 +- python/MooseDocs/test/commands/test_check.py | 12 +- .../MooseDocs/test/commands/test_generate.py | 60 ++++++++++ python/MooseDocs/test/commands/tests | 7 ++ python/moosesqa/SQAMooseAppReport.py | 52 --------- python/moosesqa/SilentRecordHandler.py | 7 ++ python/moosesqa/check_syntax.py | 2 +- 9 files changed, 189 insertions(+), 69 deletions(-) create mode 100644 python/MooseDocs/commands/generate.py create mode 100755 python/MooseDocs/test/commands/test_generate.py diff --git a/python/MooseDocs/commands/check.py b/python/MooseDocs/commands/check.py index 60c6fa17007b..bea0b0950623 100644 --- a/python/MooseDocs/commands/check.py +++ b/python/MooseDocs/commands/check.py @@ -91,10 +91,8 @@ def main(opt): req_reports = [report for report in req_reports if report.title in opt.req_reports] # Apply --generate option - if app_reports and opt.generate: - for report in app_reports: - if (set(report.app_types) == set(opt.generate)): - report.generate_stubs = True + if opt.generate: + print("The --generate option has been replaced by./moosedocs.py generate.") # Apply --dump option if app_reports and opt.dump: diff --git a/python/MooseDocs/commands/generate.py b/python/MooseDocs/commands/generate.py new file mode 100644 index 000000000000..48828084e923 --- /dev/null +++ b/python/MooseDocs/commands/generate.py @@ -0,0 +1,107 @@ +#* This file is part of the MOOSE framework +#* https://www.mooseframework.org +#* +#* All rights reserved, see COPYRIGHT for full restrictions +#* https://github.com/idaholab/moose/blob/master/COPYRIGHT +#* +#* Licensed under LGPL 2.1, please see LICENSE for details +#* https://www.gnu.org/licenses/lgpl-2.1.html + +"""Developer tools for MooseDocs.""" +import argparse +import os +import re +import collections +import logging + +import MooseDocs +import moosesqa +import moosetree +import mooseutils +import moosesyntax + +from .. import common +#from ..common import exceptions +#from ..tree import syntax +from ..extensions import template + +LOG = logging.getLogger(__name__) + +def command_line_options(subparser, parent): + """Define the 'generate' command.""" + parser = subparser.add_parser('generate', + parents=[parent], + help="Tool for creating/updating documentation stub pages.") + parser.add_argument('app_types', nargs='+', type=str, + help="A list of app types to use when generate stub pages (e.g., StochasticToolsApp).") + parser.add_argument('--config', type=str, default='sqa_reports.yml', + help="The YAML config file for performing SQA checks.") + +def main(opt): + """./moosedocs generate""" + + # Setup logging + logger = logging.getLogger('MooseDocs') + logger.handlers = list() + logger.addHandler(moosesqa.SilentRecordHandler()) + + # Get the report objects for the applications + _, _, app_reports = moosesqa.get_sqa_reports(opt.config, app_report=True, doc_report=False, req_report=False) + + # Loop through all reports and generate the stub pages + for report in app_reports: + report.app_types = opt.app_types + report.getReport() # this is needed to generate the app syntax + for node in moosetree.iterate(report.app_syntax, lambda n: _shouldCreateStub(report, n)): + _createStubPage(report, node) + + logger.handlers[0].clear() # don't report errors, that is the job for check command + return 0 + +def _shouldCreateStub(report, n): + return (not n.removed) \ + and ('_md_file' in n) \ + and ((n['_md_file'] is None) or n['_is_stub']) \ + and ((n.group in report.app_types) \ + or (n.groups() == set(report.app_types))) + +def _createStubPage(report, node): + """Copy template content to expected document location.""" + + # Determine the correct markdown filename + filename = node['_md_path'] + if isinstance(node, moosesyntax.ObjectNodeBase): + filename = os.path.join(report.working_dir, node['_md_path']) + elif isinstance(node, moosesyntax.SyntaxNode): + action = moosetree.find(node, lambda n: isinstance(n, moosesyntax.ActionNode)) + filename = os.path.join(report.working_dir,os.path.dirname(node['_md_path']), 'index.md') + + # Determine the source template + tname = None + if isinstance(node, moosesyntax.SyntaxNode): + tname = 'moose_system.md.template' + elif isinstance(node, moosesyntax.MooseObjectNode): + tname = 'moose_object.md.template' + elif isinstance(node, moosesyntax.ActionNode): + tname = 'moose_action.md.template' + else: + raise Exception("Unexpected syntax node type.") + + # Template file + tname = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'framework', + 'doc', 'content','templates', 'stubs', tname)) + + # Read template and apply node content + with open(tname, 'r') as fid: + content = fid.read() + content = mooseutils.apply_template_arguments(content, name=node.name, syntax=node.fullpath()) + + # Write the content to the desired destination + print("Creating/updating stub page: {}".format(filename)) + _writeFile(filename, content) + +def _writeFile(filename, content): + """A helper function that is easy to mock in tests""" + os.makedirs(os.path.dirname(filename), exist_ok=True) + with open(filename, 'w') as fid: + fid.write(content) diff --git a/python/MooseDocs/main.py b/python/MooseDocs/main.py index c56b536070db..ad7953975ce0 100755 --- a/python/MooseDocs/main.py +++ b/python/MooseDocs/main.py @@ -16,7 +16,7 @@ import logging import mooseutils -from .commands import build, verify, check +from .commands import build, verify, check, generate from .common import log def command_line_options(): @@ -40,6 +40,7 @@ def command_line_options(): build.command_line_options(subparser, parent) check.command_line_options(subparser, parent) verify.command_line_options(subparser, parent) + generate.command_line_options(subparser, parent) return parser.parse_args() def run(): @@ -55,6 +56,8 @@ def run(): errno = check.main(options) elif options.command == 'verify': errno = verify.main(options) + elif options.command == 'generate': + errno = generate.main(options) handler = logging.getLogger('MooseDocs').handlers[0] critical = handler.getCount(logging.CRITICAL) diff --git a/python/MooseDocs/test/commands/test_check.py b/python/MooseDocs/test/commands/test_check.py index e60f45bec8c6..50c6388e45ae 100755 --- a/python/MooseDocs/test/commands/test_check.py +++ b/python/MooseDocs/test/commands/test_check.py @@ -37,23 +37,13 @@ def tearDown(self): # Restore the working directory os.chdir(self._working_dir) - @mock.patch('moosesqa.SQAMooseAppReport._writeFile') - def testCheck(self, writeFile): - - # Store the filenames to be created - filenames = list() - writeFile.side_effect = lambda fn, *args: filenames.append(fn) + def testCheck(self): # Create command-line arguments in opt = types.SimpleNamespace(config='sqa_test_reports.yml', reports=['app'], dump=None, app_reports=None, req_reports=None, generate=['MooseTestApp'], show_warnings=False) - # --generate - status = check.main(opt) - self.assertEqual(status, 0) - self.assertTrue(len(filenames) > 0) - # --dump opt.dump = ['moose_test'] opt.generate = None diff --git a/python/MooseDocs/test/commands/test_generate.py b/python/MooseDocs/test/commands/test_generate.py new file mode 100755 index 000000000000..9491526c9efd --- /dev/null +++ b/python/MooseDocs/test/commands/test_generate.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +#* This file is part of the MOOSE framework +#* https://www.mooseframework.org +#* +#* All rights reserved, see COPYRIGHT for full restrictions +#* https://github.com/idaholab/moose/blob/master/COPYRIGHT +#* +#* Licensed under LGPL 2.1, please see LICENSE for details +#* https://www.gnu.org/licenses/lgpl-2.1.html +import os +import unittest +import mock +import types +import io +import mooseutils +import moosesqa +from MooseDocs.commands import generate + +@unittest.skipIf(mooseutils.git_version() < (2,11,4), "Git version must at least 2.11.4") +class TestGenerate(unittest.TestCase): + def setUp(self): + # Change to the test/doc directory + self._working_dir = os.getcwd() + moose_test_doc_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', 'test', 'doc')) + os.chdir(moose_test_doc_dir) + + def tearDown(self): + # Restore the working directory + os.chdir(self._working_dir) + + @mock.patch('MooseDocs.commands.generate._shouldCreateStub') + @mock.patch('MooseDocs.commands.generate._writeFile') + def testGenerate(self, writeFile, shouldCreateStub): + + # Store the filenames to be created + filenames = list() + writeFile.side_effect = lambda fn, *args: filenames.append(fn) + + # Create custom function for determining if a stub should be created + shouldCreateStub.side_effect = self._shouldCreateStub + + # Run the generate command + opt = types.SimpleNamespace(app_types=['MooseApp'], config='sqa_test_reports.yml') + status = generate.main(opt) + + self.assertEqual(status, 0) + self.assertEqual(len(filenames), 3) + self.assertTrue(filenames[0].endswith('moose/test/doc/content/syntax/Kernels/index.md')) + self.assertTrue(filenames[1].endswith('moose/test/doc/content/source/actions/AddKernelAction.md')) + self.assertTrue(filenames[2].endswith('moose/test/doc/content/source/kernels/Diffusion.md')) + + @staticmethod + def _shouldCreateStub(report, n): + # Test for stub on Action, Object, and Syntax + if n.fullpath() in ('/Kernels/AddKernelAction', '/Kernels/Diffusion', '/Kernels'): + return True + return False + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/python/MooseDocs/test/commands/tests b/python/MooseDocs/test/commands/tests index 9d94bec404f1..0d49becb2ad6 100644 --- a/python/MooseDocs/test/commands/tests +++ b/python/MooseDocs/test/commands/tests @@ -7,4 +7,11 @@ requirement = "The system shall include a utility for reporting the status of software quality items." [] + [generate] + type = PythonUnitTest + input = test_generate.py + issues = '#16155' + + requirement = "The system shall include a utility for generating documentation stub pages." + [] [] diff --git a/python/moosesqa/SQAMooseAppReport.py b/python/moosesqa/SQAMooseAppReport.py index 9fb374ab15aa..6c20a0b75b21 100644 --- a/python/moosesqa/SQAMooseAppReport.py +++ b/python/moosesqa/SQAMooseAppReport.py @@ -32,7 +32,6 @@ @mooseutils.addProperty('alias', ptype=list) @mooseutils.addProperty('unregister', ptype=list) @mooseutils.addProperty('allow_test_objects', ptype=bool, default=False) -@mooseutils.addProperty('generate_stubs', ptype=bool, default=False) @mooseutils.addProperty('dump_syntax', ptype=bool, default=False) class SQAMooseAppReport(SQAReport): """ @@ -99,56 +98,12 @@ def execute(self, **kwargs): kwargs.setdefault('allow_test_objects', self.allow_test_objects) logger = check_syntax(self.app_syntax, self.app_types, file_cache, **kwargs) - # Create stub pages - if self.generate_stubs: - func = lambda n: (not n.removed) \ - and ('_md_file' in n) \ - and ((n['_md_file'] is None) or n['_is_stub']) \ - and ((n.group in self.app_types) \ - or (n.groups() == set(self.app_types))) - for node in moosetree.iterate(self.app_syntax, func): - self._createStubPage(node) - # Dump if self.dump_syntax: print(self.app_syntax) return logger - def _createStubPage(self, node): - """Copy template content to expected document location.""" - - # Determine the correct markdown filename - filename = node['_md_path'] - if isinstance(node, moosesyntax.ObjectNodeBase): - filename = os.path.join(self.working_dir, node['_md_path']) - elif isinstance(node, moosesyntax.SyntaxNode): - action = moosetree.find(node, lambda n: isinstance(n, moosesyntax.ActionNode)) - filename = os.path.join(self.working_dir,os.path.dirname(node['_md_path']), 'index.md') - - # Determine the source template - tname = None - if isinstance(node, moosesyntax.SyntaxNode): - tname = 'moose_system.md.template' - elif isinstance(node, moosesyntax.MooseObjectNode): - tname = 'moose_object.md.template' - elif isinstance(node, moosesyntax.ActionNode): - tname = 'moose_action.md.template' - else: - raise Exception("Unexpected syntax node type.") - - # Template file - tname = os.path.join(os.path.dirname(__file__), '..', '..', 'framework', 'doc', 'content', - 'templates', 'stubs', tname) - - # Read template and apply node content - with open(tname, 'r') as fid: - content = fid.read() - content = mooseutils.apply_template_arguments(content, name=node.name, syntax=node.fullpath()) - - # Write the content to the desired destination - self._writeFile(filename, content) - def _loadYamlFiles(self, filenames): """Load the removed/alias yml files""" content = dict() @@ -163,10 +118,3 @@ def _loadYamlFiles(self, filenames): content.update({fname:yaml_load(yml_file)}) return content - - @staticmethod - def _writeFile(filename, content): - """A helper function that is easy to mock in tests""" - os.makedirs(os.path.dirname(filename), exist_ok=True) - with open(filename, 'w') as fid: - fid.write(content) diff --git a/python/moosesqa/SilentRecordHandler.py b/python/moosesqa/SilentRecordHandler.py index 80b2d3925a06..6b2cc34c81ec 100644 --- a/python/moosesqa/SilentRecordHandler.py +++ b/python/moosesqa/SilentRecordHandler.py @@ -23,9 +23,16 @@ def getCount(self, level): def getRecords(self): return copy.copy(self._records) + def clear(self): + self.clearRecords() + self.clearCounts() + def clearRecords(self): self._records.clear() + def clearCounts(self): + self.COUNTS.clear() + def handle(self, record): self._records[record.levelno].add(record) self.COUNTS[record.levelno] += 1 diff --git a/python/moosesqa/check_syntax.py b/python/moosesqa/check_syntax.py index 942df8c43b54..8e4edf1599d5 100644 --- a/python/moosesqa/check_syntax.py +++ b/python/moosesqa/check_syntax.py @@ -52,7 +52,7 @@ def _check_node(node, file_cache, object_prefix, syntax_prefix, logger): md_path = os.path.join(prefix, node.markdown) md_file = find_md_file(md_path, file_cache, logger) is_missing_description = is_object and (not node.description) and (not node.removed) - is_missing = (md_file is None) and (not node.removed) + is_missing = ((md_file is None) or (not os.path.isfile(md_file))) and (not node.removed) is_stub = file_is_stub(md_file) if (not is_missing) and (not node.removed) else False # ERROR: object is stub From ec2652d654f50bfd3237f029bd3b9ce9d4c8cde1 Mon Sep 17 00:00:00 2001 From: Andrew E Slaughter Date: Wed, 11 Nov 2020 14:48:27 -0700 Subject: [PATCH 2/4] Add missing stub page (refs #16155) --- .../content/source/mesh/MeshGeneratorMesh.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/framework/doc/content/source/mesh/MeshGeneratorMesh.md b/framework/doc/content/source/mesh/MeshGeneratorMesh.md index e69de29bb2d1..64227f5152cb 100644 --- a/framework/doc/content/source/mesh/MeshGeneratorMesh.md +++ b/framework/doc/content/source/mesh/MeshGeneratorMesh.md @@ -0,0 +1,36 @@ +# MeshGeneratorMesh + +!alert! construction title=Undocumented Class +The MeshGeneratorMesh has not been documented. The content listed below should be used as a starting point for +documenting the class, which includes the typical automatic documentation associated with a +MooseObject; however, what is contained is ultimately determined by what is necessary to make the +documentation clear for users. + +```markdown +# MeshGeneratorMesh + +!syntax description /Mesh/MeshGeneratorMesh + +## Overview + +!! Replace these lines with information regarding the MeshGeneratorMesh object. + +## Example Input File Syntax + +!! Describe and include an example of how to use the MeshGeneratorMesh object. + +!syntax parameters /Mesh/MeshGeneratorMesh + +!syntax inputs /Mesh/MeshGeneratorMesh + +!syntax children /Mesh/MeshGeneratorMesh +``` +!alert-end! + +!syntax description /Mesh/MeshGeneratorMesh + +!syntax parameters /Mesh/MeshGeneratorMesh + +!syntax inputs /Mesh/MeshGeneratorMesh + +!syntax children /Mesh/MeshGeneratorMesh From 2ecbdec6ad2bea8171bdfd854e94d7b432894624 Mon Sep 17 00:00:00 2001 From: Andrew E Slaughter Date: Wed, 11 Nov 2020 14:59:15 -0700 Subject: [PATCH 3/4] Create separate syntax command (refs #16155) --- python/MooseDocs/commands/check.py | 13 ++--- python/MooseDocs/commands/syntax.py | 55 +++++++++++++++++++ python/MooseDocs/main.py | 6 +- python/MooseDocs/test/commands/test_check.py | 8 --- python/MooseDocs/test/commands/test_syntax.py | 42 ++++++++++++++ python/MooseDocs/test/commands/tests | 7 +++ python/moosesqa/SQAMooseAppReport.py | 5 -- 7 files changed, 113 insertions(+), 23 deletions(-) create mode 100644 python/MooseDocs/commands/syntax.py create mode 100755 python/MooseDocs/test/commands/test_syntax.py diff --git a/python/MooseDocs/commands/check.py b/python/MooseDocs/commands/check.py index bea0b0950623..74bc084f154b 100644 --- a/python/MooseDocs/commands/check.py +++ b/python/MooseDocs/commands/check.py @@ -42,11 +42,8 @@ def command_line_options(subparser, parent): parser.add_argument('--show-warnings', action='store_true', help='Display all report warnings.') - parser.add_argument('--generate', nargs='+', default=None, - help='Generate/update stub pages for syntax and objects for the applications names listed (e.g., MooseApp). The type(s) provided here must match with the types provided in the configuration of the Application(s).') - - parser.add_argument('--dump', nargs='+', default=None, - help='Dump the syntax for the specified application reports (e.g. --dump navier_stokes') + parser.add_argument('--generate', nargs='+', default=None, help='Deprecated') + parser.add_argument('--dump', nargs='+', default=None, help='Deprecated') parser.add_argument('--app-reports', nargs='+', default=None, help='Limit to the following application reports (e.g. --app-reports navier_stokes') @@ -95,10 +92,8 @@ def main(opt): print("The --generate option has been replaced by./moosedocs.py generate.") # Apply --dump option - if app_reports and opt.dump: - for report in app_reports: - if report.title in opt.dump: - report.dump_syntax = True + if opt.dump: + print("The --dump option has been replaced by./moosedocs.py syntax.") # Apply 'show_warnings' option if opt.show_warnings: diff --git a/python/MooseDocs/commands/syntax.py b/python/MooseDocs/commands/syntax.py new file mode 100644 index 000000000000..1c94b4ddb329 --- /dev/null +++ b/python/MooseDocs/commands/syntax.py @@ -0,0 +1,55 @@ +#* This file is part of the MOOSE framework +#* https://www.mooseframework.org +#* +#* All rights reserved, see COPYRIGHT for full restrictions +#* https://github.com/idaholab/moose/blob/master/COPYRIGHT +#* +#* Licensed under LGPL 2.1, please see LICENSE for details +#* https://www.gnu.org/licenses/lgpl-2.1.html + +"""Developer tools for MooseDocs.""" +import argparse +import os +import re +import collections +import logging + +import MooseDocs +import moosesqa +import moosetree +import mooseutils +import moosesyntax + +from .. import common +#from ..common import exceptions +#from ..tree import syntax +from ..extensions import template + +LOG = logging.getLogger(__name__) + +def command_line_options(subparser, parent): + """Define the 'syntax' command.""" + parser = subparser.add_parser('syntax', + parents=[parent], + help="Tool for dumping application syntax to screen.") + parser.add_argument('--config', type=str, default='sqa_reports.yml', + help="The YAML config file for performing SQA checks.") + +def main(opt): + """./moosedocs syntax""" + + # Setup logging + logger = logging.getLogger('MooseDocs') + logger.handlers = list() + logger.addHandler(moosesqa.SilentRecordHandler()) + + # Get the report objects for the applications + _, _, app_reports = moosesqa.get_sqa_reports(opt.config, app_report=True, doc_report=False, req_report=False) + + # Loop through all reports and generate the stub pages + for report in app_reports: + report.getReport() # this is needed to generate the app syntax + print(report.app_syntax) + + logger.handlers[0].clear() # don't report errors, that is the job for check command + return 0 diff --git a/python/MooseDocs/main.py b/python/MooseDocs/main.py index ad7953975ce0..b1867c717cae 100755 --- a/python/MooseDocs/main.py +++ b/python/MooseDocs/main.py @@ -16,7 +16,7 @@ import logging import mooseutils -from .commands import build, verify, check, generate +from .commands import build, verify, check, generate, syntax from .common import log def command_line_options(): @@ -41,6 +41,8 @@ def command_line_options(): check.command_line_options(subparser, parent) verify.command_line_options(subparser, parent) generate.command_line_options(subparser, parent) + syntax.command_line_options(subparser, parent) + return parser.parse_args() def run(): @@ -58,6 +60,8 @@ def run(): errno = verify.main(options) elif options.command == 'generate': errno = generate.main(options) + elif options.command == 'syntax': + errno = syntax.main(options) handler = logging.getLogger('MooseDocs').handlers[0] critical = handler.getCount(logging.CRITICAL) diff --git a/python/MooseDocs/test/commands/test_check.py b/python/MooseDocs/test/commands/test_check.py index 50c6388e45ae..1a683a2b7322 100755 --- a/python/MooseDocs/test/commands/test_check.py +++ b/python/MooseDocs/test/commands/test_check.py @@ -44,14 +44,6 @@ def testCheck(self): app_reports=None, req_reports=None, generate=['MooseTestApp'], show_warnings=False) - # --dump - opt.dump = ['moose_test'] - opt.generate = None - with mock.patch('sys.stdout', new=io.StringIO()) as stdout: - status = check.main(opt) - self.assertIn('/Kernels/Diffusion', stdout.getvalue()) - self.assertEqual(status, 0) - # --reports opt.reports = ['app'] opt.config = 'sqa_reports.yml' diff --git a/python/MooseDocs/test/commands/test_syntax.py b/python/MooseDocs/test/commands/test_syntax.py new file mode 100755 index 000000000000..fa68f9899f9d --- /dev/null +++ b/python/MooseDocs/test/commands/test_syntax.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 +#* This file is part of the MOOSE framework +#* https://www.mooseframework.org +#* +#* All rights reserved, see COPYRIGHT for full restrictions +#* https://github.com/idaholab/moose/blob/master/COPYRIGHT +#* +#* Licensed under LGPL 2.1, please see LICENSE for details +#* https://www.gnu.org/licenses/lgpl-2.1.html +import os +import unittest +import mock +import types +import io +import mooseutils +import moosesqa +from MooseDocs.commands import syntax + +@unittest.skipIf(mooseutils.git_version() < (2,11,4), "Git version must at least 2.11.4") +class TestGenerate(unittest.TestCase): + def setUp(self): + # Change to the test/doc directory + self._working_dir = os.getcwd() + moose_test_doc_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', 'test', 'doc')) + os.chdir(moose_test_doc_dir) + + def tearDown(self): + # Restore the working directory + os.chdir(self._working_dir) + + @mock.patch('mooseutils.colorText') + def testDump(self, colorText): + colorText.side_effect = lambda txt, *args, **kwargs: txt + + # Run the generate command + opt = types.SimpleNamespace(config='sqa_test_reports.yml') + with mock.patch('sys.stdout', new=io.StringIO()) as stdout: + status = syntax.main(opt) + self.assertIn('Adaptivity: /Adaptivity', stdout.getvalue()) + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/python/MooseDocs/test/commands/tests b/python/MooseDocs/test/commands/tests index 0d49becb2ad6..919accbd89ca 100644 --- a/python/MooseDocs/test/commands/tests +++ b/python/MooseDocs/test/commands/tests @@ -14,4 +14,11 @@ requirement = "The system shall include a utility for generating documentation stub pages." [] + [syntax] + type = PythonUnitTest + input = test_syntax.py + issues = '#16155' + + requirement = "The system shall include a utility for displaying the application syntax tree." + [] [] diff --git a/python/moosesqa/SQAMooseAppReport.py b/python/moosesqa/SQAMooseAppReport.py index 6c20a0b75b21..3c8196982654 100644 --- a/python/moosesqa/SQAMooseAppReport.py +++ b/python/moosesqa/SQAMooseAppReport.py @@ -32,7 +32,6 @@ @mooseutils.addProperty('alias', ptype=list) @mooseutils.addProperty('unregister', ptype=list) @mooseutils.addProperty('allow_test_objects', ptype=bool, default=False) -@mooseutils.addProperty('dump_syntax', ptype=bool, default=False) class SQAMooseAppReport(SQAReport): """ Report of MooseObject and MOOSE syntax markdown pages. @@ -98,10 +97,6 @@ def execute(self, **kwargs): kwargs.setdefault('allow_test_objects', self.allow_test_objects) logger = check_syntax(self.app_syntax, self.app_types, file_cache, **kwargs) - # Dump - if self.dump_syntax: - print(self.app_syntax) - return logger def _loadYamlFiles(self, filenames): From a29f881a4bff529f118d30a3e765bd1030a65c1d Mon Sep 17 00:00:00 2001 From: Andrew E Slaughter Date: Thu, 19 Nov 2020 11:48:13 -0700 Subject: [PATCH 4/4] Remove commented imports --- python/MooseDocs/commands/generate.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/python/MooseDocs/commands/generate.py b/python/MooseDocs/commands/generate.py index 48828084e923..47b8b5c7a333 100644 --- a/python/MooseDocs/commands/generate.py +++ b/python/MooseDocs/commands/generate.py @@ -21,8 +21,6 @@ import moosesyntax from .. import common -#from ..common import exceptions -#from ..tree import syntax from ..extensions import template LOG = logging.getLogger(__name__)