openSUSE / docmanager

Manage DocBook 5 Meta Information
http://opensuse.github.io/docmanager/index.html
GNU General Public License v3.0
6 stars 6 forks source link

Document Function and Classes #7

Closed tomschr closed 9 years ago

tomschr commented 9 years ago

Functions and classes needs to be documented: their purpose, arguments, and argument types. This makes maintenance a lot easier.

There are several ways to do this:

IMHO, Sphinx style would be appropriate. Here is a short example in Sphinx style:

def add(a, b):
    """Adds two numbers

    :param int a: first argument
    :param int b: second argument
    :return:      sum of a and b
    :rtype:       int
    """
    return a+b
tomschr commented 9 years ago

@rsalevsky I've documented almost all function and classes in Sphinx style. However, I was unsure of some functions, their datatypes and purpose.

Could you review and amend the docstrings, please? Look for the "TODO" keyword to simplify this task.

Thanks! :-)

rsalevsky commented 9 years ago

@tomschr LGTM so far, makes the code much more easier to read

tomschr commented 9 years ago

@rsalevsky Thanks. This is now merged from 3830fecd0c4e70ae6b6308b8e511556343d6c9e8 into develop.

However, there are still some functions which were unclear to me. These are still marked as "TODO". ;-) My idea was that you go through this list and add the missing parts. It's only 10 spots, easy to fix.

tomschr commented 9 years ago

@rsalevsky Your TODOs isn't needed anymore. :smile: so closing