Debian Codegraph @

docs/source/conf.py

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 # -*- coding: utf-8 -*-
2 #
3 # klepto documentation build configuration file, created by
4 # sphinx-quickstart on Tue Aug 8 06:50:58 2017.
5 #
6 # This file is execfile()d with the current directory set to its
7 # containing dir.
8 #
9 # Note that not all possible configuration values are present in this
10 # autogenerated file.
11 #
12 # All configuration values have a default; values that are commented out
13 # serve to show the default.
14
15 # If extensions (or modules to document with autodoc) are in another directory,
16 # add these directories to sys.path here. If the directory is relative to the
17 # documentation root, use os.path.abspath to make it absolute, like shown here.
18 #
19 import os
20 from datetime import datetime
21 import sys
22 sys.path.insert(0, os.path.abspath('../..'))
23 # sys.path.insert(0, os.path.abspath('../../scripts'))
24
25 # Import the project
26 import klepto
27
28 # -- General configuration ------------------------------------------------
29
30 # If your documentation needs a minimal Sphinx version, state it here.
31 #
32 # needs_sphinx = '1.0'
33
34 # Add any Sphinx extension module names here, as strings. They can be
35 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
36 # ones.
37 extensions = ['sphinx.ext.autodoc',
38 'sphinx.ext.intersphinx',
39 'sphinx.ext.imgmath',
40 'sphinx.ext.ifconfig',
41 'sphinx.ext.napoleon']
42
43 # Add any paths that contain templates here, relative to this directory.
44 templates_path = ['_templates']
45
46 # The suffix(es) of source filenames.
47 # You can specify multiple suffix as a list of string:
48 #
49 # source_suffix = ['.rst', '.md']
50 source_suffix = '.rst'
51
52 # The master toctree document.
53 master_doc = 'index'
54
55 # General information about the project.
56 project = 'klepto'
57 year = datetime.now().year
58 copyright = '%d, The Uncertainty Quantification Foundation' % year
59 author = 'Mike McKerns'
60
61 # extension config
62 github_project_url = "https://github.com/uqfoundation/klepto"
63 autoclass_content = 'both'
64 autodoc_default_options = {
65 'members': True,
66 'undoc-members': True,
67 'private-members': True,
68 'special-members': True,
69 'show-inheritance': True,
70 'imported-members': True,
71 'exclude-members': (
72 '__dict__,'
73 '__slots__,'
74 '__weakref__,'
75 '__module__,'
76 '_abc_impl,'
77 '__init__,'
78 '__annotations__,'
79 '__dataclass_fields__,'
80 )
81 }
82 autodoc_typehints = 'description'
83 autodoc_typehints_format = 'short'
84 napoleon_include_private_with_doc = False
85 napoleon_include_special_with_doc = True
86 napoleon_use_ivar = True
87 napoleon_use_param = True
88
89 # The version info for the project you're documenting, acts as replacement for
90 # |version| and |release|, also used in various other places throughout the
91 # built documents.
92 #
93 # The short X.Y version.
94 version = klepto.__version__
95 # The full version, including alpha/beta/rc tags.
96 release = version
97
98 # The language for content autogenerated by Sphinx. Refer to documentation
99 # for a list of supported languages.
100 #
101 # This is also used if you do content translation via gettext catalogs.
102 # Usually you set "language" from the command line for these cases.
103 language = 'en'
104
105 # List of patterns, relative to source directory, that match files and
106 # directories to ignore when looking for source files.
107 # This patterns also effect to html_static_path and html_extra_path
108 exclude_patterns = []
109
110 # The name of the Pygments (syntax highlighting) style to use.
111 pygments_style = 'sphinx'
112
113 # If true, `todo` and `todoList` produce output, else they produce nothing.
114 todo_include_todos = False
115
116 # Configure how the modules, functions, etc names look
117 add_module_names = False
118 modindex_common_prefix = ['klepto.']
119
120
121 # -- Options for HTML output ----------------------------------------------
122
123 # on_rtd is whether we are on readthedocs.io
124 on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
125
126 # The theme to use for HTML and HTML Help pages. See the documentation for
127 # a list of builtin themes.
128 #
129 if not on_rtd:
130 html_theme = 'alabaster' #'bizstyle'
131 html_css_files = ['css/custom.css',]
132 #import sphinx_rtd_theme
133 #html_theme = 'sphinx_rtd_theme'
134 #html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
135 else:
136 html_theme = 'sphinx_rtd_theme'
137
138 # Theme options are theme-specific and customize the look and feel of a theme
139 # further. For a list of options available for each theme, see the
140 # documentation.
141 #
142 html_theme_options = {
143 'github_user': 'uqfoundation',
144 'github_repo': 'klepto',
145 'github_button': False,
146 'github_banner': True,
147 'travis_button': True,
148 'codecov_button': True,
149 'donate_url': 'http://uqfoundation.org/pages/donate.html',
150 'gratipay_user': False, # username
151 'extra_nav_links': {'Module Index': 'py-modindex.html'},
152 # 'show_related': True,
153 # 'globaltoc_collapse': True,
154 'globaltoc_maxdepth': 4,
155 'show_powered_by': False
156 }
157
158 # Add any paths that contain custom static files (such as style sheets) here,
159 # relative to this directory. They are copied after the builtin static files,
160 # so a file named "default.css" will overwrite the builtin "default.css".
161 html_static_path = ['_static']
162
163 # Custom sidebar templates, must be a dictionary that maps document names
164 # to template names.
165 #
166 # This is required for the alabaster theme
167 # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
168 if on_rtd:
169 toc_style = 'localtoc.html', # display the toctree
170 else:
171 toc_style = 'globaltoc.html', # collapse the toctree
172 html_sidebars = {
173 '**': [
174 'about.html',
175 'donate.html',
176 'searchbox.html',
177 # 'navigation.html',
178 toc_style, # defined above
179 'relations.html', # needs 'show_related':True option to display
180 ]
181 }
182
183 # -- Options for HTMLHelp output ------------------------------------------
184
185 # Output file base name for HTML help builder.
186 htmlhelp_basename = 'kleptodoc'
187
188 # Logo for sidebar
189 html_logo = 'pathos.png'
190
191
192 # -- Options for LaTeX output ---------------------------------------------
193
194 latex_elements = {
195 # The paper size ('letterpaper' or 'a4paper').
196 #
197 # 'papersize': 'letterpaper',
198
199 # The font size ('10pt', '11pt' or '12pt').
200 #
201 # 'pointsize': '10pt',
202
203 # Additional stuff for the LaTeX preamble.
204 #
205 # 'preamble': '',
206
207 # Latex figure (float) alignment
208 #
209 # 'figure_align': 'htbp',
210 }
211
212 # Grouping the document tree into LaTeX files. List of tuples
213 # (source start file, target name, title,
214 # author, documentclass [howto, manual, or own class]).
215 latex_documents = [
216 (master_doc, 'klepto.tex', 'klepto Documentation',
217 'Mike McKerns', 'manual'),
218 ]
219
220
221 # -- Options for manual page output ---------------------------------------
222
223 # One entry per manual page. List of tuples
224 # (source start file, name, description, authors, manual section).
225 man_pages = [
226 (master_doc, 'klepto', 'klepto Documentation',
227 [author], 1)
228 ]
229
230
231 # -- Options for Texinfo output -------------------------------------------
232
233 # Grouping the document tree into Texinfo files. List of tuples
234 # (source start file, target name, title, author,
235 # dir menu entry, description, category)
236 texinfo_documents = [
237 (master_doc, 'klepto', 'klepto Documentation',
238 author, 'klepto', 'Persistent caching to memory, disk, or database.',
239 'Miscellaneous'),
240 ]
241
242
243
244
245 # Example configuration for intersphinx: refer to the Python standard library.
246 intersphinx_mapping = {
247 'python': ('https://docs.python.org/', None),
248 # 'mystic': ('https://mystic.readthedocs.io/en/latest/', None),
249 # 'pathos': ('https://pathos.readthedocs.io/en/latest/', None),
250 # 'pox': ('https://pox.readthedocs.io/en/latest/', None),
251 # 'dill': ('https://dill.readthedocs.io/en/latest/', None),
252 # 'multiprocess': ('https://multiprocess.readthedocs.io/en/latest/', None),
253 # 'ppft': ('https://ppft.readthedocs.io/en/latest/', None),
254 # 'pyina': ('https://pyina.readthedocs.io/en/latest/', None),
255 }
256