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