Ejemplo n.º 1
0
        # 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)))

###############################################################################
# Generate the main module index
###############################################################################

# First get all unique modules
modules = set(sorted_processes.keys() + sorted_pipelines.keys())

# Go through all unique modules
Ejemplo n.º 2
0
        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)))

###############################################################################
# Generate the main module index
###############################################################################

# First get all unique modules
modules = set(list(sorted_processes.keys()) + list(sorted_pipelines.keys()))