From 6c762f88cab6c3714758f63fdd65ceaf023fa03b Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 1 Dec 2020 22:37:55 -0600 Subject: [PATCH 1/2] Flake8 doc/conf --- doc/conf.py | 64 ++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 82b49c7..818be4e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -19,36 +19,36 @@ # import os import sys -sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, os.path.abspath("..")) # -- General configuration ------------------------------------------------ # 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'] +extensions = ["sphinx.ext.autodoc"] # 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 = 'pudb' -copyright = '2017, Andreas Kloeckner and contributors' -author = 'Andreas Kloeckner and contributors' +project = "pudb" +copyright = "2017, Andreas Kloeckner and contributors" +author = "Andreas Kloeckner and contributors" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -58,7 +58,7 @@ author = 'Andreas Kloeckner and contributors' ver_dic = {} with open("../pudb/__init__.py") as ver_file: ver_src = ver_file.read() -exec(compile(ver_src, "../pudb/__init__.py", 'exec'), ver_dic) +exec(compile(ver_src, "../pudb/__init__.py", "exec"), ver_dic) version = ".".join(str(x) for x in ver_dic["VERSION"]) # The full version, including alpha/beta/rc tags. @@ -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 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 @@ -88,7 +88,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" # 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 @@ -106,11 +106,11 @@ html_theme_options = { } html_sidebars = { - '**': [ - 'about.html', - 'navigation.html', - 'relations.html', - 'searchbox.html', + "**": [ + "about.html", + "navigation.html", + "relations.html", + "searchbox.html", ] } @@ -123,35 +123,35 @@ html_sidebars = { # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder. -htmlhelp_basename = 'pudbdoc' +htmlhelp_basename = "pudbdoc" # -- 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, 'pudb.tex', 'pudb Documentation', - 'Andreas Kloeckner and contributors', 'manual'), + (master_doc, "pudb.tex", "pudb Documentation", + "Andreas Kloeckner and contributors", "manual"), ] @@ -160,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, 'pudb', 'pudb Documentation', + (master_doc, "pudb", "pudb Documentation", [author], 1) ] @@ -171,9 +171,9 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'pudb', 'pudb Documentation', - author, 'pudb', 'One line description of project.', - 'Miscellaneous'), + (master_doc, "pudb", "pudb Documentation", + author, "pudb", "One line description of project.", + "Miscellaneous"), ] autoclass_content = "both" -- GitLab From d9be9c01b7cd18eeef75d65e99fb0569fcdea0c6 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 1 Dec 2020 22:39:55 -0600 Subject: [PATCH 2/2] Switch to furo doc theme --- doc/conf.py | 28 +++++----------------------- doc/index.rst | 3 ++- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 818be4e..22d2772 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -31,7 +31,10 @@ sys.path.insert(0, os.path.abspath("..")) # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named "sphinx.ext.*") or your custom # ones. -extensions = ["sphinx.ext.autodoc"] +extensions = [ + "sphinx.ext.autodoc", + "sphinx_copybutton", + ] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -88,32 +91,11 @@ 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" - -# 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. -# -# html_theme_options = {} - -html_theme = "alabaster" +html_theme = "furo" html_theme_options = { - "extra_nav_links": { - "🚀 Github": "https://github.com/inducer/pudb", - "💾 Download Releases": "https://pypi.python.org/pypi/pudb", - } } -html_sidebars = { - "**": [ - "about.html", - "navigation.html", - "relations.html", - "searchbox.html", - ] -} - # 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". diff --git a/doc/index.rst b/doc/index.rst index 7cc66bf..d7fdea4 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -14,7 +14,8 @@ Table of Contents usage shells misc - + 🚀 Github + 💾 Download Releases Indices and Tables ------------------ -- GitLab