kopia lustrzana https://github.com/jupyterhub/repo2docker
Black-ify the sphinx configuration code
rodzic
da9f8de0e3
commit
cbb375e156
|
@ -31,28 +31,26 @@
|
||||||
# Add any Sphinx extension module names here, as strings. They can be
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
# ones.
|
# ones.
|
||||||
extensions = ['sphinx.ext.extlinks',
|
extensions = ["sphinx.ext.extlinks", "sphinxcontrib.autoprogram", "recommonmark"]
|
||||||
'sphinxcontrib.autoprogram',
|
|
||||||
'recommonmark',
|
|
||||||
]
|
|
||||||
|
|
||||||
extlinks = {
|
extlinks = {
|
||||||
'issue': ('https://github.com/jupyter/repo2docker/issues/%s', 'Issue #'),
|
"issue": ("https://github.com/jupyter/repo2docker/issues/%s", "Issue #"),
|
||||||
'pr': ('https://github.com/jupyter/repo2docker/pull/%s', 'PR #'),
|
"pr": ("https://github.com/jupyter/repo2docker/pull/%s", "PR #"),
|
||||||
'user': ('https://github.com/%s', '@'),
|
"user": ("https://github.com/%s", "@"),
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ["_templates"]
|
||||||
|
|
||||||
|
|
||||||
from recommonmark.transform import AutoStructify
|
from recommonmark.transform import AutoStructify
|
||||||
|
|
||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
app.add_stylesheet('custom.css') # may also be a URL
|
app.add_stylesheet("custom.css") # may also be a URL
|
||||||
app.add_config_value('recommonmark_config', {
|
app.add_config_value(
|
||||||
'auto_toc_tree_section': 'Contents',
|
"recommonmark_config", {"auto_toc_tree_section": "Contents"}, True
|
||||||
}, True)
|
)
|
||||||
app.add_transform(AutoStructify)
|
app.add_transform(AutoStructify)
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,15 +58,15 @@ def setup(app):
|
||||||
# You can specify multiple suffix as a list of string:
|
# You can specify multiple suffix as a list of string:
|
||||||
#
|
#
|
||||||
# source_suffix = ['.rst', '.md']
|
# source_suffix = ['.rst', '.md']
|
||||||
source_suffix = ['.rst', '.md']
|
source_suffix = [".rst", ".md"]
|
||||||
|
|
||||||
# The master toctree document.
|
# The master toctree document.
|
||||||
master_doc = 'index'
|
master_doc = "index"
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = 'repo2docker'
|
project = "repo2docker"
|
||||||
copyright = '2019, Project Jupyter'
|
copyright = "2019, Project Jupyter"
|
||||||
author = 'Project Jupyter'
|
author = "Project Jupyter"
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
|
@ -76,18 +74,21 @@ author = 'Project Jupyter'
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
import repo2docker
|
import repo2docker
|
||||||
|
|
||||||
version = repo2docker.__version__
|
version = repo2docker.__version__
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = version
|
release = version
|
||||||
|
|
||||||
from repo2docker.buildpacks.conda import CondaBuildPack
|
from repo2docker.buildpacks.conda import CondaBuildPack
|
||||||
|
|
||||||
default_python = CondaBuildPack.major_pythons['3']
|
default_python = CondaBuildPack.major_pythons["3"]
|
||||||
|
|
||||||
rst_prolog = """
|
rst_prolog = """
|
||||||
.. |default_python| replace:: **Python {default_python}**
|
.. |default_python| replace:: **Python {default_python}**
|
||||||
.. |default_python_version| replace:: {default_python}
|
.. |default_python_version| replace:: {default_python}
|
||||||
""".format(default_python=default_python)
|
""".format(
|
||||||
|
default_python=default_python
|
||||||
|
)
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
@ -102,14 +103,14 @@ language = None
|
||||||
exclude_patterns = []
|
exclude_patterns = []
|
||||||
|
|
||||||
# The name of the Pygments (syntax highlighting) style to use.
|
# The name of the Pygments (syntax highlighting) style to use.
|
||||||
pygments_style = 'sphinx'
|
pygments_style = "sphinx"
|
||||||
|
|
||||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||||
todo_include_todos = False
|
todo_include_todos = False
|
||||||
|
|
||||||
# repo2docker Logo
|
# repo2docker Logo
|
||||||
html_logo = '_static/images/repo2docker.svg'
|
html_logo = "_static/images/repo2docker.svg"
|
||||||
html_favicon = '_static/images/favicon.ico'
|
html_favicon = "_static/images/favicon.ico"
|
||||||
|
|
||||||
# -- Options for HTML output ----------------------------------------------
|
# -- Options for HTML output ----------------------------------------------
|
||||||
|
|
||||||
|
@ -117,7 +118,8 @@ html_favicon = '_static/images/favicon.ico'
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
#
|
#
|
||||||
import alabaster_jupyterhub
|
import alabaster_jupyterhub
|
||||||
html_theme = 'alabaster_jupyterhub'
|
|
||||||
|
html_theme = "alabaster_jupyterhub"
|
||||||
html_theme_path = [alabaster_jupyterhub.get_html_theme_path()]
|
html_theme_path = [alabaster_jupyterhub.get_html_theme_path()]
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
# Theme options are theme-specific and customize the look and feel of a theme
|
||||||
|
@ -129,13 +131,15 @@ html_theme_path = [alabaster_jupyterhub.get_html_theme_path()]
|
||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
# relative to this directory. They are copied after the builtin static files,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
html_static_path = ['_static']
|
html_static_path = ["_static"]
|
||||||
html_sidebars = { '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'] }
|
html_sidebars = {
|
||||||
|
"**": ["globaltoc.html", "relations.html", "sourcelink.html", "searchbox.html"]
|
||||||
|
}
|
||||||
|
|
||||||
# -- Options for HTMLHelp output ------------------------------------------
|
# -- Options for HTMLHelp output ------------------------------------------
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
# Output file base name for HTML help builder.
|
||||||
htmlhelp_basename = 'repo2dockerdoc'
|
htmlhelp_basename = "repo2dockerdoc"
|
||||||
|
|
||||||
|
|
||||||
# -- Options for LaTeX output ---------------------------------------------
|
# -- Options for LaTeX output ---------------------------------------------
|
||||||
|
@ -144,15 +148,12 @@ latex_elements = {
|
||||||
# The paper size ('letterpaper' or 'a4paper').
|
# The paper size ('letterpaper' or 'a4paper').
|
||||||
#
|
#
|
||||||
# 'papersize': 'letterpaper',
|
# 'papersize': 'letterpaper',
|
||||||
|
|
||||||
# The font size ('10pt', '11pt' or '12pt').
|
# The font size ('10pt', '11pt' or '12pt').
|
||||||
#
|
#
|
||||||
# 'pointsize': '10pt',
|
# 'pointsize': '10pt',
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
# Additional stuff for the LaTeX preamble.
|
||||||
#
|
#
|
||||||
# 'preamble': '',
|
# 'preamble': '',
|
||||||
|
|
||||||
# Latex figure (float) alignment
|
# Latex figure (float) alignment
|
||||||
#
|
#
|
||||||
# 'figure_align': 'htbp',
|
# 'figure_align': 'htbp',
|
||||||
|
@ -162,8 +163,13 @@ latex_elements = {
|
||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
(master_doc, 'repo2docker.tex', 'repo2docker Documentation',
|
(
|
||||||
'Project Jupyter', 'manual'),
|
master_doc,
|
||||||
|
"repo2docker.tex",
|
||||||
|
"repo2docker Documentation",
|
||||||
|
"Project Jupyter",
|
||||||
|
"manual",
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -171,10 +177,7 @@ latex_documents = [
|
||||||
|
|
||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [(master_doc, "repo2docker", "repo2docker Documentation", [author], 1)]
|
||||||
(master_doc, 'repo2docker', 'repo2docker Documentation',
|
|
||||||
[author], 1)
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Texinfo output -------------------------------------------
|
# -- Options for Texinfo output -------------------------------------------
|
||||||
|
@ -183,13 +186,18 @@ man_pages = [
|
||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [
|
||||||
(master_doc, 'repo2docker', 'repo2docker Documentation',
|
(
|
||||||
author, 'repo2docker', 'One line description of project.',
|
master_doc,
|
||||||
'Miscellaneous'),
|
"repo2docker",
|
||||||
|
"repo2docker Documentation",
|
||||||
|
author,
|
||||||
|
"repo2docker",
|
||||||
|
"One line description of project.",
|
||||||
|
"Miscellaneous",
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Epub output ----------------------------------------------
|
# -- Options for Epub output ----------------------------------------------
|
||||||
|
|
||||||
# Bibliographic Dublin Core info.
|
# Bibliographic Dublin Core info.
|
||||||
|
@ -208,4 +216,4 @@ epub_copyright = copyright
|
||||||
# epub_uid = ''
|
# epub_uid = ''
|
||||||
|
|
||||||
# A list of files that should not be packed into the epub file.
|
# A list of files that should not be packed into the epub file.
|
||||||
epub_exclude_files = ['search.html']
|
epub_exclude_files = ["search.html"]
|
||||||
|
|
Ładowanie…
Reference in New Issue