Convert documentation to reStructured text.
[fio.git] / doc / conf.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 #
4 # fio documentation build configuration file, created by
5 # sphinx-quickstart on Mon Nov 14 13:56:30 2016.
6 #
7 # This file is execfile()d with the current directory set to its
8 # containing dir.
9 #
10 # Note that not all possible configuration values are present in this
11 # autogenerated file.
12 #
13 # All configuration values have a default; values that are commented out
14 # serve to show the default.
15
16 # If extensions (or modules to document with autodoc) are in another directory,
17 # add these directories to sys.path here. If the directory is relative to the
18 # documentation root, use os.path.abspath to make it absolute, like shown here.
19 #
20 # import os
21 # import sys
22 # sys.path.insert(0, os.path.abspath('.'))
23
24 # -- General configuration ------------------------------------------------
25
26 # If your documentation needs a minimal Sphinx version, state it here.
27 #
28 # needs_sphinx = '1.0'
29
30 # Add any Sphinx extension module names here, as strings. They can be
31 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32 # ones.
33 extensions = []
34
35 # Add any paths that contain templates here, relative to this directory.
36 templates_path = ['_templates']
37
38 # The suffix(es) of source filenames.
39 # You can specify multiple suffix as a list of string:
40 #
41 # source_suffix = ['.rst', '.md']
42 source_suffix = '.rst'
43
44 # The encoding of source files.
45 #
46 # source_encoding = 'utf-8-sig'
47
48 # The master toctree document.
49 master_doc = 'index'
50
51 # General information about the project.
52 project = 'fio'
53 copyright = '2017, Jens Axboe <axboe@kernel.dk>'
54 author = 'Jens Axboe <axboe@kernel.dk>'
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
61 # The short X.Y version.
62 # version = '1'
63 # The full version, including alpha/beta/rc tags.
64 # release = '1'
65
66 def fio_version():
67
68         from os.path import exists, dirname, join
69         wsroot = dirname(dirname(__file__))
70         version_file = join(wsroot, "FIO-VERSION-FILE")
71         if not exists(version_file):
72                 version_gen = join(wsroot, "FIO-VERSION-GEN")
73                 from subprocess import call
74                 rc = call(version_gen, shell=True, cwd=wsroot)
75                 if rc:
76                         print("Couldn't generate version file. rc=%r" % rc)
77                         return "Unknown", "Unknown"
78
79         vsl = open(version_file).read().strip().split('-')
80         version = vsl[1]
81         release = '-'.join(vsl[1:])
82         return version, release
83
84 version, release = fio_version()
85
86 # The language for content autogenerated by Sphinx. Refer to documentation
87 # for a list of supported languages.
88 #
89 # This is also used if you do content translation via gettext catalogs.
90 # Usually you set "language" from the command line for these cases.
91 language = None
92
93 # There are two options for replacing |today|: either, you set today to some
94 # non-false value, then it is used:
95 #
96 # today = ''
97 #
98 # Else, today_fmt is used as the format for a strftime call.
99 #
100 # today_fmt = '%B %d, %Y'
101
102 # List of patterns, relative to source directory, that match files and
103 # directories to ignore when looking for source files.
104 # This patterns also effect to html_static_path and html_extra_path
105 exclude_patterns = ['output', 'Thumbs.db', '.DS_Store', 'fio_examples.rst']
106
107 # The reST default role (used for this markup: `text`) to use for all
108 # documents.
109 #
110 # default_role = None
111
112 # If true, '()' will be appended to :func: etc. cross-reference text.
113 #
114 # add_function_parentheses = True
115
116 # If true, the current module name will be prepended to all description
117 # unit titles (such as .. function::).
118 #
119 # add_module_names = True
120
121 # If true, sectionauthor and moduleauthor directives will be shown in the
122 # output. They are ignored by default.
123 #
124 # show_authors = False
125
126 # The name of the Pygments (syntax highlighting) style to use.
127 pygments_style = 'sphinx'
128
129 # A list of ignored prefixes for module index sorting.
130 # modindex_common_prefix = []
131
132 # If true, keep warnings as "system message" paragraphs in the built documents.
133 # keep_warnings = False
134
135 # If true, `todo` and `todoList` produce output, else they produce nothing.
136 todo_include_todos = False
137
138
139 # -- Options for HTML output ----------------------------------------------
140
141 # The theme to use for HTML and HTML Help pages.  See the documentation for
142 # a list of builtin themes.
143 #
144 html_theme = 'alabaster'
145
146 # Theme options are theme-specific and customize the look and feel of a theme
147 # further.  For a list of options available for each theme, see the
148 # documentation.
149 #
150 # html_theme_options = {}
151
152 # Add any paths that contain custom themes here, relative to this directory.
153 # html_theme_path = []
154
155 # The name for this set of Sphinx documents.
156 # "<project> v<release> documentation" by default.
157 #
158 # html_title = 'fio v1'
159
160 # A shorter title for the navigation bar.  Default is the same as html_title.
161 #
162 # html_short_title = None
163
164 # The name of an image file (relative to this directory) to place at the top
165 # of the sidebar.
166 #
167 # html_logo = None
168
169 # The name of an image file (relative to this directory) to use as a favicon of
170 # the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
171 # pixels large.
172 #
173 # html_favicon = None
174
175 # Add any paths that contain custom static files (such as style sheets) here,
176 # relative to this directory. They are copied after the builtin static files,
177 # so a file named "default.css" will overwrite the builtin "default.css".
178 html_static_path = ['_static']
179
180 # Add any extra paths that contain custom files (such as robots.txt or
181 # .htaccess) here, relative to this directory. These files are copied
182 # directly to the root of the documentation.
183 #
184 # html_extra_path = []
185
186 # If not None, a 'Last updated on:' timestamp is inserted at every page
187 # bottom, using the given strftime format.
188 # The empty string is equivalent to '%b %d, %Y'.
189 #
190 # html_last_updated_fmt = None
191
192 # If true, SmartyPants will be used to convert quotes and dashes to
193 # typographically correct entities.
194 #
195 # html_use_smartypants = True
196
197 # Custom sidebar templates, maps document names to template names.
198 #
199 # html_sidebars = {}
200
201 # Additional templates that should be rendered to pages, maps page names to
202 # template names.
203 #
204 # html_additional_pages = {}
205
206 # If false, no module index is generated.
207 #
208 # html_domain_indices = True
209
210 # If false, no index is generated.
211 #
212 # html_use_index = True
213
214 # If true, the index is split into individual pages for each letter.
215 #
216 # html_split_index = False
217
218 # If true, links to the reST sources are added to the pages.
219 #
220 # html_show_sourcelink = True
221
222 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
223 #
224 # html_show_sphinx = True
225
226 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
227 #
228 # html_show_copyright = True
229
230 # If true, an OpenSearch description file will be output, and all pages will
231 # contain a <link> tag referring to it.  The value of this option must be the
232 # base URL from which the finished HTML is served.
233 #
234 # html_use_opensearch = ''
235
236 # This is the file name suffix for HTML files (e.g. ".xhtml").
237 # html_file_suffix = None
238
239 # Language to be used for generating the HTML full-text search index.
240 # Sphinx supports the following languages:
241 #   'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
242 #   'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
243 #
244 # html_search_language = 'en'
245
246 # A dictionary with options for the search language support, empty by default.
247 # 'ja' uses this config value.
248 # 'zh' user can custom change `jieba` dictionary path.
249 #
250 # html_search_options = {'type': 'default'}
251
252 # The name of a javascript file (relative to the configuration directory) that
253 # implements a search results scorer. If empty, the default will be used.
254 #
255 # html_search_scorer = 'scorer.js'
256
257 # Output file base name for HTML help builder.
258 htmlhelp_basename = 'fiodoc'
259
260 # -- Options for LaTeX output ---------------------------------------------
261
262 latex_elements = {
263      # The paper size ('letterpaper' or 'a4paper').
264      #
265      # 'papersize': 'letterpaper',
266
267      # The font size ('10pt', '11pt' or '12pt').
268      #
269      # 'pointsize': '10pt',
270
271      # Additional stuff for the LaTeX preamble.
272      #
273      # 'preamble': '',
274
275      # Latex figure (float) alignment
276      #
277      # 'figure_align': 'htbp',
278 }
279
280 # Grouping the document tree into LaTeX files. List of tuples
281 # (source start file, target name, title,
282 #  author, documentclass [howto, manual, or own class]).
283 latex_documents = [
284     (master_doc, 'fio.tex', 'fio Documentation',
285      'a', 'manual'),
286 ]
287
288 # The name of an image file (relative to this directory) to place at the top of
289 # the title page.
290 #
291 # latex_logo = None
292
293 # For "manual" documents, if this is true, then toplevel headings are parts,
294 # not chapters.
295 #
296 # latex_use_parts = False
297
298 # If true, show page references after internal links.
299 #
300 # latex_show_pagerefs = False
301
302 # If true, show URL addresses after external links.
303 #
304 # latex_show_urls = False
305
306 # Documents to append as an appendix to all manuals.
307 #
308 # latex_appendices = []
309
310 # It false, will not define \strong, \code,     itleref, \crossref ... but only
311 # \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
312 # packages.
313 #
314 # latex_keep_old_macro_names = True
315
316 # If false, no module index is generated.
317 #
318 # latex_domain_indices = True
319
320
321 # -- Options for manual page output ---------------------------------------
322
323 # One entry per manual page. List of tuples
324 # (source start file, name, description, authors, manual section).
325 man_pages = [
326     ('fio_man', 'fio', 'flexible I/O tester',
327      [author], 1)
328 ]
329
330 # If true, show URL addresses after external links.
331 #
332 # man_show_urls = False
333
334
335 # -- Options for Texinfo output -------------------------------------------
336
337 # Grouping the document tree into Texinfo files. List of tuples
338 # (source start file, target name, title, author,
339 #  dir menu entry, description, category)
340 texinfo_documents = [
341     (master_doc, 'fio', 'fio Documentation',
342      author, 'fio', 'One line description of project.',
343      'Miscellaneous'),
344 ]
345
346 # Documents to append as an appendix to all manuals.
347 #
348 # texinfo_appendices = []
349
350 # If false, no module index is generated.
351 #
352 # texinfo_domain_indices = True
353
354 # How to display URL addresses: 'footnote', 'no', or 'inline'.
355 #
356 # texinfo_show_urls = 'footnote'
357
358 # If true, do not generate a @detailmenu in the "Top" node's menu.
359 #
360 # texinfo_no_detailmenu = False