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