Ejemplo n.º 1
0
def run_apidoc(_):
    """Generage API documentation"""
    import better_apidoc
    better_apidoc.main([
        'better-apidoc', '-t', './_templates', '--force', '--no-toc',
        '--separate', '-o', 'better_apidoc_out', '../mermithid'
    ])
Ejemplo n.º 2
0
def run_apidoc(app):
    """Generage API documentation"""
    import better_apidoc

    better_apidoc.APP = app

    better_apidoc.main([
        "better-apidoc",
        "-t",
        "_apidoc_templates",
        "--force",
        "--no-toc",
        "--separate",
        "-o",
        "API",
        os.path.dirname(hyperpyyaml.__file__),
    ])
    better_apidoc.main([
        "better-apidoc",
        "-t",
        "_apidoc_templates",
        "--force",
        "--no-toc",
        "--separate",
        "-o",
        "API",
        os.path.join("../", "speechbrain"),
    ])
Ejemplo n.º 3
0
def run_apidoc(app):
    """Generage API documentation"""
    import better_apidoc
    import pkgutil
    import sys
    import os

    astro_path = os.path.dirname(
        pkgutil.get_loader("astromodels").get_filename())

    sys.path.insert(0, os.path.abspath('..'))
    sys.path.insert(1, os.path.abspath('../astromodels'))

    # Add the path to the C extension
    #lib_path = os.path.abspath('%s/core' % astromodels.__path__[0])
    lib_path = os.path.abspath('%s/core' % astro_path)

    sys.path.insert(2, lib_path)

    #This must work now
    import node_ctype

    better_apidoc.APP = app
    better_apidoc.main([
        "better-apidoc",
        # "-t",
        # str(docs / "_templates"),
        "--force",
        "--no-toc",
        "--separate",
        "-o",
        str(DOCS / "api"),
        str(DOCS / ".." / "astromodels"),
    ])
Ejemplo n.º 4
0
def run_apidoc(_):
    """Generage API documentation"""
    import better_apidoc
    better_apidoc.main([
        'better-apidoc', '-t', './_templates', '--force', '--no-toc',
        '--separate', '-o', './API', '../src/qnet_qsd'
    ])
Ejemplo n.º 5
0
    def run_apidoc(app):
        """Generate API documentation"""

        apidoc_args = [
            "better-apidoc",
            "-a",
            "-M",
            "-t",
            os.path.join(".", "templates"),
            "--force",
            "--no-toc",
            "--separate",
            "--ext-autodoc",
            "--ext-coverage",
            "-o",
            os.path.join(".", "content", "_source_files/"),
            root,
        ]

        if exclude:
            apidoc_args.extend(exclude)

        import better_apidoc

        better_apidoc.APP = app
        better_apidoc.main(apidoc_args)
Ejemplo n.º 6
0
def run_apidoc(_):
    """Generate API documentation"""
    import better_apidoc
    better_apidoc.main([
        'better-apidoc', '-t', './_templates', '--force', '-o', './song_match',
        '../song_match'
    ])
Ejemplo n.º 7
0
def run_apidoc(_):
    import better_apidoc
    better_apidoc.main([
        'better-apidoc',
        '--no-toc',
        '--templates',
        os.path.join(root, '_templates'),
        '--force',
        '--separate',
        '--output-dir',
        os.path.join(root, 'api'),
        os.path.join(root, '..', 'async2v'),
    ])
Ejemplo n.º 8
0
def run_apidoc(module: str):
    """Runs apidoc, generating rst files from code.

        :param module: Module to run apidoc for.
    """
    import better_apidoc
    sys.path.append(WORKING_DIR)
    better_apidoc.main([
        "better-apidoc", "--force", "--module-first", "--separate",
        "--templates", "{docs_root}/_templates".format(docs_root=DOCS_ROOT),
        "-o", "{docs_root}/api".format(docs_root=DOCS_ROOT),
        "{working_dir}/{module}".format(working_dir=WORKING_DIR, module=module)
    ])
Ejemplo n.º 9
0
def run_apidoc(_):
    """Generage API documentation"""
    import better_apidoc
    better_apidoc.main([
        'better-apidoc',
        '-t',
        os.path.join('.', '_templates'),
        '--force',
        '--no-toc',
        '--separate',
        '-o',
        os.path.join('.', 'API'),
        os.path.join('..', 'src', 'krotov'),
    ])
Ejemplo n.º 10
0
def run_apidoc(app):
    """Generage API documentation"""
    import better_apidoc
    better_apidoc.APP = app
    better_apidoc.main([
        'better-apidoc',
        '-t',
        os.path.join('.', 'source', '_templates'),
        '--force',
        '--no-toc',
        '--separate',
        '-o',
        'source',
        src_path,
    ])
