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 "sphinx.ext.intersphinx", 21 "sphinx.ext.napoleon", 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 = ["ulab", "bitmaptools", "displayio", "bitmaptools"] 28 29 autodoc_preserve_defaults = True 30 31 32 intersphinx_mapping = { 33 "python": ("https://docs.python.org/3", None), 34 "CircuitPython": ("https://docs.circuitpython.org/en/latest/", None), 35 } 36 37 # Show the docstring from both the class and its __init__() method. 38 autoclass_content = "both" 39 40 # Add any paths that contain templates here, relative to this directory. 41 templates_path = ["_templates"] 42 43 source_suffix = ".rst" 44 45 # The master toctree document. 46 master_doc = "index" 47 48 # General information about the project. 49 project = "CircuitPython uboxplot Library" 50 creation_year = "2023" 51 current_year = str(datetime.datetime.now().year) 52 year_duration = ( 53 current_year 54 if current_year == creation_year 55 else creation_year + " - " + current_year 56 ) 57 copyright = year_duration + " Jose D. Montoya" 58 author = "Jose D. Montoya" 59 60 # The version info for the project you're documenting, acts as replacement for 61 # |version| and |release|, also used in various other places throughout the 62 # built documents. 63 # 64 # The short X.Y version. 65 version = "1.0" 66 # The full version, including alpha/beta/rc tags. 67 release = "1.0" 68 69 # The language for content autogenerated by Sphinx. Refer to documentation 70 # for a list of supported languages. 71 # 72 # This is also used if you do content translation via gettext catalogs. 73 # Usually you set "language" from the command line for these cases. 74 language = "en" 75 76 # List of patterns, relative to source directory, that match files and 77 # directories to ignore when looking for source files. 78 # This patterns also effect to html_static_path and html_extra_path 79 exclude_patterns = [ 80 "_build", 81 "Thumbs.db", 82 ".DS_Store", 83 ".env", 84 "CODE_OF_CONDUCT.md", 85 ] 86 87 # The reST default role (used for this markup: `text`) to use for all 88 # documents. 89 # 90 default_role = "any" 91 92 # If true, '()' will be appended to :func: etc. cross-reference text. 93 # 94 add_function_parentheses = True 95 96 # The name of the Pygments (syntax highlighting) style to use. 97 pygments_style = "sphinx" 98 99 todo_include_todos = False 100 101 todo_emit_warnings = True 102 103 napoleon_numpy_docstring = False 104 105 # -- Options for HTML output ---------------------------------------------- 106 107 # The theme to use for HTML and HTML Help pages. See the documentation for 108 # a list of builtin themes. 109 # 110 on_rtd = os.environ.get("READTHEDOCS", None) == "True" 111 112 if not on_rtd: # only import and set the theme if we're building docs locally 113 try: 114 import sphinx_rtd_theme 115 116 html_theme = "sphinx_rtd_theme" 117 html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] 118 except: 119 html_theme = "default" 120 html_theme_path = ["."] 121 else: 122 html_theme_path = ["."] 123 124 # Add any paths that contain custom static files (such as style sheets) here, 125 # relative to this directory. They are copied after the builtin static files, 126 # so a file named "default.css" will overwrite the builtin "default.css". 127 html_static_path = ["_static"] 128 129 # The name of an image file (relative to this directory) to use as a favicon of 130 # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 131 # pixels large. 132 # 133 html_favicon = "_static/favicon.ico" 134 135 # Output file base name for HTML help builder. 136 htmlhelp_basename = "CircuitPython_UBoxplot_Librarydoc"