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