Ejemplo n.º 11
0
def run_apidoc(app):
    """Generage API documentation"""
    import better_apidoc

    better_apidoc.APP = app
    better_apidoc.main([
        "better-apidoc",
        "-t",
        os.path.join(".", "web", "_templates"),
        "--force",
        "--separate",
        "-o",
        os.path.join(".", "web", "api"),
        os.path.join(".", "nltk"),
    ])
Ejemplo n.º 12
0
def run_apidoc(app):
    """Generate API documentation"""

    better_apidoc.APP = app
    better_apidoc.main([
        "better-apidoc",
        "-t",
        os.path.join(".", "templates"),
        "--force",
        "--no-toc",
        "--separate",
        "-o",
        os.path.join(".", "source", "api"),
        midnite_dir,
    ])
Ejemplo n.º 13
0
def run_apidoc(app):
    """Generage API documentation"""
    import better_apidoc

    better_apidoc.APP = app
    better_apidoc.main([
        'better-apidoc',
        '-t',
        str(DOCS / '_templates'),
        '--force',
        '--no-toc',
        '--separate',
        '-o',
        str(DOCS / 'API'),
        os.path.join(DOCS / '..' / 'src' / 'pypkg_bintray_02'),
    ])
Ejemplo n.º 14
0
def run_apidoc(app):
    """Generage API documentation"""
    import better_apidoc

    better_apidoc.APP = app
    better_apidoc.main([
        'better-apidoc',
        '-t',
        str(DOCS_SOURCES / '_templates'),
        '--force',
        '--no-toc',
        '--separate',
        '-o',
        str(DOCS_SOURCES / 'API'),
        os.path.join(ROOT / 'src' / 'qalgebra'),
    ])
Ejemplo n.º 15
0
def run_apidoc(app):
    """Generage API documentation"""
    import better_apidoc

    better_apidoc.APP = app
    better_apidoc.main([
        "better-apidoc",
        # "-t",
        # str(docs / "_templates"),
        "--force",
        "--no-toc",
        "--separate",
        "-o",
        str(DOCS / "api"),
        str(DOCS / ".." / "popsynth"),
    ])
Ejemplo n.º 16
0
def run_apidoc(app):
    """Generage API documentation"""
    import better_apidoc

    better_apidoc.APP = app
    better_apidoc.main([
        "better-apidoc",
        "-t",
        str(DOCS / "_templates"),
        "--force",
        "--no-toc",
        "--separate",
        "-o",
        str(DOCS / "API"),
        str(DOCS / ".." / "src" / "krotov"),
    ])
Ejemplo n.º 17
0
def run_apidoc(app):
    """Generage API documentation"""
    import better_apidoc

    better_apidoc.APP = app
    better_apidoc.main([
        'better-apidoc',
        '-t',
        str(DOCS / '_templates'),
        '--force',
        '--no-toc',
        '--separate',
        '-o',
        str(DOCS / 'API'),
        str(DOCS / '..' / 'src' / 'krotov'),
    ])
Ejemplo n.º 18
0
def run_apidoc(app):
    """Generage API documentation"""
    import better_apidoc

    better_apidoc.APP = app
    better_apidoc.main(
        [
            'better-apidoc',
            '-t',
            os.path.join('.', '_templates'),
            '--force',
            '--no-toc',
            '--separate',
            '-o',
            os.path.join('.', 'API'),
            os.path.join('..', 'src', 'qdyn'),
        ]
    )
Ejemplo n.º 19
0
def run_better_apidoc(app):
    remove_apidoc()

    import better_apidoc

    better_apidoc.APP = app
    args = [
        "better-apidoc",
        "-t",
        apidocs_template_dirpath,
        "--force",
        "--no-toc",
        "--separate",
        "-o",
        apidocs_build_dirpath,
        apidocs_source_dirpath,
    ]
    better_apidoc.main(args)
Ejemplo n.º 20
0
def run_apidoc(app):
    """Generate API documentation"""
    import better_apidoc

    better_apidoc.APP = app
    better_apidoc.main([
        "better-apidoc",
        "-a",
        "-M",
        "-t",
        os.path.join(".", "templates"),
        "--force",
        "--no-toc",
        "--separate",
        "--ext-autodoc",
        "--ext-coverage",
        "-o",
        os.path.join(".", "source", "source_files/"),
        os.path.join("..", "edflow/"),
    ])
