-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Description
Note: for branch rewrite
Let's document all coroutines with @commands.command() with a numpy doc style doc string. We'll later process the doc strings and build a pretty help command for the user. This will allow source to be neater as well. I found this while looking through this source
Take a look at how this could be done:
from numpydoc.docscrape import NumpyDocString
class Photo():
"""
Array with associated photographic information.
Parameters
----------
x : type
Description of parameter `x`.
y
Description of parameter `y` (with type not specified)
Attributes
----------
exposure : float
Exposure in seconds.
Methods
-------
colorspace(c='rgb')
Represent the photo in the given colorspace.
gamma(n=1.0)
Change the photo's gamma exposure.
"""
def __init__(x, y):
print("Snap!")
doc = NumpyDocString(Photo.__doc__)
print(doc["Summary"])
print(doc["Parameters"])
print(doc["Attributes"])
print(doc["Methods"])Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Type
Projects
Status
in progress