Add Tutorials using sphinx-gallery and other template updates (#56)

This commit is contained in:
Manuel Goulão
2022-10-16 14:54:03 +01:00
committed by GitHub
parent a11a26b07f
commit 1b6b0975c9
8 changed files with 53 additions and 6 deletions

View File

@@ -15,8 +15,11 @@
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
import os
from typing import Any, Dict
from furo import gen_tutorials
import gymnasium
project = "Gymnasium"
@@ -46,7 +49,7 @@ templates_path = ["_templates"]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
exclude_patterns = ["tutorials/demo.rst"]
# Napoleon settings
napoleon_use_ivar = True
@@ -71,6 +74,8 @@ html_theme_options = {
"light_logo": "img/gymnasium_black.svg",
"dark_logo": "img/gymnasium_white.svg",
"gtag": "G-6H9C8TWXZ8",
"description": "A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym)",
"image": "img/gymnasium-github.png",
}
html_context: Dict[str, Any] = {}
html_context["conf_py_path"] = "/docs/"
@@ -82,3 +87,9 @@ html_context["slug"] = "gymnasium"
html_static_path = ["_static"]
html_css_files = []
# -- Generate Tutorials -------------------------------------------------
gen_tutorials.generate(
os.path.join(os.path.dirname(__file__), "tutorials"),
)