You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
5.2 KiB

  1. # -*- coding: utf-8 -*-
  2. import os
  3. import sys
  4. sys.path.insert(0, os.path.abspath(".."))
  5. # -- General configuration ------------------------------------------------
  6. # Add any Sphinx extension module names here, as strings. They can be
  7. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  8. # ones.
  9. extensions = [
  10. "sphinx.ext.autodoc",
  11. "sphinx.ext.intersphinx",
  12. "sphinx.ext.napoleon",
  13. "sphinx.ext.todo",
  14. ]
  15. # Uncomment the below if you use native CircuitPython modules such as
  16. # digitalio, micropython and busio. List the modules you use. Without it, the
  17. # autodoc module docs will fail to generate with a warning.
  18. autodoc_mock_imports = ["machine"]
  19. intersphinx_mapping = {
  20. "python": ("https://docs.python.org/3.5", None),
  21. "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
  22. }
  23. # Add any paths that contain templates here, relative to this directory.
  24. templates_path = ["_templates"]
  25. source_suffix = ".rst"
  26. # The master toctree document.
  27. master_doc = "index"
  28. # General information about the project.
  29. project = "Adafruit Blinka Library"
  30. copyright = "2017 Adafruit Industries"
  31. author = "Brennen Bearnes"
  32. # The version info for the project you're documenting, acts as replacement for
  33. # |version| and |release|, also used in various other places throughout the
  34. # built documents.
  35. #
  36. # The short X.Y version.
  37. version = "1.0.0"
  38. # The full version, including alpha/beta/rc tags.
  39. release = "1.0.0"
  40. # The language for content autogenerated by Sphinx. Refer to documentation
  41. # for a list of supported languages.
  42. #
  43. # This is also used if you do content translation via gettext catalogs.
  44. # Usually you set "language" from the command line for these cases.
  45. language = None
  46. # List of patterns, relative to source directory, that match files and
  47. # directories to ignore when looking for source files.
  48. # This patterns also effect to html_static_path and html_extra_path
  49. exclude_patterns = [
  50. "_build",
  51. "Thumbs.db",
  52. ".DS_Store",
  53. ".env",
  54. "CODE_OF_CONDUCT.md",
  55. ]
  56. # The reST default role (used for this markup: `text`) to use for all
  57. # documents.
  58. #
  59. default_role = "any"
  60. # If true, '()' will be appended to :func: etc. cross-reference text.
  61. #
  62. add_function_parentheses = True
  63. # The name of the Pygments (syntax highlighting) style to use.
  64. pygments_style = "sphinx"
  65. # If true, `todo` and `todoList` produce output, else they produce nothing.
  66. todo_include_todos = False
  67. # If this is True, todo emits a warning for each TODO entries. The default is False.
  68. todo_emit_warnings = True
  69. napoleon_numpy_docstring = False
  70. # -- Options for HTML output ----------------------------------------------
  71. # The theme to use for HTML and HTML Help pages. See the documentation for
  72. # a list of builtin themes.
  73. #
  74. on_rtd = os.environ.get("READTHEDOCS", None) == "True"
  75. if not on_rtd: # only import and set the theme if we're building docs locally
  76. try:
  77. import sphinx_rtd_theme
  78. html_theme = "sphinx_rtd_theme"
  79. html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
  80. except:
  81. html_theme = "default"
  82. html_theme_path = ["."]
  83. else:
  84. html_theme_path = ["."]
  85. # Add any paths that contain custom static files (such as style sheets) here,
  86. # relative to this directory. They are copied after the builtin static files,
  87. # so a file named "default.css" will overwrite the builtin "default.css".
  88. html_static_path = ["_static"]
  89. # The name of an image file (relative to this directory) to use as a favicon of
  90. # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
  91. # pixels large.
  92. #
  93. html_favicon = "_static/favicon.ico"
  94. # Output file base name for HTML help builder.
  95. htmlhelp_basename = "AdafruitPlatformDetectLibrarydoc"
  96. # -- Options for LaTeX output ---------------------------------------------
  97. latex_elements = {
  98. # The paper size ('letterpaper' or 'a4paper').
  99. # 'papersize': 'letterpaper',
  100. # The font size ('10pt', '11pt' or '12pt').
  101. # 'pointsize': '10pt',
  102. # Additional stuff for the LaTeX preamble.
  103. # 'preamble': '',
  104. # Latex figure (float) alignment
  105. # 'figure_align': 'htbp',
  106. }
  107. # Grouping the document tree into LaTeX files. List of tuples
  108. # (source start file, target name, title,
  109. # author, documentclass [howto, manual, or own class]).
  110. latex_documents = [
  111. (
  112. master_doc,
  113. "AdafruitPlatformDetectLibrary.tex",
  114. "AdafruitPlatformDetect Library Documentation",
  115. author,
  116. "manual",
  117. ),
  118. ]
  119. # -- Options for manual page output ---------------------------------------
  120. # One entry per manual page. List of tuples
  121. # (source start file, name, description, authors, manual section).
  122. man_pages = [
  123. (
  124. master_doc,
  125. "AdafruitPlatformDetectlibrary",
  126. "Adafruit PlatformDetect Library Documentation",
  127. [author],
  128. 1,
  129. )
  130. ]
  131. # -- Options for Texinfo output -------------------------------------------
  132. # Grouping the document tree into Texinfo files. List of tuples
  133. # (source start file, target name, title, author,
  134. # dir menu entry, description, category)
  135. texinfo_documents = [
  136. (
  137. master_doc,
  138. "AdafruitPlatformDetectLibrary",
  139. "Adafruit PlatformDetect Library Documentation",
  140. author,
  141. "AdafruitPlatformDetectLibrary",
  142. "One line description of project.",
  143. "Miscellaneous",
  144. ),
  145. ]