| 1 |
#!/usr/bin/env python3 |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
# |
| 4 |
# CLI Helpers documentation build configuration file, created by |
| 5 |
# sphinx-quickstart on Mon Apr 17 20:26:02 2017. |
| 6 |
# |
| 7 |
# This file is execfile()d with the current directory set to its |
| 8 |
# containing dir. |
| 9 |
# |
| 10 |
# Note that not all possible configuration values are present in this |
| 11 |
# autogenerated file. |
| 12 |
# |
| 13 |
# All configuration values have a default; values that are commented out |
| 14 |
# serve to show the default. |
| 15 |
|
| 16 |
# If extensions (or modules to document with autodoc) are in another directory, |
| 17 |
# add these directories to sys.path here. If the directory is relative to the |
| 18 |
# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 19 |
# |
| 20 |
import ast |
| 21 |
from collections import OrderedDict |
| 22 |
|
| 23 |
# import os |
| 24 |
import re |
| 25 |
|
| 26 |
# import sys |
| 27 |
# sys.path.insert(0, os.path.abspath('.')) |
| 28 |
|
| 29 |
|
| 30 |
# -- General configuration ------------------------------------------------ |
| 31 |
|
| 32 |
# If your documentation needs a minimal Sphinx version, state it here. |
| 33 |
# |
| 34 |
# needs_sphinx = '1.0' |
| 35 |
|
| 36 |
# Add any Sphinx extension module names here, as strings. They can be |
| 37 |
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 38 |
# ones. |
| 39 |
extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.viewcode"] |
| 40 |
|
| 41 |
# Add any paths that contain templates here, relative to this directory. |
| 42 |
templates_path = ["_templates"] |
| 43 |
|
| 44 |
html_sidebars = { |
| 45 |
"**": [ |
| 46 |
"about.html", |
| 47 |
"navigation.html", |
| 48 |
"relations.html", |
| 49 |
"searchbox.html", |
| 50 |
"donate.html", |
| 51 |
] |
| 52 |
} |
| 53 |
|
| 54 |
# The suffix(es) of source filenames. |
| 55 |
# You can specify multiple suffix as a list of string: |
| 56 |
# |
| 57 |
# source_suffix = ['.rst', '.md'] |
| 58 |
source_suffix = ".rst" |
| 59 |
|
| 60 |
# The master toctree document. |
| 61 |
master_doc = "index" |
| 62 |
|
| 63 |
# General information about the project. |
| 64 |
project = "CLI Helpers" |
| 65 |
author = "dbcli" |
| 66 |
description = "Python helpers for common CLI tasks" |
| 67 |
copyright = "2017, dbcli" |
| 68 |
|
| 69 |
# The version info for the project you're documenting, acts as replacement for |
| 70 |
# |version| and |release|, also used in various other places throughout the |
| 71 |
# built documents. |
| 72 |
# |
| 73 |
_version_re = re.compile(r"__version__\s+=\s+(.*)") |
| 74 |
with open("../../cli_helpers/__init__.py", "rb") as f: |
| 75 |
version = str( |
| 76 |
ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1)) |
| 77 |
) |
| 78 |
|
| 79 |
# The full version, including alpha/beta/rc tags. |
| 80 |
release = version |
| 81 |
|
| 82 |
# The language for content autogenerated by Sphinx. Refer to documentation |
| 83 |
# for a list of supported languages. |
| 84 |
# |
| 85 |
# This is also used if you do content translation via gettext catalogs. |
| 86 |
# Usually you set "language" from the command line for these cases. |
| 87 |
language = None |
| 88 |
|
| 89 |
# List of patterns, relative to source directory, that match files and |
| 90 |
# directories to ignore when looking for source files. |
| 91 |
# This patterns also effect to html_static_path and html_extra_path |
| 92 |
exclude_patterns = [] |
| 93 |
|
| 94 |
# The name of the Pygments (syntax highlighting) style to use. |
| 95 |
pygments_style = "sphinx" |
| 96 |
|
| 97 |
# If true, `todo` and `todoList` produce output, else they produce nothing. |
| 98 |
todo_include_todos = False |
| 99 |
|
| 100 |
|
| 101 |
# -- Options for HTML output ---------------------------------------------- |
| 102 |
|
| 103 |
# The theme to use for HTML and HTML Help pages. See the documentation for |
| 104 |
# a list of builtin themes. |
| 105 |
# |
| 106 |
html_theme = "alabaster" |
| 107 |
|
| 108 |
# Theme options are theme-specific and customize the look and feel of a theme |
| 109 |
# further. For a list of options available for each theme, see the |
| 110 |
# documentation. |
| 111 |
|
| 112 |
nav_links = OrderedDict( |
| 113 |
( |
| 114 |
("CLI Helpers at GitHub", "https://github.com/dbcli/cli_helpers"), |
| 115 |
("CLI Helpers at PyPI", "https://pypi.org/project/cli_helpers"), |
| 116 |
("Issue Tracker", "https://github.com/dbcli/cli_helpers/issues"), |
| 117 |
) |
| 118 |
) |
| 119 |
|
| 120 |
html_theme_options = { |
| 121 |
"description": description, |
| 122 |
"github_user": "dbcli", |
| 123 |
"github_repo": "cli_helpers", |
| 124 |
"github_banner": False, |
| 125 |
"github_button": False, |
| 126 |
"github_type": "watch", |
| 127 |
"github_count": False, |
| 128 |
"extra_nav_links": nav_links, |
| 129 |
} |
| 130 |
|
| 131 |
|
| 132 |
# Add any paths that contain custom static files (such as style sheets) here, |
| 133 |
# relative to this directory. They are copied after the builtin static files, |
| 134 |
# so a file named "default.css" will overwrite the builtin "default.css". |
| 135 |
html_static_path = ["_static"] |
| 136 |
|
| 137 |
|
| 138 |
# -- Options for HTMLHelp output ------------------------------------------ |
| 139 |
|
| 140 |
# Output file base name for HTML help builder. |
| 141 |
htmlhelp_basename = "CLIHelpersdoc" |
| 142 |
|
| 143 |
|
| 144 |
# -- Options for LaTeX output --------------------------------------------- |
| 145 |
|
| 146 |
latex_elements = { |
| 147 |
# The paper size ('letterpaper' or 'a4paper'). |
| 148 |
# |
| 149 |
# 'papersize': 'letterpaper', |
| 150 |
# The font size ('10pt', '11pt' or '12pt'). |
| 151 |
# |
| 152 |
# 'pointsize': '10pt', |
| 153 |
# Additional stuff for the LaTeX preamble. |
| 154 |
# |
| 155 |
# 'preamble': '', |
| 156 |
# Latex figure (float) alignment |
| 157 |
# |
| 158 |
# 'figure_align': 'htbp', |
| 159 |
} |
| 160 |
|
| 161 |
# Grouping the document tree into LaTeX files. List of tuples |
| 162 |
# (source start file, target name, title, |
| 163 |
# author, documentclass [howto, manual, or own class]). |
| 164 |
latex_documents = [ |
| 165 |
(master_doc, "CLIHelpers.tex", "CLI Helpers Documentation", "dbcli", "manual"), |
| 166 |
] |
| 167 |
|
| 168 |
|
| 169 |
# -- Options for manual page output --------------------------------------- |
| 170 |
|
| 171 |
# One entry per manual page. List of tuples |
| 172 |
# (source start file, name, description, authors, manual section). |
| 173 |
man_pages = [(master_doc, "clihelpers", "CLI Helpers Documentation", [author], 1)] |
| 174 |
|
| 175 |
|
| 176 |
# -- Options for Texinfo output ------------------------------------------- |
| 177 |
|
| 178 |
# Grouping the document tree into Texinfo files. List of tuples |
| 179 |
# (source start file, target name, title, author, |
| 180 |
# dir menu entry, description, category) |
| 181 |
texinfo_documents = [ |
| 182 |
( |
| 183 |
master_doc, |
| 184 |
"CLIHelpers", |
| 185 |
"CLI Helpers Documentation", |
| 186 |
author, |
| 187 |
"CLIHelpers", |
| 188 |
description, |
| 189 |
"Miscellaneous", |
| 190 |
), |
| 191 |
] |
| 192 |
|
| 193 |
|
| 194 |
intersphinx_mapping = { |
| 195 |
"python": ("https://docs.python.org/3", None), |
| 196 |
"py2": ("https://docs.python.org/2", None), |
| 197 |
"pymysql": ("https://pymysql.readthedocs.io/en/latest/", None), |
| 198 |
"numpy": ("https://docs.scipy.org/doc/numpy", None), |
| 199 |
"configobj": ("https://configobj.readthedocs.io/en/latest", None), |
| 200 |
} |
| 201 |
|
| 202 |
linkcheck_ignore = ["https://github.com/psf/black.*"] |