summaryrefslogtreecommitdiff
path: root/docs/doc_conventions.rst
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2020-01-15 22:35:40 -0700
committerkotfu <kotfu@kotfu.net>2020-01-15 22:35:40 -0700
commit9a899dcad35335104ba3faf112f954874f13ac3b (patch)
tree21527d8612121fdcbd70df44a8236ab2a7070bd2 /docs/doc_conventions.rst
parent4082e2f39e61fabc202a691f6810a841fbd4ba6c (diff)
downloadcmd2-git-9a899dcad35335104ba3faf112f954874f13ac3b.tar.gz
Clarify how to document instance attributes
Diffstat (limited to 'docs/doc_conventions.rst')
-rw-r--r--docs/doc_conventions.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/doc_conventions.rst b/docs/doc_conventions.rst
index 082235da..e577fd50 100644
--- a/docs/doc_conventions.rst
+++ b/docs/doc_conventions.rst
@@ -140,6 +140,20 @@ and
See :ref:`custom title<features/argument_processing:Help Messages>`
+API Documentation
+-----------------
+
+The API documentation is mostly pulled from docstrings in the source code using
+the Sphinx `autodoc
+<https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html>`_
+extension. However, Sphinx has issues generating documentation for instance
+attributes (see `cmd2 issue 821
+<https://github.com/python-cmd2/cmd2/issues/821>`_ for the full discussion). We
+have chosen to not use code as the source of instance attribute documentation.
+Instead, it is added manually to the documentation files in ``cmd2/docs/api``.
+See ``cmd2/docs/api/cmd.rst`` to see how to add documentation for an attribute.
+
+
Links to API Reference
----------------------