Skip to content

Commit

Permalink
Started standards for writing doc strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahGale committed Nov 13, 2024
1 parent 2bc0d58 commit e080d80
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions doc/source/dev_standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,42 @@ Design Philosophy

Doc Strings
-----------

All public (not ``_private``) classes and functions *must* have doc strings.
Most ``_private`` classes and functions should still be documented for other developers.

Mandatory Elements
^^^^^^^^^^^^^^^^^^

#. One line descriptions.
#. Description of all inputs.
#. Description of return values (can be skipped for None).
#. ``.. versionadded::`` information for all new functions and classes.

.. note::

Class ``__init__`` arguments are documented in the class docstrings and not in ``__init__``.

Highly Recommended.
^^^^^^^^^^^^^^^^^^^

#. A class level ``.. seealso:`` section referencing the user manuals.

.. note::

How to reference manual sections

#. An examples code block.

Example
^^^^^^^

.. code-block:: python
class Cell(Numbered_MCNP_Object):
"""
Test
"""

0 comments on commit e080d80

Please sign in to comment.