-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconf.py
158 lines (121 loc) · 3.8 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
# flake8: noqa
# -*- coding: utf-8 -*-
from sphinx.writers import html, html5
import sphinx_compas2_theme
# -- General configuration ------------------------------------------------
project = "COMPAS DR"
copyright = "Block Research Group - ETH Zurich"
package = "compas_dr"
organization = "blockresearchgroup"
master_doc = "index"
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
templates_path = sphinx_compas2_theme.get_autosummary_templates_path()
exclude_patterns = sphinx_compas2_theme.default_exclude_patterns
add_module_names = True
language = "en"
latest_version = sphinx_compas2_theme.get_latest_version()
if latest_version == "Unreleased":
release = "Unreleased"
version = "latest"
else:
release = latest_version
version = ".".join(release.split(".")[0:2]) # type: ignore
# -- Extension configuration ------------------------------------------------
extensions = sphinx_compas2_theme.default_extensions
extensions.remove("sphinx.ext.linkcode")
# numpydoc options
numpydoc_show_class_members = False
numpydoc_class_members_toctree = False
numpydoc_attributes_as_param_list = True
# bibtex options
# autodoc options
autodoc_type_aliases = {
"FloatNx3": "compas_dr.types.FloatNx3",
}
autodoc_typehints_description_target = "documented"
autodoc_mock_imports = sphinx_compas2_theme.default_mock_imports
autodoc_default_options = {
"undoc-members": True,
"show-inheritance": True,
}
autodoc_member_order = "groupwise"
autodoc_typehints = "description"
autodoc_class_signature = "separated"
autoclass_content = "class"
def setup(app):
app.connect("autodoc-skip-member", sphinx_compas2_theme.skip)
# autosummary options
autosummary_generate = True
autosummary_mock_imports = sphinx_compas2_theme.default_mock_imports
# graph options
# plot options
# intersphinx options
intersphinx_mapping = {
"python": ("https://docs.python.org/", None),
"compas": ("https://compas.dev/compas/latest/", None),
}
# linkcode
# linkcode_resolve = sphinx_compas2_theme.get_linkcode_resolve(organization, package)
# extlinks
extlinks = {}
# from pytorch
sphinx_compas2_theme.replace(html.HTMLTranslator)
sphinx_compas2_theme.replace(html5.HTML5Translator)
# -- Options for HTML output ----------------------------------------------
html_theme = "sidebaronly"
html_title = project
favicons = [
{
"rel": "icon",
"href": "compas.ico",
}
]
html_theme_options = {
"icon_links": [
{
"name": "GitHub",
"url": f"https://github.com/{organization}/{package}",
"icon": "fa-brands fa-github",
"type": "fontawesome",
},
{
"name": "Discourse",
"url": "http://forum.compas-framework.org/",
"icon": "fa-brands fa-discourse",
"type": "fontawesome",
},
{
"name": "PyPI",
"url": f"https://pypi.org/project/{package}/",
"icon": "fa-brands fa-python",
"type": "fontawesome",
},
],
"switcher": {
"json_url": f"https://raw.githubusercontent.com/{organization}/{package}/gh-pages/versions.json",
"version_match": version,
},
"check_switcher": False,
"logo": {
"image_light": "_static/compas_icon_white.png",
"image_dark": "_static/compas_icon_white.png",
"text": project,
},
"navigation_depth": 3,
}
html_context = {
"github_url": "https://github.com",
"github_user": organization,
"github_repo": package,
"github_version": "main",
"doc_path": "docs",
}
html_static_path = sphinx_compas2_theme.get_html_static_path() + ["_static"]
html_css_files = []
html_extra_path = []
html_last_updated_fmt = ""
html_copy_source = False
html_show_sourcelink = True
html_permalinks = False
html_permalinks_icon = ""
html_compact_lists = True