From 79ad9b8d2b7660a79928454209207004775d622c Mon Sep 17 00:00:00 2001 From: Michael Chow Date: Fri, 20 Oct 2023 15:44:52 -0400 Subject: [PATCH 1/2] docs: configuring docstring styles --- docs/get-started/docstring-style.qmd | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/get-started/docstring-style.qmd b/docs/get-started/docstring-style.qmd index d52541c5..9d0587fd 100644 --- a/docs/get-started/docstring-style.qmd +++ b/docs/get-started/docstring-style.qmd @@ -7,7 +7,17 @@ jupyter: name: python3 --- -quartodoc expects numpydoc style for docstrings. +quartodoc prefers numpy style for docstrings, but can support other styles by configuring parser in your [quartodoc site options](./basic-docs.qmd) of `_quarto.yml`: + +```yaml +quartodoc: + parser: google +``` + +Currently, google, sphinx, and numpy are supported. Parsing is handled by the tool [griffe](https://github.com/mkdocstrings/griffe). + +### Resources + See the [numpydoc sections guide][numpydoc] for more information and examples. [numpydoc]: https://numpydoc.readthedocs.io/en/latest/format.html#sections \ No newline at end of file From c1c6abd0298f0fbdef0b7f1bf809036ab329455f Mon Sep 17 00:00:00 2001 From: Michael Chow Date: Fri, 20 Oct 2023 16:22:12 -0400 Subject: [PATCH 2/2] docs: change title to Docstring formats --- docs/get-started/docstring-style.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/get-started/docstring-style.qmd b/docs/get-started/docstring-style.qmd index 9d0587fd..65f536ba 100644 --- a/docs/get-started/docstring-style.qmd +++ b/docs/get-started/docstring-style.qmd @@ -1,5 +1,5 @@ --- -title: numpydoc style +title: Docstring formats jupyter: kernelspec: display_name: Python 3 (ipykernel)