def __init__(self, yaml, src, **kwargs): MooseInformationBase.__init__(self, yaml, **kwargs) # Member variables self._src = src self._inputs = kwargs.pop('inputs', None) self._children = kwargs.pop('children', None) self._name = yaml['name'].split('/')[-1] self._description = yaml['description'] # Locate the root directory output = subprocess.check_output(['git', 'rev-parse', '--git-dir'], stderr=subprocess.STDOUT) self._root = os.path.dirname(output) # Create the tables (generate 'Required' and 'Optional' initially so that they come out in the proper order) self._tables = collections.OrderedDict() self._tables['Required'] = MooseObjectParameterTable() self._tables['Optional'] = MooseObjectParameterTable() for param in yaml['parameters'] or []: name = param['group_name'] if not name and param['required']: name = 'Required' elif not name and not param['required']: name = 'Optional' if name not in self._tables: self._tables[name] = MooseObjectParameterTable() self._tables[name].addParam(param)
def __init__(self, node, syntax, **kwargs): MooseInformationBase.__init__(self, node, **kwargs) self._syntax = syntax