Ejemplo n.º 21
0
def run_apidoc(app):
    """Generage API documentation"""
    import better_apidoc
    better_apidoc.APP = app
    file_dir = os.path.abspath(os.path.dirname(__file__))
    better_apidoc.main([
        'better-apidoc',
        '-t', os.path.join(file_dir, '_templates', 'apidoc'),
        '--force',
        '--no-toc',
        '--separate',
        '-o', os.path.join(file_dir, 'api'),
        os.path.abspath(os.path.join(file_dir, '..', 'src', 'spotipie')),
    ])
    # replace the title of the main api file from $(PACKAGE) to $(API_SECTION)
    api_srt_path = os.path.join(file_dir, 'api', 'spotipie.rst')
    with open(api_srt_path) as f:
        lines = f.readlines()
    lines[0] = 'API Reference\n'
    lines[1] = '=' * len(lines[0]) + '\n'
    with open(api_srt_path, 'w') as fout:
        fout.writelines(lines)
Ejemplo n.º 22
0
# serve to show the default.

import sys
import os

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))

import better_apidoc
better_apidoc.main([
    'better_apidoc',
    '-t',
    '_templates',  # path to jinja templates
    '--force',  # overwrite existing files
    '--separate',  # split modules into their own files
    '-o',
    'better_apidoc_out',  #output location
    '../dripline',  #path to modules to doc
])

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    'sphinx.ext.autodoc',
Ejemplo n.º 23
0
Archivo: conf.py Proyecto: nismod/smif
# mock modules which we can avoid installing for docs-building
mock_modules = [
    'dateutil', 'dateutil.parser', 'fiona', 'flask', 'flask.views', 'isodate',
    'minio', 'minio.error', 'networkx', 'numpy', 'pint', 'pyarrow', 'rtree',
    'ruamel.yaml', 'shapely', 'shapely.geometry', 'shapely.validation',
    'pandas', 'pandas.core', 'pandas.core.internals', 'xarray'
]
sys.modules.update((mod_name, Mock()) for mod_name in mock_modules)

output_dir = os.path.join(__location__, "api")
module_dir = os.path.join(__location__, "../src/smif")
templates_dir = os.path.join(__location__, "_templates")

better_apidoc.main([
    'better-apidoc', '-t', templates_dir, '--force', '--separate', '-o',
    output_dir, module_dir
])

# -- General configuration -----------------------------------------------------


# Extra styles, found in _static
def setup(app):
    app.add_stylesheet('theme_tweaks.css')


# If your documentation needs a minimal Sphinx version, state it here.
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
Ejemplo n.º 24
0
def run_apidoc(_):
    """Generage API documentation"""
    import better_apidoc
    better_apidoc.main(
        ['better-apidoc', '-t', './_templates', '--force',
         '--separate', '-o', 'better_apidoc_out', '../morpho'])
Ejemplo n.º 25
0
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    #'sphinx.ext.autodoc',
    'sphinx.ext.todo',
    'sphinx.ext.viewcode',
    #'sphinxcontrib.programoutput',
    #'sphinx.ext.napoleon',
    #'sphinxarg.ext',
]

import better_apidoc
better_apidoc.main([
    'better_apidoc',
    '-t', '_templates', # path to jinja templates for generated package and module rst files
    '--force', # overwrite existing files
    '--separate', # split the modules into their own files
    '-o', 'better_apidoc_out', # output location, be sure to update index.rst if you change this
    '../dripline', # path to the package containing modules to document ##TODO update this with your path
    ])

todo_include_todos = True

#autoclass_content = "both"

# Add any paths that contain templates here, relative to this directory.
#templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'

# The encoding of source files.
Ejemplo n.º 26
0
# ones.
extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.todo',
    'sphinx.ext.viewcode',
    #'sphinxcontrib.programoutput',
    'sphinx.ext.napoleon',
    #'sphinxarg.ext',
]

import better_apidoc
better_apidoc.main([
    'better_apidoc',
    #'-t', '_templates', # path to jinja templates for generated package and module rst files
    '--force',  # overwrite existing files
    '--separate',  # split the modules into their own files
    '-o',
    'better_apidoc_out',  # output location, be sure to update index.rst if you change this
    '../morpho',  # path to the package containing modules to document ##TODO update this with your path
])

todo_include_todos = True

autoclass_content = "both"

# Add any paths that contain templates here, relative to this directory.
#templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'
Ejemplo n.º 27
0
def run_apidoc(_):
    """Generage API documentation"""
    better_apidoc.main([
        'better-apidoc', '-t', './_templates', '--force', '--no-toc',
        '--separate', '-o', './API', '../lightlab'
    ])
Ejemplo n.º 28
0
def run_testdoc(_):
    better_apidoc.main([
        'better-apidoc', '-t', './_templates', '--force', '--no-toc',
        '--separate', '-o', './TestAPI', '../tests'
    ])