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

conf.py 3.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. import pkg_resources
  2. # Configuration file for the Sphinx documentation builder.
  3. #
  4. # For the full list of built-in configuration values, see the documentation:
  5. # https://www.sphinx-doc.org/en/master/usage/configuration.html
  6. # -- General configuration ------------------------------------------------
  7. # If your documentation needs a minimal Sphinx version, state it here.
  8. #
  9. # needs_sphinx = '1.0'
  10. # Add any Sphinx extension module names here, as strings. They can be
  11. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  12. # ones.
  13. extensions = [
  14. "sphinx.ext.autodoc",
  15. "sphinx.ext.todo",
  16. "sphinx.ext.mathjax",
  17. "sphinx.ext.napoleon",
  18. "sphinx.ext.autosectionlabel",
  19. ]
  20. autosectionlabel_prefix_document = True
  21. language = "en_US"
  22. # Add any paths that contain templates here, relative to this directory.
  23. templates_path = ["_templates"]
  24. # The suffix(es) of source filenames.
  25. # You can specify multiple suffix as a list of string:
  26. #
  27. # source_suffix = ['.rst', '.md']
  28. source_suffix = ".rst"
  29. # The master toctree document.
  30. master_doc = "index"
  31. # -- Project information -----------------------------------------------------
  32. # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
  33. project = "learnware"
  34. copyright = "2023, LAMDA Group"
  35. author = "LAMDA Group"
  36. # The version info for the project you're documenting, acts as replacement for
  37. # |version| and |release|, also used in various other places throughout the
  38. # built documents.
  39. #
  40. # The short X.Y version.
  41. version = pkg_resources.get_distribution("learnware").version
  42. # The full version, including alpha/beta/rc tags.
  43. release = pkg_resources.get_distribution("learnware").version
  44. release = "0.1.0.99"
  45. # -- Options for HTML output -------------------------------------------------
  46. # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
  47. # List of patterns, relative to source directory, that match files and
  48. # directories to ignore when looking for source files.
  49. # This patterns also effect to html_static_path and html_extra_path
  50. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
  51. # The name of the Pygments (syntax highlighting) style to use.
  52. pygments_style = "sphinx"
  53. # If true, `todo` and `todoList` produce output, else they produce nothing.
  54. todo_include_todos = False
  55. # If true, '()' will be appended to :func: etc. cross-reference text.
  56. add_function_parentheses = False
  57. # If true, the current module name will be prepended to all description
  58. # unit titles (such as .. function::).
  59. add_module_names = True
  60. # If true, `todo` and `todoList` produce output, else they produce nothing.
  61. todo_include_todos = True
  62. # -- Options for HTML output ----------------------------------------------
  63. # The theme to use for HTML and HTML Help pages. See the documentation for
  64. # a list of builtin themes.
  65. #
  66. html_theme = "sphinx_rtd_theme"
  67. html_logo = "_static/img/logo/logo1.png"
  68. html_theme_options = {
  69. "logo_only": True,
  70. "collapse_navigation": False,
  71. "display_version": False,
  72. "navigation_depth": 4,
  73. }
  74. # Custom sidebar templates, must be a dictionary that maps document names
  75. # to template names.
  76. #
  77. # This is required for the alabaster theme
  78. # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
  79. html_sidebars = {
  80. "**": [
  81. "about.html",
  82. "navigation.html",
  83. "relations.html", # needs 'show_related': True theme option to display
  84. "searchbox.html",
  85. ]
  86. }
  87. # -- Options for HTMLHelp output ------------------------------------------
  88. # Output file base name for HTML help builder.
  89. htmlhelp_basename = "learnwaredoc"
  90. autodoc_member_order = "bysource"
  91. autodoc_default_flags = ["members"]
  92. autodoc_default_options = {
  93. "members": True,
  94. "member-order": "bysource",
  95. "special-members": "__init__",
  96. }