1+ # Copyright (c) 2022-2025, The Isaac Lab Project Developers.
2+ # All rights reserved.
3+ #
4+ # SPDX-License-Identifier: BSD-3-Clause
5+
6+ # Configuration file for the Sphinx documentation builder.
7+ #
8+ # This file only contains a selection of the most common options. For a full
9+ # list see the documentation:
10+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
11+
12+ # -- Path setup --------------------------------------------------------------
13+
14+ # If extensions (or modules to document with autodoc) are in another directory,
15+ # add these directories to sys.path here. If the directory is relative to the
16+ # documentation root, use os.path.abspath to make it absolute, like shown here.
17+ #
18+ import os
19+
20+
21+ # -- Project information -----------------------------------------------------
22+
23+ project = "BDX-R Project Documentation"
24+ copyright = "2025, BDX-R Project Developers"
25+ author = "BDX-R Project Developers"
26+
27+ # -- General configuration ---------------------------------------------------
28+
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+ "autodocsumm" ,
34+ "myst_parser" ,
35+ "sphinx.ext.napoleon" ,
36+ "sphinxemoji.sphinxemoji" ,
37+ "sphinx.ext.autodoc" ,
38+ "sphinx.ext.autosummary" ,
39+ "sphinx.ext.githubpages" ,
40+ "sphinx.ext.intersphinx" ,
41+ "sphinx.ext.mathjax" ,
42+ "sphinx.ext.todo" ,
43+ "sphinx.ext.viewcode" ,
44+ "sphinxcontrib.bibtex" ,
45+ "sphinxcontrib.icon" ,
46+ "sphinx_copybutton" ,
47+ "sphinx_design" ,
48+ "sphinx_tabs.tabs" , # backwards compatibility for building docs on v1.0.0
49+ "sphinx_multiversion" ,
50+ ]
51+
52+ # mathjax hacks
53+ mathjax3_config = {
54+ "tex" : {
55+ "inlineMath" : [["\\ (" , "\\ )" ]],
56+ "displayMath" : [["\\ [" , "\\ ]" ]],
57+ },
58+ }
59+
60+ # panels hacks
61+ panels_add_bootstrap_css = False
62+ panels_add_fontawesome_css = True
63+
64+ # supported file extensions for source files
65+ source_suffix = {
66+ ".rst" : "restructuredtext" ,
67+ ".md" : "markdown" ,
68+ }
69+
70+ # make sure we don't have any unknown references
71+ # TODO: Enable this by default once we have fixed all the warnings
72+ # nitpicky = True
73+
74+ # put type hints inside the signature instead of the description (easier to maintain)
75+ autodoc_typehints = "signature"
76+ # autodoc_typehints_format = "fully-qualified"
77+ # document class *and* __init__ methods
78+ autoclass_content = "class" #
79+ # separate class docstring from __init__ docstring
80+ autodoc_class_signature = "separated"
81+ # sort members by source order
82+ autodoc_member_order = "bysource"
83+ # inherit docstrings from base classes
84+ autodoc_inherit_docstrings = True
85+ # BibTeX configuration
86+ bibtex_bibfiles = ["source/_static/refs.bib" ]
87+ # generate autosummary even if no references
88+ autosummary_generate = True
89+ autosummary_generate_overwrite = False
90+ # default autodoc settings
91+ autodoc_default_options = {
92+ "autosummary" : True ,
93+ }
94+
95+ # generate links to the documentation of objects in external projects
96+ intersphinx_mapping = {
97+ "python" : ("https://docs.python.org/3" , None ),
98+ }
99+
100+ # Add any paths that contain templates here, relative to this directory.
101+ templates_path = []
102+
103+ # List of patterns, relative to source directory, that match files and
104+ # directories to ignore when looking for source files.
105+ # This pattern also affects html_static_path and html_extra_path.
106+ exclude_patterns = ["_build" , "_redirect" , "_templates" , "Thumbs.db" , ".DS_Store" , "README.md" , "licenses/*" ]
107+
108+ # Mock out modules that are not available on RTD
109+ autodoc_mock_imports = [
110+ "torch" ,
111+ "numpy" ,
112+ "matplotlib" ,
113+ "scipy" ,
114+ "carb" ,
115+ "warp" ,
116+ "pxr" ,
117+ "h5py" ,
118+ "hid" ,
119+ "prettytable" ,
120+ "tqdm" ,
121+ "tensordict" ,
122+ "trimesh" ,
123+ "toml" ,
124+ ]
125+
126+ # List of zero or more Sphinx-specific warning categories to be squelched (i.e.,
127+ # suppressed, ignored).
128+ suppress_warnings = [
129+ # Generally speaking, we do want Sphinx to inform
130+ # us about cross-referencing failures. Remove this entirely after Sphinx
131+ # resolves this open issue:
132+ # https://github.com/sphinx-doc/sphinx/issues/4961
133+ # Squelch mostly ignorable warnings resembling:
134+ # WARNING: more than one target found for cross-reference 'TypeHint':
135+ # beartype.door._doorcls.TypeHint, beartype.door.TypeHint
136+ #
137+ # Sphinx currently emits *MANY* of these warnings against our
138+ # documentation. All of these warnings appear to be ignorable. Although we
139+ # could explicitly squelch *SOME* of these warnings by canonicalizing
140+ # relative to absolute references in docstrings, Sphinx emits still others
141+ # of these warnings when parsing PEP-compliant type hints via static
142+ # analysis. Since those hints are actual hints that *CANNOT* by definition
143+ # by canonicalized, our only recourse is to squelch warnings altogether.
144+ "ref.python" ,
145+ ]
146+
147+ # -- Internationalization ----------------------------------------------------
148+
149+ # specifying the natural language populates some key tags
150+ language = "en"
151+
152+ # -- Options for HTML output -------------------------------------------------
153+
154+ import sphinx_book_theme
155+
156+ html_title = "BDX-R Project Documentation"
157+ html_theme_path = [sphinx_book_theme .get_html_theme_path ()]
158+ html_theme = "sphinx_book_theme"
159+ html_favicon = "source/_static/favicon.ico"
160+ html_show_copyright = True
161+ html_show_sphinx = False
162+ html_last_updated_fmt = "" # to reveal the build date in the pages meta
163+
164+ # Add any paths that contain custom static files (such as style sheets) here,
165+ # relative to this directory. They are copied after the builtin static files,
166+ # so a file named "default.css" will overwrite the builtin "default.css".
167+ html_static_path = ["source/_static/css" ]
168+ html_css_files = ["custom.css" ]
169+
170+ html_theme_options = {
171+ "collapse_navigation" : True ,
172+ "repository_url" : "https://github.com/BDX-R/BDX-R.github.io" ,
173+ "use_repository_button" : True ,
174+ "use_issues_button" : True ,
175+ "use_edit_page_button" : True ,
176+ "show_toc_level" : 1 ,
177+ "use_sidenotes" : True ,
178+ "logo" : {
179+ "text" : "BDX-R Project Documentation" ,
180+ "image_light" : "source/_static/bdx_r_bg.png" ,
181+ "image_dark" : "source/_static/bdx_r_bg.png" ,
182+ },
183+ "icon_links" : [
184+ {
185+ "name" : "GitHub" ,
186+ "url" : "https://github.com/BDX-R/BDX-R.github.io" ,
187+ "icon" : "fa-brands fa-square-github" ,
188+ "type" : "fontawesome" ,
189+ },
190+ ],
191+ "icon_links_label" : "Quick Links" ,
192+ }
193+
194+ templates_path = [
195+ "_templates" ,
196+ ]
197+
198+ # Whitelist pattern for remotes
199+ smv_remote_whitelist = r"^.*$"
200+ # Whitelist pattern for branches (set to None to ignore all branches)
201+ smv_branch_whitelist = os .getenv ("SMV_BRANCH_WHITELIST" , r"^(main|devel)$" )
202+ # Whitelist pattern for tags (set to None to ignore all tags)Add commentMore actions
203+ smv_tag_whitelist = os .getenv ("SMV_TAG_WHITELIST" , r"^v[1-9]\d*\.\d+\.\d+$" )
204+ # html_sidebars = {
205+ # "**": ["navbar-logo.html", "versioning.html", "icon-links.html", "search-field.html", "sbt-sidebar-nav.html"]
206+ # }
207+
208+ html_sidebars = {
209+ "**" : ["navbar-logo.html" , "icon-links.html" , "search-field.html" , "sbt-sidebar-nav.html" ]
210+ }
211+
212+
213+ # -- Advanced configuration -------------------------------------------------
214+
215+
216+ def skip_member (app , what , name , obj , skip , options ):
217+ # List the names of the functions you want to skip here
218+ exclusions = ["from_dict" , "to_dict" , "replace" , "copy" , "validate" , "__post_init__" ]
219+ if name in exclusions :
220+ return True
221+ return None
222+
223+
224+ def setup (app ):
225+ app .connect ("autodoc-skip-member" , skip_member )
0 commit comments