Skip to content

Commit

Permalink
Merge pull request #29574 from cticenhour/moosedocs-deprecated-removal
Browse files Browse the repository at this point in the history
Remove some options deprecations in MooseDocs
  • Loading branch information
cticenhour authored Dec 20, 2024
2 parents a9911ed + 046eadd commit 7d4ab78
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 32 deletions.
11 changes: 0 additions & 11 deletions python/MooseDocs/commands/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ 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='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')
parser.add_argument('--req-reports', nargs='+', default=None,
Expand Down Expand Up @@ -88,14 +85,6 @@ def main(opt):
if opt.req_reports and req_reports:
req_reports = [report for report in req_reports if report.title in opt.req_reports]

# Apply --generate option
if opt.generate:
print("The --generate option has been replaced by./moosedocs.py generate.")

# Apply --dump option
if opt.dump:
print("The --dump option has been replaced by./moosedocs.py syntax.")

# Apply 'show_warnings' option
if opt.show_warnings:
_enable_warnings(app_reports)
Expand Down
4 changes: 0 additions & 4 deletions python/MooseDocs/extensions/appsyntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def defaultConfig():
config['inputs'] = ([],
"List of directories to interrogate for input files using an object.")
config['allow-test-objects'] = (False, "Enable documentation for test objects.");
config['hide'] = (None, "DEPRECATED")
config['remove'] = (None, "List or Dictionary of lists of syntax to remove.")
config['visible'] = (['required', 'optional'],
"Parameter groups to show as un-collapsed.")
Expand All @@ -125,9 +124,6 @@ def __init__(self, *args, **kwargs):
self._syntax_cache = dict()
self._external_missing_syntax = set() # page.uid

if self['hide'] is not None:
LOG.warning("The 'hide' option is no longer being used.")

def preExecute(self):
"""Populate the application syntax tree."""

Expand Down
18 changes: 4 additions & 14 deletions python/MooseDocs/extensions/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def binContent(self, page, location=None, method=None):
return headings

class ContentCommand(command.CommandComponent):
COMMAND = ('content', 'contents') #TODO: Change this to content after format is working
COMMAND = ('content')
SUBCOMMAND = (None, 'list')

@staticmethod
Expand All @@ -122,14 +122,11 @@ def defaultSettings():
return settings

def createToken(self, parent, info, page, settings):
if info['command'] == 'contents':
msg = 'The command "!contents" is deprecated, please use "!content list".'
LOG.warning(common.report_error(msg, page.source, info.line, info[0], prefix='WARNING'))
ContentToken(parent, location=settings['location'], level=settings['level'])
return parent

class AtoZCommand(command.CommandComponent):
COMMAND = ('content', 'contents')
COMMAND = ('content')
SUBCOMMAND = 'a-to-z'

@staticmethod
Expand All @@ -141,15 +138,12 @@ def defaultSettings():
return settings

def createToken(self, parent, info, page, settings):
if info['command'] == 'contents':
msg = 'The command "!contents a-to-z" is deprecated, please use "!content a-to-z".'
LOG.warning(common.report_error(msg, page.source, info.line, info[0], prefix='WARNING'))
AtoZToken(parent, location=settings['location'], level=settings['level'],
buttons=settings['buttons'])
return parent

class TableOfContentsCommand(command.CommandComponent):
COMMAND = ('content', 'contents')
COMMAND = ('content')
SUBCOMMAND = 'toc'

@staticmethod
Expand All @@ -161,10 +155,6 @@ def defaultSettings():
return settings

def createToken(self, parent, info, page, settings):
if info['command'] == 'contents':
msg = 'The command "!contents toc" is deprecated, please use "!content toc".'
LOG.warning(common.report_error(msg, page.source, info.line, info[0], prefix='WARNING'))

levels = settings['levels']
if isinstance(levels, (str, str)):
levels = [int(l) for l in levels.split()]
Expand Down Expand Up @@ -483,5 +473,5 @@ def createHTMLHelper(self, parent, token, page, direction):
string=string)

def createLatex(self, parent, token, page):
msg = "Warning: The Content Extension\'s 'pagination' command is not supported for LaTex documents."
msg = "Warning: The Content Extension\'s 'pagination' command is not supported for LaTeX documents."
latex.String(parent, content=msg)
2 changes: 1 addition & 1 deletion python/MooseDocs/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
def command_line_options():
"""
The main command line parser, this creates the main parser and calls the
calls the command_line_options method for each command.
command_line_options method for each command.
"""
desc = "MooseDocs: A utility to build MOOSE documentation from a single source."
parser = argparse.ArgumentParser(description=desc)
Expand Down
2 changes: 1 addition & 1 deletion python/MooseDocs/tree/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def tokenGenerator(parent, **kwargs):

class Token(NodeBase):
"""
Base class for AST tokens. All tokens are of this type, but should be generate with the
Base class for AST tokens. All tokens are of this type, but should be generated with the
newToken function to assign default attributes.
Input:
Expand Down
2 changes: 1 addition & 1 deletion python/TestHarness/tests/tests
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
requirement = "The system shall perform all operations required of the TestHarness except executing a test"
issues = "#8637"
[]
[dislpay_required]
[display_required]
type = PythonUnitTest
input = test_DisplayRequired.py
requirement = "The system shall run only tests designated with display_required."
Expand Down

0 comments on commit 7d4ab78

Please sign in to comment.