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