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