-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconf.py
154 lines (142 loc) · 5.35 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
import os
import sys
from sphinx_runpython.github_link import make_linkcode_resolve
from sphinx_runpython.conf_helper import has_dvipng, has_dvisvgm
from onnx_array_api import __version__
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.githubpages",
"sphinx.ext.ifconfig",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.todo",
"sphinx_gallery.gen_gallery",
"sphinx_issues",
"matplotlib.sphinxext.plot_directive",
"sphinx_runpython.epkg",
"sphinx_runpython.gdot",
"sphinx_runpython.runpython",
]
if has_dvisvgm():
extensions.append("sphinx.ext.imgmath")
imgmath_image_format = "svg"
elif has_dvipng():
extensions.append("sphinx.ext.pngmath")
imgmath_image_format = "png"
else:
extensions.append("sphinx.ext.mathjax")
templates_path = ["_templates"]
html_logo = "_static/logo.png"
source_suffix = ".rst"
master_doc = "index"
project = "onnx-array-api"
copyright = "2023-2024, Xavier Dupré"
author = "Xavier Dupré"
version = __version__
release = __version__
language = "en"
exclude_patterns = []
pygments_style = "sphinx"
todo_include_todos = True
html_theme = "furo"
html_theme_path = ["_static"]
html_theme_options = {}
html_static_path = ["_static"]
html_sourcelink_suffix = ""
issues_github_path = "sdpython/onnx-array-api"
# The following is used by sphinx.ext.linkcode to provide links to github
linkcode_resolve = make_linkcode_resolve(
"onnx-array-api",
(
"https://github.com/sdpython/onnx-array-api/"
"blob/{revision}/{package}/"
"{path}#L{lineno}"
),
)
latex_elements = {
"papersize": "a4",
"pointsize": "10pt",
"title": project,
}
intersphinx_mapping = {
"matplotlib": ("https://matplotlib.org/", None),
"numpy": ("https://numpy.org/doc/stable", None),
"onnx": ("https://onnx.ai/onnx/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"python": (f"https://docs.python.org/{sys.version_info.major}", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
"sklearn": ("https://scikit-learn.org/stable/", None),
"sklearn-onnx": ("https://onnx.ai/sklearn-onnx/", None),
"torch": ("https://pytorch.org/docs/stable/", None),
}
# Check intersphinx reference targets exist
nitpicky = True
# See also scikit-learn/scikit-learn#26761
nitpick_ignore = [
("py:class", "False"),
("py:class", "True"),
("py:class", "pipeline.Pipeline"),
("py:class", "default=sklearn.utils.metadata_routing.UNCHANGED"),
]
nitpick_ignore_regex = [
("py:func", ".*numpy[.].*"),
("py:func", ".*scipy[.].*"),
("py:class", ".*onnxruntime[.].*"),
("py:class", ".*onnx_array_api.npx.npx_types.OptParTypeTupleType_.*"),
("py:class", ".*onnx_array_api.npx.npx_types.ParType[a-z].*"),
("py:class", ".*onnx_array_api.npx.npx_types.OptTensorType_.*"),
("py:class", ".*onnx_array_api.npx.npx_types.TensorType_.*"),
("py:class", ".*onnx_array_api.npx.npx_types.[ui].*"),
]
sphinx_gallery_conf = {
# path to your examples scripts
"examples_dirs": os.path.join(os.path.dirname(__file__), "examples"),
# path where to save gallery generated examples
"gallery_dirs": "auto_examples",
}
epkg_dictionary = {
"Array API": "https://data-apis.org/array-api/",
"ArrayAPI": (
"https://data-apis.org/array-api/",
("2022.12/API_specification/generated/array_api.{0}.html", 1),
),
"ast": "https://docs.python.org/3/library/ast.html",
"cProfile.Profile": "https://docs.python.org/3/library/profile.html#profile.Profile",
"DOT": "https://graphviz.org/doc/info/lang.html",
"Graphviz": "https://graphviz.org/",
"inner API": "https://onnx.ai/onnx/intro/python.html",
"JIT": "https://en.wikipedia.org/wiki/Just-in-time_compilation",
"onnx": "https://onnx.ai/onnx/",
"onnx-graphsurgeon": "https://github.com/NVIDIA/TensorRT/tree/main/tools/onnx-graphsurgeon",
"onnx.helper": "https://onnx.ai/onnx/api/helper.html",
"ONNX": "https://onnx.ai/",
"ONNX Operators": "https://onnx.ai/onnx/operators/",
"onnxruntime": "https://onnxruntime.ai/",
"onnxruntime-training": "https://onnxruntime.ai/docs/get-started/training-on-device.html",
"numpy": "https://numpy.org/",
"numba": "https://numba.pydata.org/",
"onnx-array-api": ("https://sdpython.github.io/doc/onnx-array-api/dev/"),
"onnxscript": "https://github.com/microsoft/onnxscript",
"pyinstrument": "https://github.com/joerick/pyinstrument",
"python": "https://www.python.org/",
"pytorch": "https://pytorch.org/",
"reverse Polish notation": "https://en.wikipedia.org/wiki/Reverse_Polish_notation",
"scikit-learn": "https://scikit-learn.org/stable/",
"scipy": "https://scipy.org/",
"sklearn-onnx": "https://onnx.ai/sklearn-onnx/",
"spox": "https://github.com/Quantco/spox",
"sphinx-gallery": "https://github.com/sphinx-gallery/sphinx-gallery",
"tensorflow": "https://www.tensorflow.org/",
"tensorflow-onnx": "https://github.com/onnx/tensorflow-onnx",
"torch": "https://pytorch.org/docs/stable/torch.html",
"torch.onnx": "https://pytorch.org/docs/stable/onnx.html",
#
"C_OrtValue": (
"https://onnxruntime.ai/docs/api/csharp/api/Microsoft.ML.OnnxRuntime.OrtValue.html"
),
"OrtValue": (
"https://onnxruntime.ai/docs/api/python/api_summary.html#onnxruntime.OrtValue"
),
}