From de326d3e29826a2424c0b9c00c89f7e50446fd3f Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 1 Dec 2020 18:28:35 -0600 Subject: [PATCH 1/3] Flake8 doc/conf --- doc/conf.py | 71 +++++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 89834ad..71cae6e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -26,34 +26,34 @@ # If your documentation needs a minimal Sphinx version, state it here. # -# needs_sphinx = '1.0' +# needs_sphinx = "1.0" # 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. -extensions = ['sphinx.ext.autodoc', - 'sphinx.ext.doctest', - 'sphinx.ext.intersphinx', - 'sphinx.ext.mathjax', - 'sphinx.ext.viewcode'] +extensions = ["sphinx.ext.autodoc", + "sphinx.ext.doctest", + "sphinx.ext.intersphinx", + "sphinx.ext.mathjax", + "sphinx.ext.viewcode"] autoclass_content = "class" # 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' +source_suffix = ".rst" # The master toctree document. -master_doc = 'index' +master_doc = "index" # General information about the project. -project = 'pytools' -copyright = '2017, Andreas Kloeckner' -author = 'Andreas Kloeckner' +project = "pytools" +copyright = "2017, Andreas Kloeckner" +author = "Andreas Kloeckner" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -61,7 +61,8 @@ author = 'Andreas Kloeckner' # # The short X.Y version. ver_dic = {} -exec(compile(open("../pytools/version.py").read(), "../pytools/version.py", 'exec'), ver_dic) +exec(compile(open("../pytools/version.py").read(), "../pytools/version.py", "exec"), + ver_dic) version = ".".join(str(x) for x in ver_dic["VERSION"]) release = ver_dic["VERSION_TEXT"] @@ -75,10 +76,10 @@ language = None # 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 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. todo_include_todos = False @@ -89,7 +90,7 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = "alabaster" html_theme_options = { "extra_nav_links": { @@ -99,11 +100,11 @@ html_theme_options = { } html_sidebars = { - '**': [ - 'about.html', - 'navigation.html', - 'relations.html', - 'searchbox.html', + "**": [ + "about.html", + "navigation.html", + "relations.html", + "searchbox.html", ] } @@ -122,35 +123,35 @@ html_sidebars = { # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder. -htmlhelp_basename = 'pytoolsdoc' +htmlhelp_basename = "pytoolsdoc" # -- Options for LaTeX output --------------------------------------------- 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. # - # 'preamble': '', + # "preamble": '', # Latex figure (float) alignment # - # 'figure_align': 'htbp', + # "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, 'pytools.tex', 'pytools Documentation', - 'Andreas Kloeckner', 'manual'), + (master_doc, "pytools.tex", "pytools Documentation", + "Andreas Kloeckner", "manual"), ] @@ -159,7 +160,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'pytools', 'pytools Documentation', + (master_doc, "pytools", "pytools Documentation", [author], 1) ] @@ -170,9 +171,9 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'pytools', 'pytools Documentation', - author, 'pytools', 'One line description of project.', - 'Miscellaneous'), + (master_doc, "pytools", "pytools Documentation", + author, "pytools", "One line description of project.", + "Miscellaneous"), ] -- GitLab From 4f57e5e614bdd1cd9a93f16c35e2d3f0b6bff93c Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 1 Dec 2020 18:39:55 -0600 Subject: [PATCH 2/3] Switch to furo doc theme --- doc/conf.py | 19 +++++-------------- doc/index.rst | 2 ++ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 71cae6e..1972886 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -90,24 +90,15 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "alabaster" +html_theme = "furo" html_theme_options = { - "extra_nav_links": { - "🚀 Github": "https://github.com/inducer/pytools", - "💾 Download Releases": "https://pypi.python.org/pypi/pytools", - } + #"extra_nav_links": { + # "🚀 Github": "https://github.com/inducer/pytools", + # "💾 Download Releases": "https://pypi.python.org/pypi/pytools", + # } } -html_sidebars = { - "**": [ - "about.html", - "navigation.html", - "relations.html", - "searchbox.html", - ] -} - # 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 # documentation. diff --git a/doc/index.rst b/doc/index.rst index 1088516..25f26c6 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -12,6 +12,8 @@ Welcome to pytools's documentation! tag codegen misc + 🚀 Github + 💾 Download Releases Indices and tables ================== -- GitLab From 49d942bb6ea9a9a63f51d94e952c9e247f9aa682 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 1 Dec 2020 18:40:46 -0600 Subject: [PATCH 3/3] Delete commented doc theme options --- doc/conf.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 1972886..b501a31 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -93,10 +93,6 @@ todo_include_todos = False html_theme = "furo" html_theme_options = { - #"extra_nav_links": { - # "🚀 Github": "https://github.com/inducer/pytools", - # "💾 Download Releases": "https://pypi.python.org/pypi/pytools", - # } } # Theme options are theme-specific and customize the look and feel of a theme -- GitLab