conf.py 2.85 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
################################################################################
# Copyright 2019 UChicago Argonne, LLC.
# (c.f. AUTHORS, LICENSE)
# 
# This file is part of the AML project.
# For more info, see https://xgitlab.cels.anl.gov/argo/aml
# 
# SPDX-License-Identifier: BSD-3-Clause
################################################################################

# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- Path setup --------------------------------------------------------------

# 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.
#
import os
import sys
import subprocess

27 28 29 30
# Generate doxygen first if in read the docs.
read_the_docs = os.environ.get('READTHEDOCS', None) == 'True'
if read_the_docs:
    subprocess.call('doxygen aml.doxy', shell=True)
31 32
    # Readthedocs doxygen version is too old to copy images when building xml
    subprocess.call('cp img/*png build-doxygen/xml/', shell=True)
33 34 35 36 37 38 39 40 41
 
# -- General configuration ---------------------------------------------------

# The language for content autogenerated by Sphinx.
language = 'C'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
42
extensions = ["breathe"]
43 44 45 46 47 48 49 50 51

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

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

52 53 54 55 56
# ensure that the master file is index.
# mostly needed because the sphinx version on RTD expects a contents.rst
# instead.
master_doc = 'index'

57 58 59 60 61
# -- Project information -----------------------------------------------------

project   = 'AML'
copyright = 'Copyright 2019 UChicago Argonne, LLC'
author    = 'Swann Perarnau, Kamil Iskra, Brian Suchy, Valentin Reis, Nicolas Denoyelle'
62
release   = '0.1.0'
63 64 65 66 67 68

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
#
69 70 71 72
if read_the_docs:
    html_theme = 'default'
else:
    html_theme = "sphinx_rtd_theme"
73 74 75 76 77 78

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []

79 80
breathe_projects = {"aml": "build-doxygen/xml"}
breathe_default_project = "aml"