From 3e65a289eb7070a896a9307d50da3333e33ad4c9 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Mon, 23 Oct 2023 17:00:50 -0700 Subject: [PATCH 1/2] INIT this --- documentation/source/conf.py | 27 ++++++++++++++++++++++++--- documentation/source/docstring.rst | 7 +++++++ documentation/source/index.rst | 7 +++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 documentation/source/docstring.rst diff --git a/documentation/source/conf.py b/documentation/source/conf.py index 81c08d95b..449f8bdd5 100644 --- a/documentation/source/conf.py +++ b/documentation/source/conf.py @@ -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' @@ -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'] diff --git a/documentation/source/docstring.rst b/documentation/source/docstring.rst new file mode 100644 index 000000000..cc504d54c --- /dev/null +++ b/documentation/source/docstring.rst @@ -0,0 +1,7 @@ +Docstring +============ + +.. autosummary:: + :toctree: generated + + metadrive \ No newline at end of file diff --git a/documentation/source/index.rst b/documentation/source/index.rst index 114449355..272e9411f 100644 --- a/documentation/source/index.rst +++ b/documentation/source/index.rst @@ -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 From 00f2476f03e463f64657b35df974162883ae5e23 Mon Sep 17 00:00:00 2001 From: pengzhenghao Date: Mon, 23 Oct 2023 17:01:04 -0700 Subject: [PATCH 2/2] INIT this --- documentation/source/docstring.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/source/docstring.rst b/documentation/source/docstring.rst index cc504d54c..3412c5fe1 100644 --- a/documentation/source/docstring.rst +++ b/documentation/source/docstring.rst @@ -4,4 +4,4 @@ Docstring .. autosummary:: :toctree: generated - metadrive \ No newline at end of file + metadrive.scenario.utils \ No newline at end of file