conf.py
1 # -*- coding: utf-8 -*- 2 3 import os 4 import sys 5 6 sys.path.insert(0, os.path.abspath("..")) 7 8 # -- General configuration ------------------------------------------------ 9 10 # Add any Sphinx extension module names here, as strings. They can be 11 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 12 # ones. 13 extensions = [ 14 "sphinx.ext.autodoc", 15 "sphinx.ext.intersphinx", 16 "sphinx.ext.napoleon", 17 "sphinx.ext.todo", 18 ] 19 20 # TODO: Please Read! 21 # Uncomment the below if you use native CircuitPython modules such as 22 # digitalio, micropython and busio. List the modules you use. Without it, the 23 # autodoc module docs will fail to generate with a warning. 24 autodoc_mock_imports = [ 25 "audioio", 26 "displayio", 27 "gamepadshift", 28 "neopixel", 29 "analogio", 30 "adafruit_display_shapes", 31 "adafruit_display_text", 32 "terminalio", 33 "adafruit_miniqr", 34 "adafruit_lis3dh", 35 "adafruit_bitmap_font", 36 "adafruit_lsm6ds", 37 "gamepad", 38 "audiocore", 39 "audiopwmio", 40 "micropython", 41 "terminalio", 42 "digitalio", 43 "board", 44 ] 45 46 47 intersphinx_mapping = { 48 "python": ("https://docs.python.org/3.4", None), 49 "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None), 50 } 51 52 # Add any paths that contain templates here, relative to this directory. 53 templates_path = ["_templates"] 54 55 source_suffix = ".rst" 56 57 # The master toctree document. 58 master_doc = "index" 59 60 # General information about the project. 61 project = "Adafruit PyBadger Library" 62 copyright = "2019 Kattni Rembor" 63 author = "Kattni Rembor" 64 65 # The version info for the project you're documenting, acts as replacement for 66 # |version| and |release|, also used in various other places throughout the 67 # built documents. 68 # 69 # The short X.Y version. 70 version = "1.0" 71 # The full version, including alpha/beta/rc tags. 72 release = "1.0" 73 74 # The language for content autogenerated by Sphinx. Refer to documentation 75 # for a list of supported languages. 76 # 77 # This is also used if you do content translation via gettext catalogs. 78 # Usually you set "language" from the command line for these cases. 79 language = None 80 81 # List of patterns, relative to source directory, that match files and 82 # directories to ignore when looking for source files. 83 # This patterns also effect to html_static_path and html_extra_path 84 exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"] 85 86 # The reST default role (used for this markup: `text`) to use for all 87 # documents. 88 # 89 default_role = "any" 90 91 # If true, '()' will be appended to :func: etc. cross-reference text. 92 # 93 add_function_parentheses = True 94 95 # The name of the Pygments (syntax highlighting) style to use. 96 pygments_style = "sphinx" 97 98 # If true, `todo` and `todoList` produce output, else they produce nothing. 99 todo_include_todos = False 100 101 # If this is True, todo emits a warning for each TODO entries. The default is False. 102 todo_emit_warnings = True 103 104 napoleon_numpy_docstring = False 105 106 # -- Options for HTML output ---------------------------------------------- 107 108 # The theme to use for HTML and HTML Help pages. See the documentation for 109 # a list of builtin themes. 110 # 111 on_rtd = os.environ.get("READTHEDOCS", None) == "True" 112 113 if not on_rtd: # only import and set the theme if we're building docs locally 114 try: 115 import sphinx_rtd_theme 116 117 html_theme = "sphinx_rtd_theme" 118 html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] 119 except: 120 html_theme = "default" 121 html_theme_path = ["."] 122 else: 123 html_theme_path = ["."] 124 125 # Add any paths that contain custom static files (such as style sheets) here, 126 # relative to this directory. They are copied after the builtin static files, 127 # so a file named "default.css" will overwrite the builtin "default.css". 128 html_static_path = ["_static"] 129 130 # The name of an image file (relative to this directory) to use as a favicon of 131 # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 132 # pixels large. 133 # 134 html_favicon = "_static/favicon.ico" 135 136 # Output file base name for HTML help builder. 137 htmlhelp_basename = "AdafruitPybadgerLibrarydoc" 138 139 # -- Options for LaTeX output --------------------------------------------- 140 141 latex_elements = { 142 # The paper size ('letterpaper' or 'a4paper'). 143 # 144 # 'papersize': 'letterpaper', 145 # The font size ('10pt', '11pt' or '12pt'). 146 # 147 # 'pointsize': '10pt', 148 # Additional stuff for the LaTeX preamble. 149 # 150 # 'preamble': '', 151 # Latex figure (float) alignment 152 # 153 # 'figure_align': 'htbp', 154 } 155 156 # Grouping the document tree into LaTeX files. List of tuples 157 # (source start file, target name, title, 158 # author, documentclass [howto, manual, or own class]). 159 latex_documents = [ 160 ( 161 master_doc, 162 "AdafruitPyBadgerLibrary.tex", 163 "AdafruitPyBadger Library Documentation", 164 author, 165 "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 = [ 174 ( 175 master_doc, 176 "AdafruitPyBadgerlibrary", 177 "Adafruit PyBadger Library Documentation", 178 [author], 179 1, 180 ) 181 ] 182 183 # -- Options for Texinfo output ------------------------------------------- 184 185 # Grouping the document tree into Texinfo files. List of tuples 186 # (source start file, target name, title, author, 187 # dir menu entry, description, category) 188 texinfo_documents = [ 189 ( 190 master_doc, 191 "AdafruitPyBadgerLibrary", 192 "Adafruit PyBadger Library Documentation", 193 author, 194 "AdafruitPyBadgerLibrary", 195 "One line description of project.", 196 "Miscellaneous", 197 ), 198 ]