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