conf.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import datetime
  2. import pathlib
  3. import sys
  4. base = pathlib.Path(__file__).parent.parent.parent
  5. root = base.__str__()
  6. flipperzero = base.joinpath("flipperzero").__str__()
  7. sys.path.append(root)
  8. sys.path.append(flipperzero)
  9. def copy_dict(source, target):
  10. for key, value in source.__dict__.items():
  11. target.__dict__[key] = value
  12. import flipperzero.logging
  13. import logging
  14. copy_dict(flipperzero.logging, logging)
  15. import flipperzero.io
  16. import io
  17. copy_dict(flipperzero.io, io)
  18. now = datetime.datetime.now()
  19. project = "uPython"
  20. copyright = str(now.year) + ", Oliver Fabel"
  21. author = "Oliver Fabel"
  22. release = "1.5.0"
  23. version = "1.5"
  24. language = "en"
  25. extensions = ["sphinx.ext.autodoc", "myst_parser"]
  26. source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
  27. templates_path = ["templates"]
  28. exclude_patterns = []
  29. include_patterns = ["**"]
  30. html_theme = "alabaster"
  31. html_theme_options = {
  32. "show_powered_by": False,
  33. "extra_nav_links": {
  34. "Source Code": "https://www.github.com/ofabel/mp-flipper",
  35. "Bugtracker": "https://www.github.com/ofabel/mp-flipper/issues",
  36. "Releases": "https://lab.flipper.net/apps/upython",
  37. },
  38. }
  39. html_scaled_image_link = False
  40. html_copy_source = False
  41. html_show_copyright = False
  42. html_show_sphinx = False
  43. html_static_path = ["static"]
  44. html_logo = "assets/logo.png"
  45. html_favicon = "assets/favicon.png"
  46. autodoc_default_options = {
  47. "member-order": "bysource",
  48. }
  49. add_module_names = True
  50. maximum_signature_line_length = 50