Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Add docstring to documentation generation with Sphinx Napoleon #479

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ build:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"
jobs:
pre_build:
- sphinx-apidoc -f -o docs/source/user_guide/reference/autogendocs mani_skill -d 2

# Build documentation in the "docs/" directory with Sphinx
sphinx:
Expand All @@ -29,4 +32,10 @@ sphinx:
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
method: pip
path: .
# Install packages required to build the documentation.
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#module-sphinx.ext.autodoc
extra_requirements:
- dev
3 changes: 2 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
build
source/user_guide/reference/autogendocs
4 changes: 4 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ sphinx-subfigure
sphinxcontrib-video
sphinx-togglebutton
sphinx_design
# For sphinx.ext.autodoc to correctly generate api documentation
torch
torchvision
torchaudio
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"sphinx.ext.autodoc",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"sphinx_copybutton",
"myst_parser",
"sphinx_subfigure",
Expand Down Expand Up @@ -71,3 +72,6 @@

autodoc_typehints = "description"
autodoc_typehints_description_target = "all"

# Other autodoc configurations
autodoc_default_flags = ['members', 'show-inheritance', 'undoc-members']
9 changes: 2 additions & 7 deletions docs/source/user_guide/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ In the beta release we are still in the process of documenting all of the functi
Subpackages:

```{toctree}
:titlesonly:
:maxdepth: 1

mani_skill.envs.sapien_env

mani_skill.utils.common
mani_skill.utils.sapien_utils
:maxdepth: 3
autogendocs/mani_skill
```