예제 #1
0
# 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.
#
# assumes pyutilib source is next to the pyomo source directory
sys.path.insert(0, os.path.abspath('../../../pyutilib'))
# top-level pyomo source directory
sys.path.insert(0, os.path.abspath('../..'))

# -- Rebuild SPY files ----------------------------------------------------
sys.path.insert(0, os.path.abspath('tests'))
try:
    print("Regenerating SPY files...")
    from strip_examples import generate_spy_files
    generate_spy_files(os.path.abspath('tests'))
    generate_spy_files(
        os.path.abspath(os.path.join('library_reference', 'kernel',
                                     'examples')))
finally:
    sys.path.pop(0)

# -- Options for intersphinx ---------------------------------------------

intersphinx_mapping = {
    'matplotlib': ('https://matplotlib.org/stable/', None),
    'numpy': ('https://numpy.org/doc/stable/', None),
    'pandas': ('https://pandas.pydata.org/docs/', None),
    'scikit-learn': ('https://scikit-learn.org/stable/', None),
    'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
    'Sphinx': ('https://www.sphinx-doc.org/en/stable/', None),
예제 #2
0
파일: conf.py 프로젝트: ramoneim/pysp
# 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.
#
# assumes pyutilib source is next to the pyomo source directory
sys.path.insert(0, os.path.abspath('../../pyutilib'))
# assumes pyomo source is next to the pyomo source directory
sys.path.insert(0, os.path.abspath('../../pyomo'))
# top-level pysp source directory
sys.path.insert(0, os.path.abspath('..'))

# -- Rebuild SPY files ----------------------------------------------------
sys.path.insert(0, os.path.abspath('tests'))
try:
    print("Regenerating SPY files...")
    from strip_examples import generate_spy_files
    generate_spy_files(os.path.abspath('tests'))
finally:
    sys.path.pop(0)

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

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

# 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.coverage', 'sphinx.ext.mathjax',
    'sphinx.ext.viewcode', 'sphinx.ext.napoleon', 'sphinx.ext.ifconfig',