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