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