conf.py 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # Configuration file for the Sphinx documentation builder.
  2. #
  3. # This file only contains a selection of the most common options. For a full
  4. # list see the documentation:
  5. # https://www.sphinx-doc.org/en/master/usage/configuration.html
  6. # -- Path setup --------------------------------------------------------------
  7. # If extensions (or modules to document with autodoc) are in another directory,
  8. # add these directories to sys.path here. If the directory is relative to the
  9. # documentation root, use os.path.abspath to make it absolute, like shown here.
  10. #
  11. # import os
  12. # import sys
  13. # sys.path.insert(0, os.path.abspath('.'))
  14. # -- Project information -----------------------------------------------------
  15. # TODO: change to minigrid version
  16. # from TODO import __version__ as minigrid_version
  17. from __future__ import annotations
  18. import os
  19. import sys
  20. from typing import Any
  21. project = "MiniGrid"
  22. copyright = "2022"
  23. author = "Farama Foundation"
  24. # The full version, including alpha/beta/rc tags
  25. # TODO: change to minigrid version
  26. release = "1.2.1"
  27. sys.path.insert(0, os.path.abspath("../.."))
  28. # -- General configuration ---------------------------------------------------
  29. # Add any Sphinx extension module names here, as strings. They can be
  30. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  31. # ones.
  32. extensions = [
  33. "sphinx.ext.napoleon",
  34. "sphinx.ext.doctest",
  35. "sphinx.ext.autodoc",
  36. "sphinx.ext.githubpages",
  37. "myst_parser",
  38. ]
  39. source_suffix = {
  40. ".rst": "restructuredtext",
  41. ".md": "markdown",
  42. }
  43. # Add any paths that contain templates here, relative to this directory.
  44. templates_path = ["_templates"]
  45. # List of patterns, relative to source directory, that match files and
  46. # directories to ignore when looking for source files.
  47. # This pattern also affects html_static_path and html_extra_path.
  48. exclude_patterns = []
  49. # Napoleon settings
  50. napoleon_use_ivar = True
  51. napoleon_use_admonition_for_references = True
  52. # See https://github.com/sphinx-doc/sphinx/issues/9119
  53. napoleon_custom_sections = [("Returns", "params_style")]
  54. # -- Options for HTML output -------------------------------------------------
  55. # The theme to use for HTML and HTML Help pages. See the documentation for
  56. # a list of builtin themes.
  57. #
  58. html_theme = "furo"
  59. html_title = "MiniGrid Documentation"
  60. html_baseurl = "https://minigrid.farama.org/"
  61. html_copy_source = False
  62. html_favicon = "_static/img/minigrid-favicon.png"
  63. html_theme_options = {
  64. "light_logo": "img/minigrid.svg",
  65. "dark_logo": "img/minigrid-white.svg",
  66. "gtag": "G-FBXJQQLXKD",
  67. }
  68. html_context: dict[str, Any] = {}
  69. html_context["conf_py_path"] = "/docs/"
  70. html_context["display_github"] = True
  71. html_context["github_user"] = "Farama-Foundation"
  72. html_context["github_repo"] = "Minigrid"
  73. html_context["github_version"] = "master"
  74. html_context["slug"] = "minigrid"
  75. html_static_path = ["_static"]
  76. html_css_files = []