Example #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'
    ])
Example #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"),
    ])
Example #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"),
    ])
Example #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'
    ])
Example #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)
Example #6
0
def run_apidoc(_):
    """Generate API documentation"""
    import better_apidoc
    better_apidoc.main([
        'better-apidoc', '-t', './_templates', '--force', '-o', './song_match',
        '../song_match'
    ])
Example #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'),
    ])
Example #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)
    ])
Example #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'),
    ])
Example #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,
    ])
Example #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"),
    ])
Example #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,
    ])
Example #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'),
    ])
Example #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'),
    ])
Example #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"),
    ])
Example #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"),
    ])
Example #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'),
    ])
Example #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'),
        ]
    )
Example #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)
Example #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/"),
    ])
Example #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)
Example #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',
Example #23
0
File: conf.py Project: 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.
Example #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'])
Example #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.
Example #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'
Example #27
0
def run_apidoc(_):
    """Generage API documentation"""
    better_apidoc.main([
        'better-apidoc', '-t', './_templates', '--force', '--no-toc',
        '--separate', '-o', './API', '../lightlab'
    ])
Example #28
0
def run_testdoc(_):
    better_apidoc.main([
        'better-apidoc', '-t', './_templates', '--force', '--no-toc',
        '--separate', '-o', './TestAPI', '../tests'
    ])