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