-
Notifications
You must be signed in to change notification settings - Fork 0
/
conf.py
209 lines (168 loc) · 6.79 KB
/
conf.py
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# Configuration file for the Sphinx documentation builder.
# -- Path setup --------------------------------------------------------------
import os
import sys
import glob
try:
import sansmic
version = os.environ.get("SANSMIC_SPHINX_VERSION", sansmic.__version__)
except ImportError:
doxygen_installed = False
extensions = []
##############################################################################
# Sphinx core options #
##############################################################################
# -- Project information -----------------------------------------------------
project = "sansmic"
copyright = "2024 National Technology and Engineering Solutions of Sandia, LLC. Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software."
author = "See AUTHORS.md"
if version.startswith("v"):
version = version[1:]
release = "v" + version
else:
release = version
ga_token = os.environ.get("GOOGLE_ANALYTICS_TOKEN", "G-23TNKN36XM")
extensions.extend(
[
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
"sphinx.ext.githubpages",
"sphinx_design",
"sphinx_click" if not version.startswith("1.0.0") else "sphinxarg.ext",
"sphinxcontrib.bibtex",
"nbsphinx",
]
)
# -- Callout numbering -------------------------------------------------------
numfig = True
numfig_format = {"figure": "Figure %s", "table": "Table %s", "code-block": "Listing %s"}
# -- Internationalization ----------------------------------------------------
language = "en"
# -- Markup options ----------------------------------------------------------
# -- Options for Maths -------------------------------------------------------
# -- Options for object signatures
add_function_parentheses = True
toc_object_entries = True
toc_object_entries_show_parents = "hide"
# -- Options for source files ------------------------------------------------
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "doxygen"]
# The master toctree document.
master_doc = "index"
# source_suffix = ['.rst', '.md']
source_suffix = {".rst": "restructuredtext"}
# -- Options for templating --------------------------------------------------
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
##############################################################################
# Sphinx domain options #
##############################################################################
# -- Options for the Python domain -------------------------------------------
add_module_names = False
python_display_short_literal_types = True
python_use_unqualified_type_names = True
##############################################################################
# Sphinx extension options #
##############################################################################
# -- sphinx-bibtex (references) ----------------------------------------------
bibtex_bibfiles = ["references.bib"]
bibtex_default_style = "plain"
bibtex_reference_style = "label"
# -- Docstring parsing (napoleon)---------------------------------------------
napoleon_google_docstring = True
napoleon_numpy_docstring = True
napoleon_include_init_with_doc = True
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = False
napoleon_use_admonition_for_examples = False
napoleon_use_admonition_for_notes = False
napoleon_use_admonition_for_references = True
napoleon_preprocess_types = False
napoleon_use_ivar = True
napoleon_use_param = True
napoleon_use_rtype = True
napoleon_use_keyword = False
# -- Autodoc & autosummary ---------------------------------------------------
autodoc_default_options = {
"members": True,
"undoc-members": True,
"private-members": False,
"special-members": "__call__", #', __enter__, __iter__, __next__',
"inherited-members": False,
"show-inheritance": False,
"member-order": "groupwise",
}
autodoc_typehints = "description"
autodoc_typehints_format = "short"
autodoc_typehints_description_target = "documented"
autodoc_type_aliases = {
"DataFrame": "pandas.DataFrame",
}
autoclass_content = "both"
autosummary_generate = glob.glob("*.rst")
autosummary_generate_overwrite = True
##############################################################################
# Builder options #
##############################################################################
# -- Options for HTML output -------------------------------------------------
html_theme = "pydata_sphinx_theme"
html_static_path = ["_static"]
html_title = "Sansmic Examples"
html_js_files = [
"pypi-icon.js",
]
# html_sidebars = {"nomenclature": []}
html_theme_options = {
"icon_links": [
{
"name": "Issues",
"url": "https://github.com/sandialabs/sansmic/issues",
"type": "fontawesome",
"icon": "fa-regular fa-circle-dot",
},
{
"name": "GitHub", # Label for this link
"url": "https://github.com/sandialabs/sansmic", # required URL where the link will redirect
"type": "fontawesome", # The type of image to be used
"icon": "fa-brands fa-github", # Icon class (if "type": "fontawesome"), or path to local image (if "type": "local")
},
{
"name": "PyPI", # Label for this link
"url": "https://pypi.org/project/sansmic/", # required URL where the link will redirect
"type": "fontawesome", # The type of image to be used
"icon": "fa-custom fa-pypi", # Icon class (if "type": "fontawesome"), or path to local image (if "type": "local")
},
{
"name": "Sandia National Laboratories",
"url": "https://www.sandia.gov", # required
"type": "local",
"icon": "_static/snl_logo.png",
},
],
"navigation_with_keys": False,
"use_edit_page_button": False,
"primary_sidebar_end": ["indices.html"],
"show_toc_level": 2,
"navbar_start": [
"navbar-logo",
],
"navbar_end": [
"theme-switcher",
"navbar-icon-links",
],
"secondary_sidebar_items": {
"**": ["page-toc", "sourcelink"],
"examples/**": [],
},
"analytics": {"google_analytics_id": ga_token},
}
nbsphinx_thumbnails = {
"basic-example/basic": "/_static/basic-thumbnail.png",
}