Skip to content
This repository was archived by the owner on Jul 2, 2019. It is now read-only.
This repository was archived by the owner on Jul 2, 2019. It is now read-only.

Write docstrings for all functions in inferenceTools #94

Open
@nrweir

Description

@nrweir

Write docstrings for all functions

We need to begin writing docstrings for all of the functions in the package.

Important components:

  • Single-line (<80 character) one-line summary.
  • Description of each argument, including type, possible value(s), whether or not the argument is required, and any other important information for the user to understand how to use that argument.
  • Description of what the function returns, including type and any other information required to understand the outputs.
  • Any further description needed to understand usage.

Example:

def rescale_image(image_input, lower_limit=0, upper_limit=255):
    """Re-scale image intensities.
    
    Arguments:
    ------------
    image_input (numpy array of ints, required): An image in numpy array format. Values should be 
        integers.
    lower_limit (int, optional): Lower limit for original pixel intensity values. Defaults to 0.
    upper_limit(int, optional): Upper limit for original pixel intensity values. Defaults to 255.

    Returns:
    ---------
    A numpy array of the same dtype with values in the range (lower_limit, upper_limit)
    rescaled to [0, 255].
    """
    
    (Function defined here)

Format: If authors want to add docstrings in whatever format you like, feel free, but these will eventually need to be formatted according to Sphinx formats, so if you put in the work to use that style you'll be cutting out future re-structuring effort.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions