Skip to content
Permalink
Browse files

Merge pull request #13136 from aeslaughter/workshop

Fix problem with partial app syntax lists
  • Loading branch information...
permcody committed Mar 27, 2019
2 parents fdf5d18 + bc0cd0d commit 60b7eaf9a74372ac7b9096ad78689c22b00f40e2
@@ -247,6 +247,6 @@ of kernels that have to be provided!

## Objects, Actions, and, Syntax

!syntax complete group=ChemicalReactionsApp level=3
!syntax complete groups=ChemicalReactionsApp level=3

!bibtex bibliography
@@ -112,4 +112,4 @@ The recommended PETSc options for use with Dirac based contact are given below:

## Objects, Actions, and Syntax

!syntax complete group=ContactApp level=3
!syntax complete groups=ContactApp level=3
@@ -137,4 +137,4 @@ to support the newly-available series.

## Objects, Actions, and Syntax

!syntax complete group=FunctionalExpansionToolsApp level=3
!syntax complete groups=FunctionalExpansionToolsApp level=3
@@ -5,4 +5,4 @@ Documentation for the heat conduction module needs some work...

## Objects, Actions, and Syntax

!syntax complete group=HeatConductionApp level=3
!syntax complete groups=HeatConductionApp level=3
@@ -11,8 +11,6 @@ links provided detailed information on the theory and use of the level set modul
For reference the following tables list the objects contained within the level set module and a brief
description of there purpose, each object may be selected to navigate to a detailed page.

!syntax complete group=LevelSetApp

## Level Set Module Tasks

The following additional tasks should be completed to make the level
@@ -32,6 +30,6 @@ set module more useful and robust for real-world applications:

## Objects, Actions, and, Syntax

!syntax complete group=LevelSetApp level=3
!syntax complete groups=LevelSetApp level=3

!bibtex bibliography
@@ -5,4 +5,4 @@ Documentation for the misc module needs some work...

## Objects, Actions, and Syntax

!syntax complete group=MiscApp level=3
!syntax complete groups=MiscApp level=3
@@ -29,4 +29,4 @@ created; these objects are currently not as performant as their hand-coded
peers, but they can be used seamlessly in simulations with mesh deformation and
are guaranteed to generate correct Jacobians.

!syntax complete group=NavierStokesApp
!syntax complete groups=NavierStokesApp
@@ -1 +1 @@
!syntax complete group=PhaseFieldApp
!syntax complete groups=PhaseFieldApp
@@ -64,4 +64,4 @@ complete set of samples that could be passed to sub-applications via the

## Objects, Actions, and Syntax

!syntax complete group=StochasticToolsApp
!syntax complete groups=StochasticToolsApp
@@ -1 +1 @@
!syntax complete group=TensorMechanicsApp
!syntax complete groups=TensorMechanicsApp
@@ -3,4 +3,4 @@
!alert construction
The XFEM module needs some documentation.

!syntax complete group=XFEMApp
!syntax complete groups=XFEMApp
@@ -518,27 +518,32 @@ class SyntaxCompleteCommand(SyntaxListCommand):
@staticmethod
def defaultSettings():
settings = SyntaxListCommand.defaultSettings()
settings['group'] = (None, "The group (app) to limit the complete syntax list.")
settings['level'] = (2, "Beginning heading level.")
settings['heading'] = (None, settings['heading'][1])
return settings

def createTokenFromSyntax(self, parent, info, page, obj):
self._addList(parent, info, page, obj, 2)
self._addList(parent, info, page, obj, self.settings['level'])
return parent

def _addList(self, parent, info, page, obj, level):
for child in obj.syntax(group=self.settings['group']):

gs = self.settings['groups']
groups = set(gs.split()) if gs else set(obj.groups)

for child in obj.syntax():
if child.removed:
continue

url = os.path.join('syntax', child.markdown())
h = core.Heading(parent, level=level)
autolink.AutoLink(h, page=url, string=unicode(child.fullpath.strip('/')))
if child.groups.intersection(groups):
url = os.path.join('syntax', child.markdown())
h = core.Heading(parent, level=level)
autolink.AutoLink(h, page=url, string=unicode(child.fullpath.strip('/')))

super(SyntaxCompleteCommand, self).createTokenFromSyntax(parent, info, page, child)
SyntaxListCommand.createTokenFromSyntax(self, parent, info, page, child)
self._addList(parent, info, page, child, level + 1)


class RenderSyntaxList(components.RenderComponent):
def createHTML(self, parent, token, page):
div = html.Tag(parent, 'div', token, class_='moose-syntax-list')

0 comments on commit 60b7eaf

Please sign in to comment.
You can’t perform that action at this time.