def test_process_doc(self): """ Method to test the process rst documentation. """ # Generate the writer object docwriter = PipelineHelpWriter([self.process_id]) rstdoc = docwriter.write_api_docs(returnrst=True) self.assertTrue(self.process_id in rstdoc)
def test_pipeline_doc(self): """ Method to test the pipeline rst documentation. """ # Generate the writer object docwriter = PipelineHelpWriter([self.pipeline_id]) rstdoc = docwriter.write_api_docs(returnrst=True) self.assertTrue(self.pipeline_id in rstdoc)
for sorted_modules, dtype in ([sorted_pipelines, "pipeline"], [sorted_processes, "process"]): # Go through all modules for module_name, modules in sorted_modules.items(): # Generate the writer object docwriter = PipelineHelpWriter(modules, short_names=short_names) # Where the documentation will be written: a relative path from the # makefile short_name = docwriter.get_short_name(module_name) outdir = os.path.join(base_outdir, short_name, dtype) print('short name:', short_name, ', outdir:', outdir) docwriter.write_api_docs(outdir) # Create an index that will be inserted in the module main index. # The file format doesn't matter since we will make an include but # prevent Sphinx to convert such files docwriter.write_index( outdir, "index", relative_to=os.path.join(base_outdir, short_name), rst_extension=".txt") # Just print a summary logger.info("{0}: '{1}' files written for module '{2}' at location " "{3}.".format(dtype, len(docwriter.written_modules), module_name, os.path.abspath(outdir))) ###############################################################################
for sorted_modules, dtype in ([sorted_pipelines, "pipeline"], [sorted_processes, "process"]): # Go through all modules for module_name, modules in sorted_modules.items(): # Generate the writer object docwriter = PipelineHelpWriter(modules, short_names=short_names) # Where the documentation will be written: a relative path from the # makefile short_name = docwriter.get_short_name(module_name) outdir = os.path.join(base_outdir, short_name, dtype) print('short name:', short_name, ', outdir:', outdir) docwriter.write_api_docs(outdir) # Create an index that will be inserted in the module main index. # The file format doesn't matter since we will make an include but # prevent Sphinx to convert such files docwriter.write_index(outdir, "index", relative_to=os.path.join(base_outdir, short_name), rst_extension=".rst") # Just print a summary logger.info("{0}: '{1}' files written for module '{2}' at location " "{3}.".format(dtype, len(docwriter.written_modules), module_name, os.path.abspath(outdir)))