Skip to content
François Pacaud edited this page Dec 2, 2015 · 1 revision

Code documentation

To document a given function, one should follow this convention:

"""
Short description of the role of this function. ### Maximum one line, and begin with a verb

Longer description, in several paragraphs. 


Parameters:
- arg1 (Type1)
    Explain what is the role of this input.

- arg2 (Type2)
    Idem

Returns:
- output (TypeOutput)
   Explain what this output is corresponding to. 

"""
function foo(arg1::Type1, arg2::Type2)
   ...

   return output
end

# Module documentation

For a given module , a .rst file must explain the goal of implemented functions and give short examples about usages. This documentation file should be included into the /doc directory.

Clone this wiki locally