示例#1
0
import sys
import os
import subprocess

sys.path.insert(0, os.path.abspath('.'))
import doc_util

# 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('../../examples/tutorials'))
if not os.path.islink('tutorials_notebooks'):
    os.symlink('../../examples/python/tutorials', 'tutorials_notebooks')

# Create copy of _dynet.pyx for documentation purposes
doc_util.create_doc_copy(in_file='../../python/_dynet.pyx',
                         out_file='dynet.py')
# Run doxygen if on Readthedocs :
on_rtd = os.environ.get('READTHEDOCS') == 'True'
if on_rtd:
    subprocess.call('cd ../doxygen; doxygen', shell=True)

    # -- 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.mathjax',
示例#2
0
文件: conf.py 项目: jayantk/cnn
import sys
import os
import subprocess

sys.path.insert(0, os.path.abspath('.'))
import doc_util

# 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('../../examples/tutorials'))
if not os.path.islink('tutorials_notebooks'):
    os.symlink('../../examples/python/tutorials', 'tutorials_notebooks')

# Create copy of _dynet.pyx for documentation purposes
doc_util.create_doc_copy(in_file = '../../python/_dynet.pyx',out_file = 'dynet.py')
# Run doxygen if on Readthedocs :
on_rtd = os.environ.get('READTHEDOCS') == 'True'
if on_rtd:
    subprocess.call('cd ../doxygen; doxygen', shell=True)

    # -- 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.mathjax',
示例#3
0
# documentation root, use os.path.abspath to make it absolute, like shown here.

import os
import sys
import glob

sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../build/xnmt'))
import doc_util

files = glob.glob('../../xnmt/*.py')
if not os.path.exists('../build/xnmt'):
    os.makedirs('../build/xnmt')
for fname in files:
    doc_util.create_doc_copy(in_file=fname,
                             out_file='../build/xnmt/' +
                             os.path.basename(fname))

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