summaryrefslogtreecommitdiffstats
path: root/docs/conf.py
diff options
context:
space:
mode:
authorKlement Sekera <klement.sekera@gmail.com>2022-04-26 19:02:15 +0200
committerOle Tr�an <otroan@employees.org>2022-05-10 18:52:08 +0000
commitd9b0c6fbf7aa5bd9af84264105b39c82028a4a29 (patch)
tree4f786cfd8ebc2443cb11e11b74c8657204068898 /docs/conf.py
parentf90348bcb4afd0af2611cefc43b17ef3042b511c (diff)
tests: replace pycodestyle with black
Drop pycodestyle for code style checking in favor of black. Black is much faster, stable PEP8 compliant code style checker offering also automatic formatting. It aims to be very stable and produce smallest diffs. It's used by many small and big projects. Running checkstyle with black takes a few seconds with a terse output. Thus, test-checkstyle-diff is no longer necessary. Expand scope of checkstyle to all python files in the repo, replacing test-checkstyle with checkstyle-python. Also, fixstyle-python is now available for automatic style formatting. Note: python virtualenv has been consolidated in test/Makefile, test/requirements*.txt which will eventually be moved to a central location. This is required to simply the automated generation of docker executor images in the CI. Type: improvement Change-Id: I022a326603485f58585e879ac0f697fceefbc9c8 Signed-off-by: Klement Sekera <klement.sekera@gmail.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py87
1 files changed, 50 insertions, 37 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 26ccb3f0f7c..550eee8fbe9 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -20,14 +20,16 @@ import subprocess
# -- Project information -----------------------------------------------------
-project = u'The Vector Packet Processor'
-copyright = u'2018-2022, Linux Foundation'
-author = u'FD.io VPP Community'
+project = "The Vector Packet Processor"
+copyright = "2018-2022, Linux Foundation"
+author = "FD.io VPP Community"
# The short X.Y version
version = subprocess.run(["git", "describe"], stdout=subprocess.PIPE, text=True).stdout
# The full version, including alpha/beta/rc tags
-release = subprocess.run(["git", "describe", "--long"], stdout=subprocess.PIPE, text=True).stdout
+release = subprocess.run(
+ ["git", "describe", "--long"], stdout=subprocess.PIPE, text=True
+).stdout
# -- General configuration ---------------------------------------------------
@@ -40,29 +42,27 @@ release = subprocess.run(["git", "describe", "--long"], stdout=subprocess.PIPE,
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
- 'sphinx.ext.autodoc',
- 'sphinx.ext.viewcode',
- 'recommonmark',
- 'sphinxcontrib.spelling']
+ "sphinx.ext.autodoc",
+ "sphinx.ext.viewcode",
+ "recommonmark",
+ "sphinxcontrib.spelling",
+]
-spelling_word_list_filename = 'spelling_wordlist.txt'
+spelling_word_list_filename = "spelling_wordlist.txt"
# do not spell check those files
-spelling_exclude_patterns = ['aboutvpp/releasenotes/*']
+spelling_exclude_patterns = ["aboutvpp/releasenotes/*"]
# 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': 'restructuredtext',
- '.md': 'markdown'
-}
+source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
# The master toctree document.
-master_doc = 'index'
+master_doc = "index"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -74,10 +74,10 @@ language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
-exclude_patterns = ['Thumbs.db', '.DS_Store', '_scripts', 'venv', '_generated']
+exclude_patterns = ["Thumbs.db", ".DS_Store", "_scripts", "venv", "_generated"]
# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'default'
+pygments_style = "default"
# -- Options for HTML output -------------------------------------------------
@@ -88,15 +88,17 @@ pygments_style = 'default'
# import sphinx_theme
-templates_path = ['_templates']
+templates_path = ["_templates"]
html_theme = "sphinx_rtd_theme"
-html_theme_path = ["_themes", ]
+html_theme_path = [
+ "_themes",
+]
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-html_logo = '_static/fd-io_red_white.png'
+html_logo = "_static/fd-io_red_white.png"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -107,11 +109,12 @@ html_logo = '_static/fd-io_red_white.png'
# 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"]
def setup(app):
- app.add_css_file('css/rules.css')
+ app.add_css_file("css/rules.css")
+
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
@@ -127,7 +130,7 @@ def setup(app):
# -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder.
-htmlhelp_basename = 'Vector Packet Processor'
+htmlhelp_basename = "Vector Packet Processor"
# -- Options for LaTeX output ------------------------------------------------
@@ -136,15 +139,12 @@ 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',
@@ -154,9 +154,13 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
- (master_doc, 'Vector Packet Processor.tex',
- u'Vector Packet Processor Documentation',
- u'John DeNisco', 'manual'),
+ (
+ master_doc,
+ "Vector Packet Processor.tex",
+ "Vector Packet Processor Documentation",
+ "John DeNisco",
+ "manual",
+ ),
]
@@ -165,9 +169,13 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- (master_doc, 'Vector Packet Processor',
- u'Vector Packet Processor Documentation',
- [author], 1)
+ (
+ master_doc,
+ "Vector Packet Processor",
+ "Vector Packet Processor Documentation",
+ [author],
+ 1,
+ )
]
@@ -177,10 +185,15 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- (master_doc, 'Vector Packet Processor',
- u'Vector Packet Processor Documentation',
- author, 'Vector Packet Processor', 'One line description of project.',
- 'Miscellaneous'),
+ (
+ master_doc,
+ "Vector Packet Processor",
+ "Vector Packet Processor Documentation",
+ author,
+ "Vector Packet Processor",
+ "One line description of project.",
+ "Miscellaneous",
+ ),
]