parameters: (self)
docstring: Main routine goes for nested .rst docs
docstring_summary: Main routine goes for nested .rst docs
docstring_tokens: Main routine goes for nested . rst docs
function: def main(self):
      """ Main routine goes for nested .rst docs
      """
      child_rst = set()
      for doc_name, sources in self.paths.items():
        includes = self.generate_rst(source_file=sources.get('src'),
          src_path=sources.get('src_path'),
          final_path=sources.get('final_path'), start_path=sources.get('sphinx_path'))
        child_rst.update(includes)
      self.already_modified_files.update(child_rst)
      child_rst_lst = list(child_rst)
  
      sphinx_rel_path = self.paths.get('maintainers_guide').get('sphinx_path')
      grand_child_rst = set()
      for child in child_rst_lst:
        file_name = os.path.split(child)[-1]
        final_path = os.path.join(self.rst_dir, file_name)
        src_path = os.path.split(child)[0]
        includes_grand = self.generate_rst(source_file=child, src_path=src_path,
          final_path=final_path,  start_path=sphinx_rel_path)
        grand_child_rst.update(includes_grand)
      grand_child_rst_lst = \
        [gc_rst for gc_rst in grand_child_rst if gc_rst not in self.already_modified_files]
  
      grand_grand_child_rst = set()
      for grand_child in grand_child_rst_lst:
        file_name = os.path.split(grand_child)[-1]
        final_path = os.path.join(self.rst_dir, file_name)
        src_path = os.path.split(grand_child)[0]
        includes_grand_grand = self.generate_rst(source_file=grand_child, src_path=src_path,
          final_path=final_path, start_path=sphinx_rel_path)
        grand_grand_child_rst.update(includes_grand_grand)
  
      if not grand_grand_child_rst:
        print('DONE! ALL GOOD!\n')
      else:
        print('NOT DONE!\n')
  
      self.remove_title_numbering()
  
      print('===> Generating Sphinx documentation:\n')
      for doc_name, sources in self.paths.items():
        cwd = sources.get('sphinx_path')
        print(f'===> Generating {doc_name}\n')
        self.run_sphinx(cwd=cwd)
        self.combine_documentation(docs_dir=cwd, title=sources.get('title'))
function_tokens: def main ( self ) : child_rst = set ( ) for doc_name , sources in self . paths . items ( ) : includes = self . generate_rst ( source_file = sources . get ( 'src' ) , src_path = sources . get ( 'src_path' ) , final_path = sources . get ( 'final_path' ) , start_path = sources . get ( 'sphinx_path' ) ) child_rst . update ( includes ) self . already_modified_files . update ( child_rst ) child_rst_lst = list ( child_rst ) sphinx_rel_path = self . paths . get ( 'maintainers_guide' ) . get ( 'sphinx_path' ) grand_child_rst = set ( ) for child in child_rst_lst : file_name = os . path . split ( child ) [ - 1 ] final_path = os . path . join ( self . rst_dir , file_name ) src_path = os . path . split ( child ) [ 0 ] includes_grand = self . generate_rst ( source_file = child , src_path = src_path , final_path = final_path , start_path = sphinx_rel_path ) grand_child_rst . update ( includes_grand ) grand_child_rst_lst = [ gc_rst for gc_rst in grand_child_rst if gc_rst not in self . already_modified_files ] grand_grand_child_rst = set ( ) for grand_child in grand_child_rst_lst : file_name = os . path . split ( grand_child ) [ - 1 ] final_path = os . path . join ( self . rst_dir , file_name ) src_path = os . path . split ( grand_child ) [ 0 ] includes_grand_grand = self . generate_rst ( source_file = grand_child , src_path = src_path , final_path = final_path , start_path = sphinx_rel_path ) grand_grand_child_rst . update ( includes_grand_grand ) if not grand_grand_child_rst : print ( 'DONE! ALL GOOD!\n' ) else : print ( 'NOT DONE!\n' ) self . remove_title_numbering ( ) print ( '===> Generating Sphinx documentation:\n' ) for doc_name , sources in self . paths . items ( ) : cwd = sources . get ( 'sphinx_path' ) print ( f'===> Generating {doc_name}\n' ) self . run_sphinx ( cwd = cwd ) self . combine_documentation ( docs_dir = cwd , title = sources . get ( 'title' ) )