コード例 #1
0
ファイル: conf.py プロジェクト: TracyHe/fuel-devops
import sys

# 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('.'))
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('../../'))

from sphinx.apidoc import main as sphinx_apidoc_main
import shutil

shutil.rmtree('modules', ignore_errors=True)
sphinx_apidoc_main([
    '',
    '-o',
    'modules',
    '../../devops'
])

# -- 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', 'sphinx.ext.viewcode']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
コード例 #2
0
import os
import sys

# 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('.'))
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('../../'))

from sphinx.apidoc import main as sphinx_apidoc_main
import shutil

shutil.rmtree('modules', ignore_errors=True)
sphinx_apidoc_main(['', '-o', 'modules', '../../devops'])

# -- 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', 'sphinx.ext.viewcode']

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

# The suffix of source filenames.
コード例 #3
0
ファイル: conf.py プロジェクト: chekolyn/fuel-devops
import glob
from sphinx.apidoc import main as sphinx_apidoc_main


# remove autogenerated rst files
for f in glob.glob('modules/*.rst'):
    os.remove(f)

# generate docs
sphinx_apidoc_main([
    '',
    # output dir
    '-o', 'modules',
    # source dir
    '../../devops',
    # exclude dirs
    '../../devops/settings.py',
    '../../devops/test_settings.py',
    '../../devops/migrations/',
    '../../devops/tests/',
    '../../devops/templates/',
])

# -- 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.