-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathconf.py
97 lines (79 loc) · 2.63 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Copyright (c) 2024.
# ProrokLab (https://www.proroklab.org/)
# All rights reserved.
# Configuration file for the Sphinx documentation builder.
import os.path as osp
import sys
import benchmarl_sphinx_theme
import vmas
# -- Project information
project = "VMAS"
copyright = "ProrokLab"
author = "Matteo Bettini"
version = vmas.__version__
# -- General configuration
sys.path.append(osp.join(osp.dirname(benchmarl_sphinx_theme.__file__), "extension"))
extensions = [
"sphinx.ext.duration",
"sphinx.ext.doctest",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinx_gallery.gen_gallery",
"patch",
]
add_module_names = False
autodoc_member_order = "bysource"
toc_object_entries = False
sphinx_gallery_conf = {
"examples_dirs": [
"../../tutorials",
"../../tutorials/environment",
"../../tutorials/scenario",
"../../tutorials/simulator",
], # path to your example scripts
"gallery_dirs": [
"generated/tutorials",
"generated/tutorials/environment",
"generated/tutorials/scenario",
"generated/tutorials/simulator",
], # path to where to save gallery generated output
"doc_module": ("vmas",),
"filename_pattern": ".*", # files to parse
# "notebook_images": "reference/generated/tutorials/media/", # images to parse
"show_memory": True,
}
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
"torch": ("https://pytorch.org/docs/master", None),
"torchrl": ("https://pytorch.org/rl/stable/", None),
"tensordict": ("https://pytorch.org/tensordict/stable", None),
"benchmarl": ("https://benchmarl.readthedocs.io/en/latest/", None),
}
intersphinx_disabled_domains = ["std"]
templates_path = ["_templates"]
html_static_path = [
osp.join(osp.dirname(benchmarl_sphinx_theme.__file__), "static"),
"_static",
]
html_theme = "sphinx_rtd_theme"
# html_logo = (
# "https://raw.githubusercontent.com/matteobettini/benchmarl_sphinx_theme/master/benchmarl"
# "_sphinx_theme/static/img/benchmarl_logo.png"
# )
html_theme_options = {"logo_only": False, "navigation_depth": 2}
# html_favicon = ('')
html_css_files = [
"css/mytheme.css",
]
# -- Options for EPUB output
epub_show_urls = "footnote"
def setup(app):
def rst_jinja_render(app, _, source):
rst_context = {"vmas": vmas}
source[0] = app.builder.templates.render_string(source[0], rst_context)
app.connect("source-read", rst_jinja_render)
app.add_js_file("js/version_alert.js")