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.7 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. import pkg_resources
  2. import sphinx_book_theme
  3. # Configuration file for the Sphinx documentation builder.
  4. #
  5. # For the full list of built-in configuration values, see the documentation:
  6. # https://www.sphinx-doc.org/en/master/usage/configuration.html
  7. # -- General configuration ------------------------------------------------
  8. # If your documentation needs a minimal Sphinx version, state it here.
  9. #
  10. # needs_sphinx = '1.0'
  11. # Add any Sphinx extension module names here, as strings. They can be
  12. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  13. # ones.
  14. extensions = [
  15. "sphinx.ext.autodoc",
  16. "sphinx.ext.todo",
  17. "sphinx.ext.mathjax",
  18. "sphinx.ext.napoleon",
  19. "sphinx.ext.autosectionlabel",
  20. ]
  21. autosectionlabel_prefix_document = True
  22. language = "en_US"
  23. # Add any paths that contain templates here, relative to this directory.
  24. templates_path = ["_templates"]
  25. # The suffix(es) of source filenames.
  26. # You can specify multiple suffix as a list of string:
  27. #
  28. # source_suffix = ['.rst', '.md']
  29. source_suffix = ".rst"
  30. # The master toctree document.
  31. master_doc = "index"
  32. # -- Project information -----------------------------------------------------
  33. # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
  34. project = "learnware"
  35. copyright = "2023, LAMDA Group"
  36. author = "LAMDA Group"
  37. # The version info for the project you're documenting, acts as replacement for
  38. # |version| and |release|, also used in various other places throughout the
  39. # built documents.
  40. #
  41. # The short X.Y version.
  42. version = pkg_resources.get_distribution("learnware").version
  43. # The full version, including alpha/beta/rc tags.
  44. release = pkg_resources.get_distribution("learnware").version
  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_book_theme"
  67. html_theme_path = [sphinx_book_theme.get_html_theme_path()]
  68. html_theme_options = {
  69. "logo_only": True,
  70. "collapse_navigation": False,
  71. # "display_version": False,
  72. "navigation_depth": 4,
  73. }
  74. html_logo = "_static/img/logo/logo1.png"
  75. # These folders are copied to the documentation's HTML output
  76. html_static_path = ['_static']
  77. # These paths are either relative to html_static_path
  78. # or fully qualified paths (eg. https://...)
  79. html_css_files = [
  80. 'css/custom_style.css',
  81. ]
  82. # -- Options for HTMLHelp output ------------------------------------------
  83. # Output file base name for HTML help builder.
  84. htmlhelp_basename = "learnwaredoc"
  85. autodoc_member_order = "bysource"
  86. autodoc_default_flags = ["members"]
  87. autodoc_default_options = {
  88. "members": True,
  89. "member-order": "bysource",
  90. "special-members": "__init__",
  91. }