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