-
-
Notifications
You must be signed in to change notification settings - Fork 119
Expand file tree
/
Copy pathconf.py
More file actions
302 lines (271 loc) · 12.2 KB
/
conf.py
File metadata and controls
302 lines (271 loc) · 12.2 KB
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
import os
import sys
# To include the local extension.
sys.path.insert(0, os.path.abspath('_ext'))
import os
import param
import pydata_sphinx_theme
param.parameterized.docstring_signature = False
param.parameterized.docstring_describe_params = False
import hvplot # noqa
from nbsite.shared_conf import * # noqa
project = 'hvPlot'
authors = 'HoloViz developers'
copyright_years['start_year'] = '2016' # noqa
copyright = copyright_fmt.format(**copyright_years) # noqa
description = 'A high-level plotting API for the PyData ecosystem built on HoloViews'
version = release = base_version(hvplot.__version__) # noqa
nbbuild_cell_timeout = 600
# Useful for SEO on a versioned site
html_baseurl = 'https://hvplot.holoviz.org/en/docs/latest/'
exclude_patterns = ['governance']
html_static_path += ['_static'] # noqa
if pydata_sphinx_theme.__version__ == '0.16.1':
# See https://github.com/pydata/pydata-sphinx-theme/issues/2088
templates_path.append('_static/patch_templates') # noqa
html_css_files += ['custom.css'] # noqa
html_js_files = [
'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js',
]
switcher_version = (
os.getenv('VERSION') or 'dev'
if any(pr in hvplot.__version__ for pr in ('a', 'b', 'rc', 'dev'))
else version
)
html_theme_options.update( # noqa
{
'navbar_start': ['navbar-logo', 'version-switcher'],
'use_edit_page_button': True,
'github_url': 'https://github.com/holoviz/hvplot',
'icon_links': [
{
'name': 'Twitter',
'url': 'https://twitter.com/HoloViews',
'icon': 'fa-brands fa-twitter-square',
},
{
'name': 'Discourse',
'url': 'https://discourse.holoviz.org/c/hvplot',
'icon': 'fa-brands fa-discourse',
},
{
'name': 'Discord',
'url': 'https://discord.gg/AXRHnJU6sP',
'icon': 'fa-brands fa-discord',
},
],
'pygments_dark_style': 'material',
'announcement': "hvPlot 0.12 has just been released! Checkout the <a href='https://blog.holoviz.org/posts/hvplot_release_0.12/'>blog post</a> and support hvPlot by giving it a 🌟 on <a href='https://github.com/holoviz/hvplot'>Github</a>.",
'switcher': {
'json_url': 'https://hvplot.holoviz.org/switcher.json',
'version_match': switcher_version,
},
'show_version_warning_banner': True,
}
)
# Without this .txt is appended to the files
html_sourcelink_suffix = ''
html_theme = 'pydata_sphinx_theme'
html_logo = '_static/logo_horizontal.svg'
html_favicon = '_static/favicon.ico'
extensions += [ # noqa
'sphinx.ext.autosummary',
'nbsite.gallery',
'nbsite.analytics',
'nbsite.nb_interactivity_warning',
'sphinx_copybutton',
'sphinxext.rediraffe',
'numpydoc',
'sphinxcontrib.mermaid',
'sphinx.ext.intersphinx',
# Custom extensions
'backend_styling_options',
'plotting_options_table',
]
myst_enable_extensions = [
# To also use ::: delimiters to denote directives, instead of ```.
'colon_fence',
# MySt-Parser will attempt to convert any isolated img tags (i.e. not
# wrapped in any other HTML) to the internal representation used in sphinx.
'html_image',
]
nbsite_gallery_conf = {
'github_org': 'holoviz',
'github_project': 'hvplot',
'examples_dir': '.',
'galleries': {
'gallery': {
'title': 'Gallery',
'intro': (
'Explore a curated set of example visualizations using hvPlot '
'with different backends and datasets. For more examples using '
'hvPlot and other HoloViz tools to solve real world problems, '
'see the '
'`HoloViz Examples website <https://examples.holoviz.org>`_.'
),
'sections': [
{
'path': 'basic-charts',
'title': 'Basic Charts',
},
'categorical',
'multidimensional',
'statistical',
{
'path': 'time-series',
'title': 'Time Series',
},
'geospatial',
'gridded',
{
'path': 'big-data',
'title': 'Big Data',
},
'interactivity',
'annotations',
],
'skip_rst_notebook_directive': True,
'no_image_thumb': True,
'titles_from_files': True,
'card_title_below': True,
}
},
'thumbnail_url': 'https://assets.holoviz.org/hvplot/thumbnails',
}
nbsite_analytics = {
'goatcounter_holoviz': True,
}
rediraffe_redirects = {
# Removal of the developer testing page
'developer_guide/testing': 'developer_guide',
# Removal of the developer_guide folder
'developer_guide/index': 'developer_guide',
# Redirecting removed "getting started" pages to the new location
'getting_started/index': 'tutorials/index',
'getting_started/explorer': 'tutorials/getting_started',
'getting_started/hvplot': 'tutorials/getting_started',
'getting_started/installation': 'tutorials/getting_started',
'getting_started/interactive': 'tutorials/getting_started',
# Integrations user guide moved to the reference
'user_guide/integrations': 'ref/data_libraries',
# Customizations user guide moved to the reference
'user_guide/Customization': 'ref/plotting_options/index',
# Pandas API viz user guide moved to the reference
'user_guide/pandas_api': 'ref/api_compatibility/pandas/Pandas_API',
}
html_extra_path = ['topics.html']
html_context.update( # noqa
{
'last_release': f'v{release}',
'default_mode': 'light',
# Useful for the edit button
'github_user': 'holoviz',
'github_repo': 'hvplot',
'github_version': 'main',
'doc_path': 'doc',
}
)
# linkcheck
linkcheck_ignore = [r'https://github.com/holoviz/hvplot/pull/\d+']
# mystnb
nb_execution_excludepatterns = [
'user_guide/Streaming.ipynb',
]
# cell execution timeout in seconds (-1 to ignore, 30 by default)
nb_execution_timeout = 240
if os.getenv('HVPLOT_GALLERY') not in ('False', 'false', '0'):
rediraffe_redirects.update(
{
# When the old reference gallery was removed
'reference/tabular/andrewscurves': 'ref/api/manual/hvplot.plotting.andrews_curves',
'reference/tabular/area': 'ref/api/manual/hvplot.hvPlot.area',
'reference/tabular/bar': 'ref/api/manual/hvplot.hvPlot.bar',
'reference/tabular/barh': 'ref/api/manual/hvplot.hvPlot.barh',
'reference/tabular/bivariate': 'ref/api/manual/hvplot.hvPlot.bivariate',
'reference/tabular/box': 'ref/api/manual/hvplot.hvPlot.box',
'reference/tabular/errorbars': 'ref/api/manual/hvplot.hvPlot.errorbars',
'reference/tabular/heatmap': 'ref/api/manual/hvplot.hvPlot.heatmap',
'reference/tabular/hexbin': 'ref/api/manual/hvplot.hvPlot.hexbin',
'reference/tabular/hist': 'ref/api/manual/hvplot.hvPlot.hist',
'reference/tabular/kde': 'ref/api/manual/hvplot.hvPlot.kde',
'reference/tabular/labels': 'ref/api/manual/hvplot.hvPlot.labels',
'reference/tabular/lagplot': 'ref/api/manual/hvplot.plotting.lag_plot',
'reference/tabular/line': 'ref/api/manual/hvplot.hvPlot.line',
'reference/tabular/ohlc': 'ref/api/manual/hvplot.hvPlot.ohlc',
'reference/tabular/parallelcoordinates': 'ref/api/manual/hvplot.plotting.parallel_coordinates',
'reference/tabular/scatter': 'ref/api/manual/hvplot.hvPlot.scatter',
'reference/tabular/scattermatrix': 'ref/api/manual/hvplot.plotting.scatter_matrix',
'reference/tabular/step': 'ref/api/manual/hvplot.hvPlot.step',
'reference/tabular/table': 'ref/api/manual/hvplot.hvPlot.table',
'reference/tabular/violin': 'ref/api/manual/hvplot.hvPlot.violin',
'reference/geopandas/points': 'ref/api/manual/hvplot.hvPlot.points',
'reference/geopandas/polygons': 'ref/api/manual/hvplot.hvPlot.polygons',
'reference/xarray/bar': 'ref/api/manual/hvplot.hvPlot.bar',
'reference/xarray/contour': 'ref/api/manual/hvplot.hvPlot.contour',
'reference/xarray/contourf': 'ref/api/manual/hvplot.hvPlot.contourf',
'reference/xarray/hist': 'ref/api/manual/hvplot.hvPlot.hist',
'reference/xarray/image': 'ref/api/manual/hvplot.hvPlot.image',
'reference/xarray/kde': 'ref/api/manual/hvplot.hvPlot.kde',
'reference/xarray/line': 'ref/api/manual/hvplot.hvPlot.line',
'reference/xarray/quadmesh': 'ref/api/manual/hvplot.hvPlot.quadmesh',
'reference/xarray/rgb': 'ref/api/manual/hvplot.hvPlot.rgb',
'reference/xarray/barbs': 'ref/api/manual/hvplot.hvPlot.barbs',
'reference/xarray/vectorfield': 'ref/api/manual/hvplot.hvPlot.vectorfield',
'reference/xarray/violin': 'ref/api/manual/hvplot.hvPlot.violin',
# When the pandas section was renamed tabular:
'reference/pandas/andrewscurves': 'reference/tabular/andrewscurves',
'reference/pandas/area': 'reference/tabular/area',
'reference/pandas/bar': 'reference/tabular/bar',
'reference/pandas/barh': 'reference/tabular/barh',
'reference/pandas/bivariate': 'reference/tabular/bivariate',
'reference/pandas/box': 'reference/tabular/box',
'reference/pandas/errorbars': 'reference/tabular/errorbars',
'reference/pandas/heatmap': 'reference/tabular/heatmap',
'reference/pandas/hexbin': 'reference/tabular/hexbin',
'reference/pandas/hist': 'reference/tabular/hist',
'reference/pandas/kde': 'reference/tabular/kde',
'reference/pandas/labels': 'reference/tabular/labels',
'reference/pandas/lagplot': 'reference/tabular/lagplot',
'reference/pandas/line': 'reference/tabular/line',
'reference/pandas/ohlc': 'reference/tabular/ohlc',
'reference/pandas/parallelcoordinates': 'reference/tabular/parallelcoordinates',
'reference/pandas/scatter': 'reference/tabular/scatter',
'reference/pandas/scattermatrix': 'reference/tabular/scattermatrix',
'reference/pandas/step': 'reference/tabular/step',
'reference/pandas/table': 'reference/tabular/table',
'reference/pandas/violin': 'reference/tabular/violin',
}
)
else:
if 'nbsite.gallery' in extensions:
extensions.remove('nbsite.gallery')
exclude_patterns.append('gallery')
nb_execution_excludepatterns.append('gallery/**/*.ipynb')
if os.getenv('HVPLOT_EXECUTE_NBS_USER_GUIDE') in ('False', 'false', '0'):
nb_execution_excludepatterns.append('user_guide/**/*.ipynb')
if os.getenv('HVPLOT_EXECUTE_NBS_TUTORIALS') in ('False', 'false', '0'):
nb_execution_excludepatterns.append('tutorials/**/*.ipynb')
if os.getenv('HVPLOT_EXECUTE_NBS') in ('False', 'false', '0'):
nb_execution_mode = 'off'
# We replace the automatically generated stub files by notebooks
# that include the API ref and some examples.
autosummary_generate = True
# autosummary_generate_overwrite = False
intersphinx_mapping = {
'cartopy': ('https://cartopy.readthedocs.io/stable/', None),
'holoviews': ('https://holoviews.org/', None),
'pandas': (
'https://pandas.pydata.org/pandas-docs/stable/',
'https://pandas.pydata.org/pandas-docs/stable/objects.inv',
),
'panel': ('https://panel.holoviz.org/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'xarray': ('https://docs.xarray.dev/en/stable/', None),
'pyproj': ('https://pyproj4.github.io/pyproj/stable/', None),
}
# To avoid this warning
# hvplot/ui.py:docstring of hvplot.ui.hvPlotExplorer:43: WARNING: autosummary: stub file not found 'hvplot.ui.hvPlotExplorer.hvplot'. Check your autosummary_generate setting.
# See https://stackoverflow.com/a/73294408
numpydoc_class_members_toctree = False
numpydoc_show_inherited_class_members = False
numpydoc_class_members_toctree = False