Diff of /docs/source/conf.py [000000] .. [030aeb]

Switch to unified view

a b/docs/source/conf.py
1
# Configuration file for the Sphinx documentation builder.
2
#
3
# This file only contains a selection of the most common options. For a full
4
# list see the documentation:
5
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6
7
# -- Path setup --------------------------------------------------------------
8
9
# If extensions (or modules to document with autodoc) are in another directory,
10
# add these directories to sys.path here. If the directory is relative to the
11
# documentation root, use os.path.abspath to make it absolute, like shown here.
12
#
13
import os
14
import sys
15
16
sys.path.insert(0, os.path.abspath("../.."))
17
18
19
def get_version():
20
    init_py_path = os.path.join(
21
        os.path.abspath(os.path.dirname(__file__)), "../../dosma", "__init__.py"
22
    )
23
    init_py = open(init_py_path, "r").readlines()
24
    version_line = [l.strip() for l in init_py if l.startswith("__version__")][0]  # noqa: E741
25
    version = version_line.split("=")[-1].strip().strip("'\"")
26
    return version
27
28
29
# -- Project information -----------------------------------------------------
30
31
project = "dosma"
32
copyright = "2019-2021, Arjun Desai"
33
author = "Arjun Desai"
34
35
# The full version, including alpha/beta/rc tags
36
# release = setup.get_version(ignore_nightly=True)
37
release = get_version()
38
39
# -- General configuration ---------------------------------------------------
40
41
# Add any Sphinx extension module names here, as strings. They can be
42
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
43
# ones.
44
extensions = [
45
    "sphinx.ext.autodoc",
46
    "sphinx.ext.autosummary",
47
    "sphinx.ext.intersphinx",
48
    "sphinx.ext.todo",
49
    "sphinx.ext.coverage",
50
    "sphinx.ext.mathjax",
51
    "sphinx.ext.ifconfig",
52
    "sphinx.ext.viewcode",
53
    "sphinx.ext.githubpages",
54
    "sphinx.ext.napoleon",
55
    "sphinxcontrib.bibtex",
56
    "sphinx_rtd_theme",
57
    "sphinx.ext.githubpages",
58
    "m2r2",
59
]
60
autosummary_generate = True
61
autosummary_imported_members = True
62
63
# Bibtex files
64
bibtex_bibfiles = ["references.bib"]
65
66
# Add any paths that contain templates here, relative to this directory.
67
templates_path = ["_templates"]
68
69
# List of patterns, relative to source directory, that match files and
70
# directories to ignore when looking for source files.
71
# This pattern also affects html_static_path and html_extra_path.
72
exclude_patterns = []
73
74
# The name of the Pygments (syntax highlighting) style to use.
75
pygments_style = "sphinx"
76
77
# -- Options for HTML output -------------------------------------------------
78
79
# The theme to use for HTML and HTML Help pages.  See the documentation for
80
# a list of builtin themes.
81
#
82
# html_theme = 'alabaster'
83
# html_theme = 'bootstrap'
84
# html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
85
html_theme = "sphinx_rtd_theme"
86
87
# -- Options for HTMLHelp output ---------------------------------------------
88
89
# Output file base name for HTML help builder.
90
htmlhelp_basename = "DOSMAdoc"
91
92
# Add any paths that contain custom static files (such as style sheets) here,
93
# relative to this directory. They are copied after the builtin static files,
94
# so a file named "default.css" will overwrite the builtin "default.css".
95
html_static_path = ["_static"]
96
97
# Intersphinx mappings
98
intersphinx_mapping = {"numpy": ("https://numpy.org/doc/stable/", None)}
99
100
# Theme options are theme-specific and customize the look and feel of a theme
101
# further.  For a list of options available for each theme, see the
102
# documentation.
103
#
104
html_theme_options = {"navigation_depth": 2}
105
106
# Source Files
107
source_suffix = [".rst", ".md"]
108
109
# Documentation to include
110
todo_include_todos = True
111
napoleon_use_ivar = True
112
napoleon_google_docstring = True
113
html_show_sourcelink = False