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