Skip to content

Commit

Permalink
docs: black formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
rhiaro authored and michaelwood committed Mar 2, 2021
1 parent 4332e07 commit 8506f87
Showing 1 changed file with 61 additions and 47 deletions.
108 changes: 61 additions & 47 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,38 +31,42 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['recommonmark', 'sphinxcontrib.opendataservices', 'sphinxcontrib.jsonschema']
extensions = [
"recommonmark",
"sphinxcontrib.opendataservices",
"sphinxcontrib.jsonschema",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']

source_suffix = ['.rst', '.md']
source_suffix = [".rst", ".md"]

# The encoding of source files.
#
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'Open Data Services - Standards Lab'
copyright = '2021, Open Data Services'
author = 'Open Data Services'
project = "Open Data Services - Standards Lab"
copyright = "2021, Open Data Services"
author = "Open Data Services"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.0'
version = "0.0"
# The full version, including alpha/beta/rc tags.
release = '0.0'
release = "0.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -83,7 +87,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand All @@ -105,7 +109,7 @@
# show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
Expand All @@ -124,11 +128,13 @@
#
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
import os
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

on_rtd = os.environ.get("READTHEDOCS", None) == "True"

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# otherwise, readthedocs.org uses their theme by default, so no need to specify it

Expand Down Expand Up @@ -164,7 +170,7 @@
# 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,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down Expand Up @@ -244,34 +250,36 @@
# html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = 'sphinxdoc'
htmlhelp_basename = "sphinxdoc"

# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'sphinx.tex', 'Open Data Services Sphinx Base',
'Open Data Services', 'manual'),
(
master_doc,
"sphinx.tex",
"Open Data Services Sphinx Base",
"Open Data Services",
"manual",
),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -311,10 +319,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'sphinx', 'Open Data Services Sphinx Base',
[author], 1)
]
man_pages = [(master_doc, "sphinx", "Open Data Services Sphinx Base", [author], 1)]

# If true, show URL addresses after external links.
#
Expand All @@ -327,9 +332,15 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'sphinx', 'Open Data Services Sphinx Base',
author, 'sphinx', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"sphinx",
"Open Data Services Sphinx Base",
author,
"sphinx",
"One line description of project.",
"Miscellaneous",
),
]

# Documents to append as an appendix to all manuals.
Expand All @@ -349,15 +360,18 @@
# texinfo_no_detailmenu = False


locale_dirs = ['locale/'] # path is example but recommended.
gettext_compact = False # optional.

locale_dirs = ["locale/"] # path is example but recommended.
gettext_compact = False # optional.


def setup(app):
app.add_config_value('recommonmark_config', {
#'url_resolver': lambda url: github_doc_root + url,
'auto_toc_tree_section': 'Contents',
'enable_eval_rst': True
}, True)
app.add_config_value(
"recommonmark_config",
{
#'url_resolver': lambda url: github_doc_root + url,
"auto_toc_tree_section": "Contents",
"enable_eval_rst": True,
},
True,
)
app.add_transform(AutoStructify)

0 comments on commit 8506f87

Please sign in to comment.