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 = [ 28 "digitalio", 29 "vectorio", 30 "bitmaptools", 31 "terminalio", 32 "adafruit_display_text", 33 "displayio", 34 "ulab", 35 ] 36 37 38 intersphinx_mapping = { 39 "python": ("https://docs.python.org/3", None), 40 "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None), 41 } 42 43 # Show the docstring from both the class and its __init__() method. 44 autoclass_content = "both" 45 46 # Add any paths that contain templates here, relative to this directory. 47 templates_path = ["_templates"] 48 49 source_suffix = ".rst" 50 51 # The master toctree document. 52 master_doc = "index" 53 54 # General information about the project. 55 project = " CircuitPython scales Library" 56 copyright = "2021-2023 Jose David M." 57 author = "Jose David M." 58 59 # The version info for the project you're documenting, acts as replacement for 60 # |version| and |release|, also used in various other places throughout the 61 # built documents. 62 # 63 # The short X.Y version. 64 version = "1.0" 65 # The full version, including alpha/beta/rc tags. 66 release = "1.0" 67 68 # The language for content autogenerated by Sphinx. Refer to documentation 69 # for a list of supported languages. 70 # 71 # This is also used if you do content translation via gettext catalogs. 72 # Usually you set "language" from the command line for these cases. 73 language = "en" 74 75 # List of patterns, relative to source directory, that match files and 76 # directories to ignore when looking for source files. 77 # This patterns also effect to html_static_path and html_extra_path 78 exclude_patterns = [ 79 "_build", 80 "Thumbs.db", 81 ".DS_Store", 82 ".env", 83 "CODE_OF_CONDUCT.md", 84 ] 85 86 # The reST default role (used for this markup: `text`) to use for all 87 # documents. 88 # 89 default_role = "any" 90 91 # If true, '()' will be appended to :func: etc. cross-reference text. 92 # 93 add_function_parentheses = True 94 95 # The name of the Pygments (syntax highlighting) style to use. 96 pygments_style = "sphinx" 97 98 todo_include_todos = False 99 todo_emit_warnings = False 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 = "CircuitPython_ScalesLibrarydoc" 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 "CircuitPython_scalesLibrary.tex", 155 "CircuitPython scales 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 "CircuitPython_scalesLibrary", 169 "CircuitPython scales 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 "CircuitPython_scalesLibrary", 184 "CircuitPython scales Library Documentation", 185 author, 186 "CircuitPython_scalesLibrary", 187 "One line description of project.", 188 "Miscellaneous", 189 ), 190 ]