Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
python-visualization
GitHub Repository: python-visualization/folium
Path: blob/main/docs/conf.py
1593 views
1
# Folium documentation build configuration file, created by
2
# sphinx-quickstart on Sun May 19 19:39:34 2013.
3
#
4
# This file is execfile()d with the current directory set to its containing dir.
5
#
6
# Note that not all possible configuration values are present in this
7
# autogenerated file.
8
#
9
# All configuration values have a default; values that are commented out
10
# serve to show the default.
11
12
import os
13
import sys
14
15
# Use the currently checked out folium of this folder
16
sys.path.insert(0, os.path.abspath(os.pardir))
17
18
# If extensions (or modules to document with autodoc) are in another directory,
19
# add these directories to sys.path here. If the directory is relative to the
20
# documentation root, use os.path.abspath to make it absolute, like shown here.
21
# sys.path.insert(0, os.path.abspath('.'))
22
23
# -- General configuration -----------------------------------------------------
24
25
# If your documentation needs a minimal Sphinx version, state it here.
26
# needs_sphinx = '1.0'
27
28
# Add any Sphinx extension module names here, as strings. They can be extensions
29
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
30
extensions = [
31
"sphinx.ext.autodoc",
32
"sphinx.ext.napoleon",
33
"nbsphinx",
34
"sphinx.ext.intersphinx",
35
]
36
37
# Add any paths that contain templates here, relative to this directory.
38
templates_path = ["_templates"]
39
40
# The suffix of source filenames.
41
source_suffix = ".rst"
42
43
# The encoding of source files.
44
# source_encoding = 'utf-8-sig'
45
46
# The master toctree document.
47
master_doc = "index"
48
49
# General information about the project.
50
import datetime
51
52
year = datetime.datetime.now(tz=datetime.timezone.utc).date().year
53
project = "Folium"
54
copyright = f"2013-{year}, Rob Story"
55
56
# The version info for the project you're documenting, acts as replacement for
57
# |version| and |release|, also used in various other places throughout the
58
# built documents.
59
60
import folium
61
62
# N.B. this version is without the "v" prefix
63
version = release = folium.__version__
64
print(f"Version: {version}")
65
66
# The language for content autogenerated by Sphinx. Refer to documentation
67
# for a list of supported languages.
68
# language = None
69
70
# There are two options for replacing |today|: either, you set today to some
71
# non-false value, then it is used:
72
# today = ''
73
# Else, today_fmt is used as the format for a strftime call.
74
# today_fmt = '%B %d, %Y'
75
76
# List of patterns, relative to source directory, that match files and
77
# directories to ignore when looking for source files.
78
exclude_patterns = ["_build"]
79
80
# The reST default role (used for this markup: `text`) to use for all documents.
81
# default_role = None
82
83
# If true, '()' will be appended to :func: etc. cross-reference text.
84
# add_function_parentheses = True
85
86
# If true, the current module name will be prepended to all description
87
# unit titles (such as .. function::).
88
# add_module_names = True
89
90
# If true, sectionauthor and moduleauthor directives will be shown in the
91
# output. They are ignored by default.
92
# show_authors = False
93
94
# The name of the Pygments (syntax highlighting) style to use.
95
pygments_style = "sphinx"
96
97
# A list of ignored prefixes for module index sorting.
98
# modindex_common_prefix = []
99
100
101
# -- Options for HTML output ---------------------------------------------------
102
103
# The theme to use for HTML and HTML Help pages. See the documentation for
104
# a list of builtin themes.
105
html_theme = "pydata_sphinx_theme"
106
107
# Theme options are theme-specific and customize the look and feel of a theme
108
# further. For a list of options available for each theme, see the
109
# documentation.
110
html_theme_options = {
111
"switcher": {
112
"json_url": "https://python-visualization.github.io/folium/dev/_static/switcher.json",
113
"version_match": "dev" if ".dev" in version else version,
114
},
115
"navbar_start": ["navbar-logo", "version-switcher"],
116
"footer_start": ["version", "copyright", "sphinx-version", "theme-version"],
117
"icon_links": [
118
{
119
"name": "GitHub",
120
"url": "https://github.com/python-visualization/folium",
121
"icon": "fa-brands fa-square-github",
122
"type": "fontawesome",
123
}
124
],
125
"logo": {
126
"text": "Folium",
127
},
128
}
129
130
# Add any paths that contain custom themes here, relative to this directory.
131
# html_theme_path = ["_themes"]
132
133
# The name for this set of Sphinx documents. If None, it defaults to
134
# "<project> v<release> documentation".
135
# html_title = "Folium documentation"
136
137
# A shorter title for the navigation bar. Default is the same as html_title.
138
# html_short_title = None
139
140
# The name of an image file (relative to this directory) to place at the top
141
# of the sidebar.
142
html_logo = "_static/folium_logo.png"
143
144
# The name of an image file (within the static path) to use as favicon of the
145
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
146
# pixels large.
147
# html_favicon = None
148
149
# Add any paths that contain custom static files (such as style sheets) here,
150
# relative to this directory. They are copied after the builtin static files,
151
# so a file named "default.css" will overwrite the builtin "default.css".
152
html_static_path = ["_static"]
153
154
html_css_files = [
155
"custom.css",
156
]
157
158
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
159
# using the given strftime format.
160
# html_last_updated_fmt = '%b %d, %Y'
161
162
# If true, SmartyPants will be used to convert quotes and dashes to
163
# typographically correct entities.
164
# html_use_smartypants = True
165
166
# Custom sidebar templates, maps document names to template names.
167
# html_sidebars = {}
168
169
# Additional templates that should be rendered to pages, maps page names to
170
# template names.
171
# html_additional_pages = {}
172
173
# If false, no module index is generated.
174
# html_domain_indices = True
175
176
# If false, no index is generated.
177
# html_use_index = True
178
179
# If true, the index is split into individual pages for each letter.
180
# html_split_index = False
181
182
# If true, links to the reST sources are added to the pages.
183
# html_show_sourcelink = True
184
185
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
186
# html_show_sphinx = True
187
188
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
189
# html_show_copyright = True
190
191
# If true, an OpenSearch description file will be output, and all pages will
192
# contain a <link> tag referring to it. The value of this option must be the
193
# base URL from which the finished HTML is served.
194
# html_use_opensearch = ''
195
196
# This is the file name suffix for HTML files (e.g. ".xhtml").
197
# html_file_suffix = None
198
199
# Output file base name for HTML help builder.
200
htmlhelp_basename = "Foliumdoc"
201
202
203
# -- Options for LaTeX output --------------------------------------------------
204
205
latex_elements = {
206
# The paper size ('letterpaper' or 'a4paper').
207
#'papersize': 'letterpaper',
208
# The font size ('10pt', '11pt' or '12pt').
209
#'pointsize': '10pt',
210
# Additional stuff for the LaTeX preamble.
211
#'preamble': '',
212
}
213
214
# Grouping the document tree into LaTeX files. List of tuples
215
# (source start file, target name, title, author, documentclass [howto/manual]).
216
latex_documents = [
217
("index", "Folium.tex", "Folium Documentation", "Rob Story", "manual"),
218
]
219
220
# The name of an image file (relative to this directory) to place at the top of
221
# the title page.
222
# latex_logo = None
223
224
# For "manual" documents, if this is true, then toplevel headings are parts,
225
# not chapters.
226
# latex_use_parts = False
227
228
# If true, show page references after internal links.
229
# latex_show_pagerefs = False
230
231
# If true, show URL addresses after external links.
232
# latex_show_urls = False
233
234
# Documents to append as an appendix to all manuals.
235
# latex_appendices = []
236
237
# If false, no module index is generated.
238
# latex_domain_indices = True
239
240
241
# -- Options for manual page output --------------------------------------------
242
243
# One entry per manual page. List of tuples
244
# (source start file, name, description, authors, manual section).
245
man_pages = [("index", "folium", "Folium Documentation", ["Rob Story"], 1)]
246
247
# If true, show URL addresses after external links.
248
# man_show_urls = False
249
250
251
# -- Options for Texinfo output ------------------------------------------------
252
253
# Grouping the document tree into Texinfo files. List of tuples
254
# (source start file, target name, title, author,
255
# dir menu entry, description, category)
256
texinfo_documents = [
257
(
258
"index",
259
"Folium",
260
"Folium Documentation",
261
"Rob Story",
262
"Folium",
263
"One line description of project.",
264
"Miscellaneous",
265
),
266
]
267
268
# Documents to append as an appendix to all manuals.
269
# texinfo_appendices = []
270
271
# If false, no module index is generated.
272
# texinfo_domain_indices = True
273
274
# How to display URL addresses: 'footnote', 'no', or 'inline'.
275
# texinfo_show_urls = 'footnote'
276
277
# Ignore tile URLs
278
linkcheck_ignore = [
279
r"https://free.*",
280
]
281
282
intersphinx_mapping = {
283
"xyzservices": (
284
"https://xyzservices.readthedocs.io/en/latest/",
285
"https://xyzservices.readthedocs.io/en/latest/objects.inv",
286
),
287
"branca": (
288
"https://python-visualization.github.io/branca/",
289
"https://python-visualization.github.io/branca/objects.inv",
290
),
291
}
292
293
autodoc_default_options = {
294
"members": True,
295
"undoc-members": True,
296
"show-inheritance": True,
297
"no-value": "default_js,default_css",
298
}
299
300
nbsphinx_custom_formats = {
301
".md": ["jupytext.reads", {"fmt": "mystnb"}],
302
}
303
304