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