conf.py
1 # SPDX-FileCopyrightText: 2023 Jose D. Montoya 2 # 3 # SPDX-License-Identifier: MIT 4 5 import os 6 import sys 7 import datetime 8 9 sys.path.insert(0, os.path.abspath("..")) 10 11 # -- General configuration ------------------------------------------------ 12 13 extensions = [ 14 "sphinx.ext.autodoc", 15 "sphinx.ext.intersphinx", 16 "sphinx.ext.napoleon", 17 "sphinx.ext.viewcode", 18 ] 19 20 intersphinx_mapping = { 21 "python": ("https://docs.python.org/3", None), 22 "CircuitPython": ("https://docs.circuitpython.org/en/latest/", None), 23 } 24 25 autodoc_mock_imports = [ 26 "digitalio", 27 "vectorio", 28 "adafruit_display_shapes", 29 "bitmaptools", 30 "busio", 31 "adafruit_touchscreen", 32 "adafruit_display_text", 33 "displayio", 34 "adafruit_displayio_layout", 35 ] 36 37 autoclass_content = "both" 38 # Add any paths that contain templates here, relative to this directory. 39 templates_path = ["_templates"] 40 source_suffix = ".rst" 41 master_doc = "index" 42 # General information about the project. 43 project = " CircuitPython slider Library" 44 copyright = "2021 Jose David M." 45 author = "Jose David M." 46 47 # The version info for the project you're documenting, acts as replacement for 48 # |version| and |release|, also used in various other places throughout the 49 # built documents. 50 # 51 # The short X.Y version. 52 version = "1.0" 53 # The full version, including alpha/beta/rc tags. 54 release = "1.0" 55 56 language = "en" 57 autoclass_content = "both" 58 # List of patterns, relative to source directory, that match files and 59 # directories to ignore when looking for source files. 60 # This patterns also effect to html_static_path and html_extra_path 61 exclude_patterns = [ 62 "_build", 63 "Thumbs.db", 64 ".DS_Store", 65 ".env", 66 "CODE_OF_CONDUCT.md", 67 ] 68 69 default_role = "any" 70 add_function_parentheses = True 71 pygments_style = "sphinx" 72 todo_include_todos = False 73 todo_emit_warnings = False 74 napoleon_numpy_docstring = False 75 76 # -- Options for HTML output ---------------------------------------------- 77 78 # The theme to use for HTML and HTML Help pages. See the documentation for 79 # a list of builtin themes. 80 # 81 on_rtd = os.environ.get("READTHEDOCS", None) == "True" 82 83 if not on_rtd: # only import and set the theme if we're building docs locally 84 try: 85 import sphinx_rtd_theme 86 87 html_theme = "sphinx_rtd_theme" 88 html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] 89 except: 90 html_theme = "default" 91 html_theme_path = ["."] 92 else: 93 html_theme_path = ["."] 94 95 # Add any paths that contain custom static files (such as style sheets) here, 96 # relative to this directory. They are copied after the builtin static files, 97 # so a file named "default.css" will overwrite the builtin "default.css". 98 html_static_path = ["_static"] 99 100 # The name of an image file (relative to this directory) to use as a favicon of 101 # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 102 # pixels large. 103 # 104 html_favicon = "_static/favicon.ico" 105 106 # Output file base name for HTML help builder. 107 htmlhelp_basename = "CircuitPython_SliderLibrarydoc"