|
- import pkg_resources
- import sphinx_book_theme
-
- # Configuration file for the Sphinx documentation builder.
- #
- # For the full list of built-in configuration values, see the documentation:
- # https://www.sphinx-doc.org/en/master/usage/configuration.html
-
- # -- General configuration ------------------------------------------------
-
- # If your documentation needs a minimal Sphinx version, state it here.
- #
- # needs_sphinx = '1.0'
-
- # Add any Sphinx extension module names here, as strings. They can be
- # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
- # ones.
- extensions = [
- "sphinx.ext.autodoc",
- "sphinx.ext.todo",
- "sphinx.ext.mathjax",
- "sphinx.ext.napoleon",
- "sphinx.ext.autosectionlabel",
- ]
-
- autosectionlabel_prefix_document = True
-
- language = "en_US"
-
- # Add any paths that contain templates here, relative to this directory.
- templates_path = ["_templates"]
-
- # The suffix(es) of source filenames.
- # You can specify multiple suffix as a list of string:
- #
- # source_suffix = ['.rst', '.md']
- source_suffix = ".rst"
-
- # The master toctree document.
- master_doc = "index"
-
-
- # -- Project information -----------------------------------------------------
- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
-
- project = "learnware"
- copyright = "2023, LAMDA Group"
- author = "LAMDA Group"
-
- # The version info for the project you're documenting, acts as replacement for
- # |version| and |release|, also used in various other places throughout the
- # built documents.
- #
- # The short X.Y version.
- version = pkg_resources.get_distribution("learnware").version
- # The full version, including alpha/beta/rc tags.
- release = pkg_resources.get_distribution("learnware").version
-
-
- # -- Options for HTML output -------------------------------------------------
- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
-
-
- # List of patterns, relative to source directory, that match files and
- # directories to ignore when looking for source files.
- # This patterns also effect to html_static_path and html_extra_path
- exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
-
- # The name of the Pygments (syntax highlighting) style to use.
- pygments_style = "sphinx"
-
- # If true, `todo` and `todoList` produce output, else they produce nothing.
- todo_include_todos = False
-
- # If true, '()' will be appended to :func: etc. cross-reference text.
- add_function_parentheses = False
-
- # If true, the current module name will be prepended to all description
- # unit titles (such as .. function::).
- add_module_names = True
-
- # If true, `todo` and `todoList` produce output, else they produce nothing.
- todo_include_todos = True
-
-
- # -- Options for HTML output ----------------------------------------------
-
- # The theme to use for HTML and HTML Help pages. See the documentation for
- # a list of builtin themes.
- #
- html_theme = "sphinx_book_theme"
- html_theme_path = [sphinx_book_theme.get_html_theme_path()]
- html_theme_options = {
- "logo_only": True,
- "collapse_navigation": False,
- # "display_version": False,
- "navigation_depth": 4,
- }
- html_logo = "_static/img/logo/logo1.png"
-
-
- # These folders are copied to the documentation's HTML output
- html_static_path = ['_static']
-
- # These paths are either relative to html_static_path
- # or fully qualified paths (eg. https://...)
- html_css_files = [
- 'css/custom_style.css',
- ]
-
- # -- Options for HTMLHelp output ------------------------------------------
-
- # Output file base name for HTML help builder.
- htmlhelp_basename = "learnwaredoc"
-
-
- autodoc_member_order = "bysource"
- autodoc_default_flags = ["members"]
- autodoc_default_options = {
- "members": True,
- "member-order": "bysource",
- "special-members": "__init__",
- }
|