|
32 | 32 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
33 | 33 | # ones.
|
34 | 34 |
|
35 |
| -import sphinx_rtd_theme |
36 | 35 | import recommonmark
|
| 36 | +import sphinx_rtd_theme |
37 | 37 | from recommonmark.transform import AutoStructify
|
38 | 38 |
|
39 |
| - |
40 |
| -extensions = ['sphinx.ext.autodoc', |
41 |
| - 'sphinx.ext.doctest', |
42 |
| - 'sphinx.ext.todo', |
43 |
| - 'sphinx.ext.coverage', |
44 |
| - 'sphinx.ext.mathjax', |
45 |
| - 'sphinx.ext.ifconfig', |
46 |
| - 'sphinx.ext.viewcode', |
47 |
| - 'sphinx.ext.napoleon', |
48 |
| - 'sphinx.ext.intersphinx', |
49 |
| - 'recommonmark'] |
| 39 | +extensions = [ |
| 40 | + "sphinx.ext.autodoc", |
| 41 | + "sphinx.ext.doctest", |
| 42 | + "sphinx.ext.todo", |
| 43 | + "sphinx.ext.coverage", |
| 44 | + "sphinx.ext.mathjax", |
| 45 | + "sphinx.ext.ifconfig", |
| 46 | + "sphinx.ext.viewcode", |
| 47 | + "sphinx.ext.napoleon", |
| 48 | + "sphinx.ext.intersphinx", |
| 49 | + "recommonmark", |
| 50 | +] |
50 | 51 |
|
51 | 52 | # Add any paths that contain templates here, relative to this directory.
|
52 |
| -templates_path = ['_templates'] |
| 53 | +templates_path = ["_templates"] |
53 | 54 |
|
54 | 55 | # The suffix(es) of source filenames.
|
55 | 56 | # You can specify multiple suffix as a list of string:
|
56 |
| -source_suffix = ['.rst', '.md'] |
| 57 | +source_suffix = [".rst", ".md"] |
57 | 58 | # source_suffix = '.rst'
|
58 | 59 |
|
59 | 60 | # The master toctree document.
|
60 |
| -master_doc = 'index' |
| 61 | +master_doc = "index" |
61 | 62 |
|
62 | 63 | # General information about the project.
|
63 |
| -project = 'Pythia' |
64 |
| -copyright = '2019, Facebook AI Research' |
65 |
| -author = 'Facebook AI Research' |
| 64 | +project = "Pythia" |
| 65 | +copyright = "2019, Facebook AI Research" |
| 66 | +author = "Facebook AI Research" |
66 | 67 |
|
67 | 68 | # The version info for the project you're documenting, acts as replacement for
|
68 | 69 | # |version| and |release|, also used in various other places throughout the
|
69 | 70 | # built documents.
|
70 | 71 | #
|
71 | 72 | # The short X.Y version.
|
72 |
| -version = '0.3' |
| 73 | +version = "0.3" |
73 | 74 | # The full version, including alpha/beta/rc tags.
|
74 |
| -release = '0.3' |
| 75 | +release = "0.3" |
75 | 76 |
|
76 | 77 | # The language for content autogenerated by Sphinx. Refer to documentation
|
77 | 78 | # for a list of supported languages.
|
|
83 | 84 | # List of patterns, relative to source directory, that match files and
|
84 | 85 | # directories to ignore when looking for source files.
|
85 | 86 | # This patterns also effect to html_static_path and html_extra_path
|
86 |
| -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
| 87 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
87 | 88 |
|
88 | 89 | # The name of the Pygments (syntax highlighting) style to use.
|
89 |
| -pygments_style = 'sphinx' |
| 90 | +pygments_style = "sphinx" |
90 | 91 |
|
91 | 92 | # If true, `todo` and `todoList` produce output, else they produce nothing.
|
92 | 93 | todo_include_todos = True
|
|
97 | 98 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
98 | 99 | # a list of builtin themes.
|
99 | 100 | #
|
100 |
| -html_theme = 'sphinx_rtd_theme' |
| 101 | +html_theme = "sphinx_rtd_theme" |
101 | 102 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
102 | 103 |
|
103 | 104 | # Theme options are theme-specific and customize the look and feel of a theme
|
|
109 | 110 | # Add any paths that contain custom static files (such as style sheets) here,
|
110 | 111 | # relative to this directory. They are copied after the builtin static files,
|
111 | 112 | # so a file named "default.css" will overwrite the builtin "default.css".
|
112 |
| -html_static_path = ['_static'] |
| 113 | +html_static_path = ["_static"] |
113 | 114 |
|
114 | 115 | # Custom sidebar templates, must be a dictionary that maps document names
|
115 | 116 | # to template names.
|
116 | 117 | #
|
117 | 118 | # This is required for the alabaster theme
|
118 | 119 | # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
|
119 | 120 | html_sidebars = {
|
120 |
| - '**': [ |
121 |
| - 'relations.html', # needs 'show_related': True theme option to display |
122 |
| - 'searchbox.html', |
| 121 | + "**": [ |
| 122 | + "relations.html", # needs 'show_related': True theme option to display |
| 123 | + "searchbox.html", |
123 | 124 | ]
|
124 | 125 | }
|
125 | 126 |
|
126 | 127 |
|
127 | 128 | # -- Options for HTMLHelp output ------------------------------------------
|
128 | 129 |
|
129 | 130 | # Output file base name for HTML help builder.
|
130 |
| -htmlhelp_basename = 'pythiadoc' |
| 131 | +htmlhelp_basename = "pythiadoc" |
131 | 132 |
|
132 | 133 |
|
133 | 134 | # -- Options for LaTeX output ---------------------------------------------
|
|
136 | 137 | # The paper size ('letterpaper' or 'a4paper').
|
137 | 138 | #
|
138 | 139 | # 'papersize': 'letterpaper',
|
139 |
| - |
140 | 140 | # The font size ('10pt', '11pt' or '12pt').
|
141 | 141 | #
|
142 | 142 | # 'pointsize': '10pt',
|
143 |
| - |
144 | 143 | # Additional stuff for the LaTeX preamble.
|
145 | 144 | #
|
146 | 145 | # 'preamble': '',
|
147 |
| - |
148 | 146 | # Latex figure (float) alignment
|
149 | 147 | #
|
150 | 148 | # 'figure_align': 'htbp',
|
|
154 | 152 | # (source start file, target name, title,
|
155 | 153 | # author, documentclass [howto, manual, or own class]).
|
156 | 154 | latex_documents = [
|
157 |
| - (master_doc, 'pythia.tex', 'Pythia Documentation', |
158 |
| - 'Facebook AI Research', 'manual'), |
| 155 | + ( |
| 156 | + master_doc, |
| 157 | + "pythia.tex", |
| 158 | + "Pythia Documentation", |
| 159 | + "Facebook AI Research", |
| 160 | + "manual", |
| 161 | + ), |
159 | 162 | ]
|
160 | 163 |
|
161 | 164 |
|
162 | 165 | # -- Options for manual page output ---------------------------------------
|
163 | 166 |
|
164 | 167 | # One entry per manual page. List of tuples
|
165 | 168 | # (source start file, name, description, authors, manual section).
|
166 |
| -man_pages = [ |
167 |
| - (master_doc, 'pythia', 'Pythia Documentation', |
168 |
| - [author], 1) |
169 |
| -] |
| 169 | +man_pages = [(master_doc, "pythia", "Pythia Documentation", [author], 1)] |
170 | 170 |
|
171 | 171 |
|
172 | 172 | # -- Options for Texinfo output -------------------------------------------
|
|
175 | 175 | # (source start file, target name, title, author,
|
176 | 176 | # dir menu entry, description, category)
|
177 | 177 | texinfo_documents = [
|
178 |
| - (master_doc, 'pythia', 'pythia Documentation', |
179 |
| - author, 'pythia', 'One line description of project.', |
180 |
| - 'Miscellaneous'), |
| 178 | + ( |
| 179 | + master_doc, |
| 180 | + "pythia", |
| 181 | + "pythia Documentation", |
| 182 | + author, |
| 183 | + "pythia", |
| 184 | + "One line description of project.", |
| 185 | + "Miscellaneous", |
| 186 | + ), |
181 | 187 | ]
|
182 | 188 |
|
183 | 189 | github_doc_root = "https://github.com/facebookresearch/pythia/blob/v0.3/"
|
184 | 190 |
|
185 | 191 | # At the bottom of conf.py
|
186 | 192 | def setup(app):
|
187 |
| - app.add_config_value('recommonmark_config', { |
188 |
| - 'url_resolver': lambda url: github_doc_root + url, |
189 |
| - 'auto_toc_tree_section': 'Contents', |
190 |
| - }, True) |
| 193 | + app.add_config_value( |
| 194 | + "recommonmark_config", |
| 195 | + { |
| 196 | + "url_resolver": lambda url: github_doc_root + url, |
| 197 | + "auto_toc_tree_section": "Contents", |
| 198 | + }, |
| 199 | + True, |
| 200 | + ) |
191 | 201 | app.add_transform(AutoStructify)
|
0 commit comments