conf.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 = [
  29. 'sphinx.ext.autodoc',
  30. 'myst_parser'
  31. ]
  32. source_suffix = {
  33. '.rst': 'restructuredtext',
  34. '.md': 'markdown'
  35. }
  36. templates_path = [
  37. 'templates'
  38. ]
  39. exclude_patterns = []
  40. include_patterns = [
  41. '**'
  42. ]
  43. html_theme = 'alabaster'
  44. html_theme_options = {
  45. 'show_powered_by': False,
  46. 'extra_nav_links': {
  47. 'Source Code': 'https://www.github.com/ofabel/mp-flipper',
  48. 'Bugtracker': 'https://www.github.com/ofabel/mp-flipper/issues',
  49. 'Releases': 'https://lab.flipper.net/apps/upython'
  50. }
  51. }
  52. html_scaled_image_link = False
  53. html_copy_source = False
  54. html_show_copyright = False
  55. html_show_sphinx = False
  56. html_static_path = [
  57. 'static'
  58. ]
  59. html_logo = 'assets/logo.png'
  60. html_favicon = 'assets/favicon.png'
  61. autodoc_default_options = {
  62. 'member-order': 'bysource',
  63. }
  64. add_module_names = True
  65. maximum_signature_line_length = 50