2121# import sys
2222# sys.path.insert(0, os.path.abspath('.'))
2323
24- # For conversion from markdown to html
25- import recommonmark .parser
2624
2725# -- General configuration ------------------------------------------------
2826
3331# Add any Sphinx extension module names here, as strings. They can be
3432# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3533# ones.
36- extensions = ['sphinx.ext.extlinks' ,
37- 'sphinxcontrib.autoprogram' ,
38- ]
34+ extensions = ["sphinx.ext.extlinks" , "sphinxcontrib.autoprogram" , "recommonmark" ]
3935
4036extlinks = {
41- ' issue' : (' https://github.com/jupyter/repo2docker/issues/%s' , ' Issue #' ),
42- 'pr' : (' https://github.com/jupyter/repo2docker/pull/%s' , ' PR #' ),
43- ' user' : (' https://github.com/%s' , '@' ),
37+ " issue" : (" https://github.com/jupyter/repo2docker/issues/%s" , " Issue #" ),
38+ "pr" : (" https://github.com/jupyter/repo2docker/pull/%s" , " PR #" ),
39+ " user" : (" https://github.com/%s" , "@" ),
4440}
4541
4642# Add any paths that contain templates here, relative to this directory.
47- templates_path = [' _templates' ]
43+ templates_path = [" _templates" ]
4844
49- # source parser
50- source_parsers = {
51- '.md' : 'recommonmark.parser.CommonMarkParser' ,
52- }
5345
5446from recommonmark .transform import AutoStructify
5547
48+
5649def setup (app ):
57- app .add_stylesheet (' custom.css' ) # may also be a URL
58- app .add_config_value ('recommonmark_config' , {
59- ' auto_toc_tree_section' : ' Contents' ,
60- }, True )
50+ app .add_stylesheet (" custom.css" ) # may also be a URL
51+ app .add_config_value (
52+ "recommonmark_config" , { " auto_toc_tree_section" : " Contents" }, True
53+ )
6154 app .add_transform (AutoStructify )
6255
6356
6457# The suffix(es) of source filenames.
6558# You can specify multiple suffix as a list of string:
6659#
6760# source_suffix = ['.rst', '.md']
68- source_suffix = [' .rst' , ' .md' ]
61+ source_suffix = [" .rst" , " .md" ]
6962
7063# The master toctree document.
71- master_doc = ' index'
64+ master_doc = " index"
7265
7366# General information about the project.
74- project = ' repo2docker'
75- copyright = ' 2019, Project Jupyter'
76- author = ' Project Jupyter'
67+ project = " repo2docker"
68+ copyright = " 2019, Project Jupyter"
69+ author = " Project Jupyter"
7770
7871# The version info for the project you're documenting, acts as replacement for
7972# |version| and |release|, also used in various other places throughout the
8073# built documents.
8174#
8275# The short X.Y version.
8376import repo2docker
77+
8478version = repo2docker .__version__
8579# The full version, including alpha/beta/rc tags.
8680release = version
8781
8882from repo2docker .buildpacks .conda import CondaBuildPack
8983
90- default_python = CondaBuildPack .major_pythons ['3' ]
84+ default_python = CondaBuildPack .major_pythons ["3" ]
9185
9286rst_prolog = """
9387.. |default_python| replace:: **Python {default_python}**
9488.. |default_python_version| replace:: {default_python}
95- """ .format (default_python = default_python )
89+ """ .format (
90+ default_python = default_python
91+ )
9692
9793# The language for content autogenerated by Sphinx. Refer to documentation
9894# for a list of supported languages.
@@ -107,22 +103,23 @@ def setup(app):
107103exclude_patterns = []
108104
109105# The name of the Pygments (syntax highlighting) style to use.
110- pygments_style = ' sphinx'
106+ pygments_style = " sphinx"
111107
112108# If true, `todo` and `todoList` produce output, else they produce nothing.
113109todo_include_todos = False
114110
115111# repo2docker Logo
116- html_logo = ' _static/images/repo2docker.svg'
117- html_favicon = ' _static/images/favicon.ico'
112+ html_logo = " _static/images/repo2docker.svg"
113+ html_favicon = " _static/images/favicon.ico"
118114
119115# -- Options for HTML output ----------------------------------------------
120116
121117# The theme to use for HTML and HTML Help pages. See the documentation for
122118# a list of builtin themes.
123119#
124120import alabaster_jupyterhub
125- html_theme = 'alabaster_jupyterhub'
121+
122+ html_theme = "alabaster_jupyterhub"
126123html_theme_path = [alabaster_jupyterhub .get_html_theme_path ()]
127124
128125# Theme options are theme-specific and customize the look and feel of a theme
@@ -134,13 +131,15 @@ def setup(app):
134131# Add any paths that contain custom static files (such as style sheets) here,
135132# relative to this directory. They are copied after the builtin static files,
136133# so a file named "default.css" will overwrite the builtin "default.css".
137- html_static_path = ['_static' ]
138- html_sidebars = { '**' : ['globaltoc.html' , 'relations.html' , 'sourcelink.html' , 'searchbox.html' ] }
134+ html_static_path = ["_static" ]
135+ html_sidebars = {
136+ "**" : ["globaltoc.html" , "relations.html" , "sourcelink.html" , "searchbox.html" ]
137+ }
139138
140139# -- Options for HTMLHelp output ------------------------------------------
141140
142141# Output file base name for HTML help builder.
143- htmlhelp_basename = ' repo2dockerdoc'
142+ htmlhelp_basename = " repo2dockerdoc"
144143
145144
146145# -- Options for LaTeX output ---------------------------------------------
@@ -149,15 +148,12 @@ def setup(app):
149148 # The paper size ('letterpaper' or 'a4paper').
150149 #
151150 # 'papersize': 'letterpaper',
152-
153151 # The font size ('10pt', '11pt' or '12pt').
154152 #
155153 # 'pointsize': '10pt',
156-
157154 # Additional stuff for the LaTeX preamble.
158155 #
159156 # 'preamble': '',
160-
161157 # Latex figure (float) alignment
162158 #
163159 # 'figure_align': 'htbp',
@@ -167,19 +163,21 @@ def setup(app):
167163# (source start file, target name, title,
168164# author, documentclass [howto, manual, or own class]).
169165latex_documents = [
170- (master_doc , 'repo2docker.tex' , 'repo2docker Documentation' ,
171- 'Project Jupyter' , 'manual' ),
166+ (
167+ master_doc ,
168+ "repo2docker.tex" ,
169+ "repo2docker Documentation" ,
170+ "Project Jupyter" ,
171+ "manual" ,
172+ )
172173]
173174
174175
175176# -- Options for manual page output ---------------------------------------
176177
177178# One entry per manual page. List of tuples
178179# (source start file, name, description, authors, manual section).
179- man_pages = [
180- (master_doc , 'repo2docker' , 'repo2docker Documentation' ,
181- [author ], 1 )
182- ]
180+ man_pages = [(master_doc , "repo2docker" , "repo2docker Documentation" , [author ], 1 )]
183181
184182
185183# -- Options for Texinfo output -------------------------------------------
@@ -188,13 +186,18 @@ def setup(app):
188186# (source start file, target name, title, author,
189187# dir menu entry, description, category)
190188texinfo_documents = [
191- (master_doc , 'repo2docker' , 'repo2docker Documentation' ,
192- author , 'repo2docker' , 'One line description of project.' ,
193- 'Miscellaneous' ),
189+ (
190+ master_doc ,
191+ "repo2docker" ,
192+ "repo2docker Documentation" ,
193+ author ,
194+ "repo2docker" ,
195+ "One line description of project." ,
196+ "Miscellaneous" ,
197+ )
194198]
195199
196200
197-
198201# -- Options for Epub output ----------------------------------------------
199202
200203# Bibliographic Dublin Core info.
@@ -213,4 +216,4 @@ def setup(app):
213216# epub_uid = ''
214217
215218# A list of files that should not be packed into the epub file.
216- epub_exclude_files = [' search.html' ]
219+ epub_exclude_files = [" search.html" ]
0 commit comments