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 "supervisor", 26 "storage", 27 "analogio", 28 "boardtest_gpio", 29 "boardtest_i2c", 30 "boardtest_led", 31 "boardtest_sd", 32 "boardtest_sd_cd", 33 "boardtest_spi", 34 "boardtest_uart", 35 "boardtest_voltage_monitor", 36 ] 37 38 39 intersphinx_mapping = { 40 "python": ("https://docs.python.org/3.4", None), 41 "BusDevice": ( 42 "https://circuitpython.readthedocs.io/projects/busdevice/en/latest/", 43 None, 44 ), 45 "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None), 46 } 47 48 # Add any paths that contain templates here, relative to this directory. 49 templates_path = ["_templates"] 50 51 source_suffix = ".rst" 52 53 # The master toctree document. 54 master_doc = "index" 55 56 # General information about the project. 57 project = "Adafruit BoardTest Library" 58 copyright = "2018 Shawn Hymel" 59 author = "Shawn Hymel" 60 61 # The version info for the project you're documenting, acts as replacement for 62 # |version| and |release|, also used in various other places throughout the 63 # built documents. 64 # 65 # The short X.Y version. 66 version = "1.0" 67 # The full version, including alpha/beta/rc tags. 68 release = "1.0" 69 70 # The language for content autogenerated by Sphinx. Refer to documentation 71 # for a list of supported languages. 72 # 73 # This is also used if you do content translation via gettext catalogs. 74 # Usually you set "language" from the command line for these cases. 75 language = None 76 77 # List of patterns, relative to source directory, that match files and 78 # directories to ignore when looking for source files. 79 # This patterns also effect to html_static_path and html_extra_path 80 exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"] 81 82 # The reST default role (used for this markup: `text`) to use for all 83 # documents. 84 # 85 default_role = "any" 86 87 # If true, '()' will be appended to :func: etc. cross-reference text. 88 # 89 add_function_parentheses = True 90 91 # The name of the Pygments (syntax highlighting) style to use. 92 pygments_style = "sphinx" 93 94 # If true, `todo` and `todoList` produce output, else they produce nothing. 95 todo_include_todos = False 96 97 # If this is True, todo emits a warning for each TODO entries. The default is False. 98 todo_emit_warnings = True 99 100 napoleon_numpy_docstring = False 101 102 # -- Options for HTML output ---------------------------------------------- 103 104 # The theme to use for HTML and HTML Help pages. See the documentation for 105 # a list of builtin themes. 106 # 107 on_rtd = os.environ.get("READTHEDOCS", None) == "True" 108 109 if not on_rtd: # only import and set the theme if we're building docs locally 110 try: 111 import sphinx_rtd_theme 112 113 html_theme = "sphinx_rtd_theme" 114 html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] 115 except: 116 html_theme = "default" 117 html_theme_path = ["."] 118 else: 119 html_theme_path = ["."] 120 121 # Add any paths that contain custom static files (such as style sheets) here, 122 # relative to this directory. They are copied after the builtin static files, 123 # so a file named "default.css" will overwrite the builtin "default.css". 124 html_static_path = ["_static"] 125 126 # The name of an image file (relative to this directory) to use as a favicon of 127 # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 128 # pixels large. 129 # 130 html_favicon = "_static/favicon.ico" 131 132 # Output file base name for HTML help builder. 133 htmlhelp_basename = "AdafruitBoardtestLibrarydoc" 134 135 # -- Options for LaTeX output --------------------------------------------- 136 137 latex_elements = { 138 # The paper size ('letterpaper' or 'a4paper'). 139 # 140 # 'papersize': 'letterpaper', 141 # The font size ('10pt', '11pt' or '12pt'). 142 # 143 # 'pointsize': '10pt', 144 # Additional stuff for the LaTeX preamble. 145 # 146 # 'preamble': '', 147 # Latex figure (float) alignment 148 # 149 # 'figure_align': 'htbp', 150 } 151 152 # Grouping the document tree into LaTeX files. List of tuples 153 # (source start file, target name, title, 154 # author, documentclass [howto, manual, or own class]). 155 latex_documents = [ 156 ( 157 master_doc, 158 "AdafruitBoardTestLibrary.tex", 159 "AdafruitBoardTest Library Documentation", 160 author, 161 "manual", 162 ), 163 ] 164 165 # -- Options for manual page output --------------------------------------- 166 167 # One entry per manual page. List of tuples 168 # (source start file, name, description, authors, manual section). 169 man_pages = [ 170 ( 171 master_doc, 172 "AdafruitBoardTestlibrary", 173 "Adafruit BoardTest Library Documentation", 174 [author], 175 1, 176 ) 177 ] 178 179 # -- Options for Texinfo output ------------------------------------------- 180 181 # Grouping the document tree into Texinfo files. List of tuples 182 # (source start file, target name, title, author, 183 # dir menu entry, description, category) 184 texinfo_documents = [ 185 ( 186 master_doc, 187 "AdafruitBoardTestLibrary", 188 "Adafruit BoardTest Library Documentation", 189 author, 190 "AdafruitBoardTestLibrary", 191 "One line description of project.", 192 "Miscellaneous", 193 ), 194 ]