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

Use autodoc to automatically generate documentation pages #524

Closed
wants to merge 2 commits 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
27 changes: 24 additions & 3 deletions documentation/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# -- Project information -----------------------------------------------------

project = 'MetaDrive'
copyright = 'DrivingForce'
author = 'DrivingForce'
copyright = 'MetaDriverse'
author = 'MetaDriverse'

# The full version, including alpha/beta/rc tags
release = '0.1.1'
Expand All @@ -31,9 +31,30 @@
# ones.
extensions = [
"sphinx.ext.autosectionlabel",
"sphinx_rtd_theme"
"sphinx_rtd_theme",
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.napoleon",
'sphinx.ext.autosummary',
]

# See: https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html
# Napoleon settings
napoleon_google_docstring = True
napoleon_numpy_docstring = True
napoleon_include_init_with_doc = True
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = True
napoleon_use_admonition_for_examples = False
napoleon_use_admonition_for_notes = False
napoleon_use_admonition_for_references = False
napoleon_use_ivar = False
napoleon_use_param = True
napoleon_use_rtype = True
napoleon_preprocess_types = False
napoleon_type_aliases = None
napoleon_attr_annotations = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down
7 changes: 7 additions & 0 deletions documentation/source/docstring.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Docstring
============

.. autosummary::
:toctree: generated

metadrive.scenario.utils
7 changes: 7 additions & 0 deletions documentation/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ Please feel free to contact us if you have any suggestions or ideas!

known_issues.rst

.. toctree::
:hidden:
:maxdepth: 2
:caption: Code Docs

docstring.rst


.. raw:: html

Expand Down
Loading