Add documentation for MJX API

PiperOrigin-RevId: 860108133
Change-Id: I85469efcfe49d320ef8b89c9d174f33499a22b31
This commit is contained in:
Taylor Howell
2026-01-23 07:52:27 -08:00
committed by Copybara-Service
parent c55c9a7bf1
commit 4a64017a5f
7 changed files with 204 additions and 24 deletions
+27
View File
@@ -78,6 +78,33 @@ add_module_names = False
toc_object_entries_show_parents = 'hide'
default_role = 'literal'
# Suppress warnings from docstrings with RST formatting issues
def setup(app):
import logging
class SphinxWarningFilter(logging.Filter):
def filter(self, record):
msg = record.getMessage()
# e.g. qpos0: qpos values at default pose (*, nq)
if 'Inline emphasis start-string' in msg:
return False
# e.g. see `name` for details
if 'Inline interpreted text' in msg:
return False
# e.g. multi-line definition without trailing blank line
if 'Definition list ends without a blank line' in msg:
return False
# e.g. mjsactuator_ reference in C++ docstrings
if 'Unknown target name' in msg:
return False
return True
for handler in logging.getLogger('sphinx').handlers:
handler.addFilter(SphinxWarningFilter())
# GitHub-related options
github_username = 'google-deepmind'
github_repository = 'mujoco'