conf.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. import flipperzero.random
  19. import random
  20. copy_dict(flipperzero.random, random)
  21. now = datetime.datetime.now()
  22. project = 'uPython'
  23. copyright = str(now.year) + ', Oliver Fabel'
  24. author = 'Oliver Fabel'
  25. release = '1.8.0'
  26. version = '1.8'
  27. language = 'en'
  28. extensions = ["sphinx.ext.autodoc", "myst_parser"]
  29. source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
  30. templates_path = ["templates"]
  31. exclude_patterns = []
  32. include_patterns = ["**"]
  33. html_theme = "alabaster"
  34. html_theme_options = {
  35. "show_powered_by": False,
  36. "extra_nav_links": {
  37. "Source Code": "https://www.github.com/ofabel/mp-flipper",
  38. "Bugtracker": "https://www.github.com/ofabel/mp-flipper/issues",
  39. "Releases": "https://lab.flipper.net/apps/upython",
  40. },
  41. }
  42. html_scaled_image_link = False
  43. html_copy_source = False
  44. html_show_copyright = False
  45. html_show_sphinx = False
  46. html_static_path = ["static"]
  47. html_logo = "assets/logo.png"
  48. html_favicon = "assets/favicon.png"
  49. autodoc_default_options = {
  50. "member-order": "bysource",
  51. }
  52. add_module_names = True
  53. maximum_signature_line_length = 50