@@ -32,13 +32,13 @@ def get_version(*file_paths):
32
32
version_match = re .search (r"^__version__ = ['\"]([^'\"]*)['\"]" , version_file , re .M )
33
33
if version_match :
34
34
return version_match .group (1 )
35
- raise RuntimeError (' Unable to find version string.' )
35
+ raise RuntimeError (" Unable to find version string." )
36
36
37
37
38
38
REPO_ROOT = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
39
39
sys .path .append (REPO_ROOT )
40
40
41
- VERSION = get_version (' ../event_routing_backends' , ' __init__.py' )
41
+ VERSION = get_version (" ../event_routing_backends" , " __init__.py" )
42
42
43
43
# Configure Django for autodoc usage
44
44
settings .configure ()
@@ -62,40 +62,40 @@ def get_version(*file_paths):
62
62
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
63
63
# ones.
64
64
extensions = [
65
- ' sphinx.ext.autodoc' ,
66
- ' sphinx.ext.doctest' ,
67
- ' sphinx.ext.intersphinx' ,
68
- ' sphinx.ext.ifconfig' ,
69
- ' sphinx.ext.napoleon' ,
70
- ' sphinx.ext.autosectionlabel'
65
+ " sphinx.ext.autodoc" ,
66
+ " sphinx.ext.doctest" ,
67
+ " sphinx.ext.intersphinx" ,
68
+ " sphinx.ext.ifconfig" ,
69
+ " sphinx.ext.napoleon" ,
70
+ " sphinx.ext.autosectionlabel" ,
71
71
]
72
72
73
73
# A list of warning types to suppress arbitrary warning messages.
74
74
suppress_warnings = [
75
- ' image.nonlocal_uri' ,
75
+ " image.nonlocal_uri" ,
76
76
]
77
77
78
78
# Add any paths that contain templates here, relative to this directory.
79
- templates_path = [' _templates' ]
79
+ templates_path = [" _templates" ]
80
80
81
81
# The suffix(es) of source filenames.
82
82
# You can specify multiple suffix as a list of string:
83
83
#
84
84
# source_suffix = ['.rst', '.md']
85
- source_suffix = ' .rst'
85
+ source_suffix = " .rst"
86
86
87
87
# The encoding of source files.
88
88
#
89
89
# source_encoding = 'utf-8-sig'
90
90
91
91
# The top level toctree document.
92
- top_level_doc = ' index'
92
+ top_level_doc = " index"
93
93
94
94
# General information about the project.
95
- project = ' event-routing-backends'
96
- copyright = f' { datetime .now ().year } , Axim Collaborative, Inc' # pylint: disable=redefined-builtin
97
- author = ' Axim Collaborative, Inc'
98
- project_title = ' event-routing-backends'
95
+ project = " event-routing-backends"
96
+ copyright = f" { datetime .now ().year } , Axim Collaborative, Inc" # pylint: disable=redefined-builtin
97
+ author = " Axim Collaborative, Inc"
98
+ project_title = " event-routing-backends"
99
99
documentation_title = f"{ project_title } "
100
100
101
101
# The version info for the project you're documenting, acts as replacement for
@@ -126,7 +126,7 @@ def get_version(*file_paths):
126
126
# List of patterns, relative to source directory, that match files and
127
127
# directories to ignore when looking for source files.
128
128
# This patterns also effect to html_static_path and html_extra_path
129
- exclude_patterns = [' _build' , ' Thumbs.db' , ' .DS_Store' , ' changelog.rst' ]
129
+ exclude_patterns = [" _build" , " Thumbs.db" , " .DS_Store" , " changelog.rst" ]
130
130
131
131
# The reST default role (used for this markup: `text`) to use for all
132
132
# documents.
@@ -148,7 +148,7 @@ def get_version(*file_paths):
148
148
# show_authors = False
149
149
150
150
# The name of the Pygments (syntax highlighting) style to use.
151
- pygments_style = ' sphinx'
151
+ pygments_style = " sphinx"
152
152
153
153
# A list of ignored prefixes for module index sorting.
154
154
# modindex_common_prefix = []
@@ -165,22 +165,22 @@ def get_version(*file_paths):
165
165
# The theme to use for HTML and HTML Help pages. See the documentation for
166
166
# a list of builtin themes.
167
167
168
- html_theme = ' sphinx_book_theme'
168
+ html_theme = " sphinx_book_theme"
169
169
170
170
# Theme options are theme-specific and customize the look and feel of a theme
171
171
# further. For a list of options available for each theme, see the
172
172
# documentation.
173
173
#
174
174
html_theme_options = {
175
- "repository_url" : "https://github.com/openedx/event-routing-backends" ,
176
- "repository_branch" : "master" ,
177
- "path_to_docs" : "docs/" ,
178
- "home_page_in_toc" : True ,
179
- "use_repository_button" : True ,
180
- "use_issues_button" : True ,
181
- "use_edit_page_button" : True ,
182
- # Please don't change unless you know what you're doing.
183
- "extra_footer" : """
175
+ "repository_url" : "https://github.com/openedx/event-routing-backends" ,
176
+ "repository_branch" : "master" ,
177
+ "path_to_docs" : "docs/" ,
178
+ "home_page_in_toc" : True ,
179
+ "use_repository_button" : True ,
180
+ "use_issues_button" : True ,
181
+ "use_edit_page_button" : True ,
182
+ # Please don't change unless you know what you're doing.
183
+ "extra_footer" : """
184
184
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">
185
185
<img
186
186
alt="Creative Commons License"
@@ -200,7 +200,7 @@ def get_version(*file_paths):
200
200
rel="license"
201
201
href="https://creativecommons.org/licenses/by-sa/4.0/"
202
202
>Creative Commons Attribution-ShareAlike 4.0 International License</a>.
203
- """
203
+ """ ,
204
204
}
205
205
206
206
# Add any paths that contain custom themes here, relative to this directory.
@@ -229,10 +229,10 @@ def get_version(*file_paths):
229
229
# Add any paths that contain custom static files (such as style sheets) here,
230
230
# relative to this directory. They are copied after the builtin static files,
231
231
# so a file named "default.css" will overwrite the builtin "default.css".
232
- html_static_path = [' _static' ]
232
+ html_static_path = [" _static" ]
233
233
234
234
html_css_files = [
235
- ' theme_overrides.css' ,
235
+ " theme_overrides.css" ,
236
236
]
237
237
238
238
# Add any extra paths that contain custom files (such as robots.txt or
@@ -313,23 +313,20 @@ def get_version(*file_paths):
313
313
# html_search_scorer = 'scorer.js'
314
314
315
315
# Output file base name for HTML help builder.
316
- htmlhelp_basename = f' { project } doc'
316
+ htmlhelp_basename = f" { project } doc"
317
317
318
318
# -- Options for LaTeX output ---------------------------------------------
319
319
320
320
latex_elements = {
321
321
# The paper size ('letterpaper' or 'a4paper').
322
322
#
323
323
# 'papersize': 'letterpaper',
324
-
325
324
# The font size ('10pt', '11pt' or '12pt').
326
325
#
327
326
# 'pointsize': '10pt',
328
-
329
327
# Additional stuff for the LaTeX preamble.
330
328
#
331
329
# 'preamble': '',
332
-
333
330
# Latex figure (float) alignment
334
331
#
335
332
# 'figure_align': 'htbp',
@@ -338,10 +335,9 @@ def get_version(*file_paths):
338
335
# Grouping the document tree into LaTeX files. List of tuples
339
336
# (source start file, target name, title,
340
337
# author, documentclass [howto, manual, or own class]).
341
- latex_target = f' { project } .tex'
338
+ latex_target = f" { project } .tex"
342
339
latex_documents = [
343
- (top_level_doc , latex_target , documentation_title ,
344
- author , 'manual' ),
340
+ (top_level_doc , latex_target , documentation_title , author , "manual" ),
345
341
]
346
342
347
343
# The name of an image file (relative to this directory) to place at the top of
@@ -381,10 +377,7 @@ def get_version(*file_paths):
381
377
382
378
# One entry per manual page. List of tuples
383
379
# (source start file, name, description, authors, manual section).
384
- man_pages = [
385
- (top_level_doc , project_title , documentation_title ,
386
- [author ], 1 )
387
- ]
380
+ man_pages = [(top_level_doc , project_title , documentation_title , [author ], 1 )]
388
381
389
382
# If true, show URL addresses after external links.
390
383
#
@@ -397,9 +390,15 @@ def get_version(*file_paths):
397
390
# (source start file, target name, title, author,
398
391
# dir menu entry, description, category)
399
392
texinfo_documents = [
400
- (top_level_doc , project_title , documentation_title ,
401
- author , project_title , 'Various backends for receiving edX LMS events.' ,
402
- 'Miscellaneous' ),
393
+ (
394
+ top_level_doc ,
395
+ project_title ,
396
+ documentation_title ,
397
+ author ,
398
+ project_title ,
399
+ "Various backends for receiving edX LMS events." ,
400
+ "Miscellaneous" ,
401
+ ),
403
402
]
404
403
405
404
# Documents to append as an appendix to all manuals.
@@ -473,7 +472,7 @@ def get_version(*file_paths):
473
472
# epub_post_files = []
474
473
475
474
# A list of files that should not be packed into the epub file.
476
- epub_exclude_files = [' search.html' ]
475
+ epub_exclude_files = [" search.html" ]
477
476
478
477
# The depth of the table of contents in toc.ncx.
479
478
#
@@ -506,9 +505,12 @@ def get_version(*file_paths):
506
505
507
506
# Example configuration for intersphinx: refer to the Python standard library.
508
507
intersphinx_mapping = {
509
- 'python' : ('https://docs.python.org/3.6' , None ),
510
- 'django' : ('https://docs.djangoproject.com/en/1.11/' , 'https://docs.djangoproject.com/en/1.11/_objects/' ),
511
- 'model_utils' : ('https://django-model-utils.readthedocs.io/en/latest/' , None ),
508
+ "python" : ("https://docs.python.org/3.6" , None ),
509
+ "django" : (
510
+ "https://docs.djangoproject.com/en/1.11/" ,
511
+ "https://docs.djangoproject.com/en/1.11/_objects/" ,
512
+ ),
513
+ "model_utils" : ("https://django-model-utils.readthedocs.io/en/latest/" , None ),
512
514
}
513
515
514
516
@@ -520,17 +522,24 @@ def on_init(app): # pylint: disable=unused-argument
520
522
avoid checking in the generated reStructuredText files.
521
523
"""
522
524
docs_path = os .path .abspath (os .path .dirname (__file__ ))
523
- root_path = os .path .abspath (os .path .join (docs_path , '..' ))
524
- apidoc_path = ' sphinx-apidoc'
525
- if hasattr (sys , ' real_prefix' ): # Check to see if we are in a virtualenv
525
+ root_path = os .path .abspath (os .path .join (docs_path , ".." ))
526
+ apidoc_path = " sphinx-apidoc"
527
+ if hasattr (sys , " real_prefix" ): # Check to see if we are in a virtualenv
526
528
# If we are, assemble the path manually
527
- bin_path = os .path .abspath (os .path .join (sys .prefix , ' bin' ))
529
+ bin_path = os .path .abspath (os .path .join (sys .prefix , " bin" ))
528
530
apidoc_path = os .path .join (bin_path , apidoc_path )
529
- check_call ([apidoc_path , '-o' , docs_path , os .path .join (root_path , 'event_routing_backends' ),
530
- os .path .join (root_path , 'event_routing_backends/migrations' )])
531
+ check_call (
532
+ [
533
+ apidoc_path ,
534
+ "-o" ,
535
+ docs_path ,
536
+ os .path .join (root_path , "event_routing_backends" ),
537
+ os .path .join (root_path , "event_routing_backends/migrations" ),
538
+ ]
539
+ )
531
540
532
541
533
542
def setup (app ):
534
543
"""Sphinx extension: run sphinx-apidoc."""
535
- event = ' builder-inited'
544
+ event = " builder-inited"
536
545
app .connect (event , on_init )
0 commit comments