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