1
- from importlib import metadata
2
1
from pathlib import Path
3
- import os
2
+ import importlib . metadata
4
3
import re
5
- import sys
6
4
7
5
ROOT = Path (__file__ ).parent .parent
8
6
PACKAGE_SRC = ROOT / "jsonschema"
9
7
10
- # If extensions (or modules to document with autodoc) are in another directory,
11
- # add these directories to sys.path here. If the directory is relative to the
12
- # documentation root, use os.path.abspath to make it absolute, like shown here.
13
- ext_paths = [os .path .abspath (os .path .pardir ), os .path .dirname (__file__ )]
14
- sys .path = ext_paths + sys .path
8
+ # -- Project information -----------------------------------------------------
15
9
16
- # -- General configuration -------------------------------------------------
10
+ project = "jsonschema"
11
+ author = "Julian Berman"
12
+ copyright = "2013, " + author
13
+
14
+ # version: The short X.Y version
15
+ # release: The full version, including alpha/beta/rc tags.
16
+ release = importlib .metadata .version ("jsonschema" )
17
+ version = release .partition ("-" )[0 ]
18
+
19
+
20
+ # -- General configuration ---------------------------------------------------
17
21
18
22
# If your documentation needs a minimal Sphinx version, state it here.
23
+ #
19
24
# needs_sphinx = "1.0"
20
25
26
+ default_role = "any"
27
+
21
28
# Add any Sphinx extension module names here, as strings. They can be
22
29
# extensions coming with Sphinx (named "sphinx.ext.*") or your custom
23
30
# ones.
43
50
# Add any paths that contain templates here, relative to this directory.
44
51
templates_path = ["_templates" ]
45
52
46
- # The suffix of source filenames.
53
+ # The suffix(es) of source filenames.
54
+ # You can specify multiple suffix as a list of string:
55
+ #
56
+ # source_suffix = [".rst", ".md"]
47
57
source_suffix = ".rst"
48
58
49
- # The encoding of source files.
50
- # source_encoding = "utf-8-sig"
51
-
52
59
# The master toctree document.
53
60
master_doc = "index"
54
61
55
- # General information about the project.
56
- project = "jsonschema"
57
- author = "Julian Berman"
58
- copyright = "2013, " + author
59
-
60
- # The version info for the project you're documenting, acts as replacement for
61
- # |version| and |release|, also used in various other places throughout the
62
- # built documents.
63
- #
64
- # version: The short X.Y version
65
- # release: The full version, including alpha/beta/rc tags.
66
- release = metadata .version ("jsonschema" )
67
- version = release .partition ("-" )[0 ]
68
-
69
62
# There are two options for replacing |today|: either, you set today to some
70
63
# non-false value, then it is used:
71
64
# today = ""
74
67
75
68
# List of patterns, relative to source directory, that match files and
76
69
# directories to ignore when looking for source files.
70
+ # This pattern also affects html_static_path and html_extra_path.
77
71
exclude_patterns = ["_build" , "_cache" , "_static" , "_templates" ]
78
72
79
- # The reST default role (used for this markup: `text`) to use for all documents
80
- default_role = "any"
81
-
82
73
# The name of the Pygments (syntax highlighting) style to use.
83
74
pygments_style = "lovelace"
84
75
pygments_dark_style = "one-dark"
85
76
86
- # A list of ignored prefixes for module index sorting.
87
- # modindex_common_prefix = []
88
-
89
77
doctest_global_setup = """
90
78
from jsonschema import *
91
79
"""
108
96
#
109
97
# html_theme_options = {}
110
98
111
- # Add any paths that contain custom themes here, relative to this directory.
112
- # html_theme_path = []
113
-
114
- # The name for this set of Sphinx documents. If None, it defaults to
115
- # "<project> v<release> documentation".
116
- # html_title = None
117
-
118
- # A shorter title for the navigation bar. Default is the same as html_title.
119
- # html_short_title = None
120
-
121
- # The name of an image file (relative to this directory) to place at the top
122
- # of the sidebar.
123
- # html_logo = None
124
-
125
- # The name of an image file (within the static path) to use as favicon of the
126
- # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
127
- # pixels large.
128
- # html_favicon = None
129
-
130
99
# Add any paths that contain custom static files (such as style sheets) here,
131
100
# relative to this directory. They are copied after the builtin static files,
132
101
# so a file named "default.css" will overwrite the builtin "default.css".
133
102
# html_static_path = ["_static"]
134
103
135
- # If not "", a "Last updated on:" timestamp is inserted at every page bottom,
136
- # using the given strftime format.
137
- # html_last_updated_fmt = "%b %d, %Y"
138
-
139
- # If true, SmartyPants will be used to convert quotes and dashes to
140
- # typographically correct entities.
141
- # html_use_smartypants = True
142
-
143
- # Custom sidebar templates, maps document names to template names.
144
- # html_sidebars = {}
145
-
146
- # Additional templates that should be rendered to pages, maps page names to
147
- # template names.
148
- # html_additional_pages = {}
149
-
150
- # If false, no module index is generated.
151
- # html_domain_indices = True
152
-
153
- # If false, no index is generated.
154
- # html_use_index = True
155
-
156
- # If true, the index is split into individual pages for each letter.
157
- # html_split_index = False
158
-
159
- # If true, links to the reST sources are added to the pages.
160
- # html_show_sourcelink = True
161
-
162
- # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
163
- # html_show_sphinx = True
164
104
165
- # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
166
- # html_show_copyright = True
167
-
168
- # If true, an OpenSearch description file will be output, and all pages will
169
- # contain a <link> tag referring to it. The value of this option must be the
170
- # base URL from which the finished HTML is served.
171
- # html_use_opensearch = ""
172
-
173
- # This is the file name suffix for HTML files (e.g. ".xhtml").
174
- # html_file_suffix = None
105
+ # -- Options for HTMLHelp output ---------------------------------------------
175
106
176
107
# Output file base name for HTML help builder.
177
108
htmlhelp_basename = "jsonschemadoc"
178
109
179
110
180
- # -- Options for LaTeX output ----------------------------------------------
111
+ # -- Options for LaTeX output ------------------------------------------------
181
112
182
- # Grouping the document tree into LaTeX files. List of tuples (source
183
- # start file, target name, title, author, documentclass [howto/manual]).
184
113
latex_documents = [
185
114
("index" , "jsonschema.tex" , "jsonschema Documentation" , author , "manual" ),
186
115
]
187
116
188
- # The name of an image file (relative to this directory) to place at the top of
189
- # the title page.
190
- # latex_logo = None
191
-
192
- # For "manual" documents, if this is true, then toplevel headings are parts,
193
- # not chapters.
194
- # latex_use_parts = False
195
-
196
- # If true, show page references after internal links.
197
- # latex_show_pagerefs = False
198
-
199
- # If true, show URL addresses after external links.
200
- # latex_show_urls = False
201
-
202
- # Documents to append as an appendix to all manuals.
203
- # latex_appendices = []
204
117
205
- # If false, no module index is generated.
206
- # latex_domain_indices = True
207
-
208
-
209
- # -- Options for manual page output ----------------------------------------
118
+ # -- Options for manual page output ------------------------------------------
210
119
211
120
# One entry per manual page. List of tuples
212
121
# (source start file, name, description, authors, manual section).
213
122
man_pages = [("index" , "jsonschema" , "jsonschema Documentation" , [author ], 1 )]
214
123
215
- # If true, show URL addresses after external links.
216
- # man_show_urls = False
217
-
218
124
219
- # -- Options for Texinfo output --------------------------------------------
125
+ # -- Options for Texinfo output ----------------------------------------------
220
126
221
127
# Grouping the document tree into Texinfo files. List of tuples
222
128
# (source start file, target name, title, author,
233
139
),
234
140
]
235
141
236
- # Documents to append as an appendix to all manuals.
237
- # texinfo_appendices = []
238
-
239
- # If false, no module index is generated.
240
- # texinfo_domain_indices = True
241
-
242
- # How to display URL addresses: "footnote", "no", or "inline".
243
- # texinfo_show_urls = "footnote"
244
-
245
- # -- Options for the linkcheck builder ------------------------------------
142
+ # -- Options for the linkcheck builder --------------------------------------
246
143
247
144
248
145
def entire_domain (host ):
@@ -263,7 +160,7 @@ def entire_domain(host):
263
160
264
161
spelling_word_list_filename = "spelling-wordlist.txt"
265
162
266
- # -- Options for autoapi --------------------------------------------------
163
+ # -- Options for autoapi ----------------------------------------------------
267
164
268
165
suppress_warnings = [
269
166
"autoapi.python_import_resolution" ,
0 commit comments