Skip to content

Add complete docstrings for all functions and classes in MAIA (numpy format) and helpers for MAIA_scripts #86

@SimoneBendazzoli93

Description

@SimoneBendazzoli93

Summary

Add comprehensive docstrings to all functions and classes in the MAIA package using the numpy docstring format. Also, update helper scripts in MAIA_scripts to include detailed argument parser sections and usage examples following the provided template.

Details

  • Review all functions and classes in the core MAIA package and ensure each has a complete docstring in numpy format, detailing parameters, return types, exceptions, and example usage where relevant.
  • For scripts in MAIA_scripts, add (or update) the argument parser docstring and usage section using the following template:
version = MAIA.__version__

TIMESTAMP = "{:%Y-%m-%d_%H-%M-%S}".format(datetime.datetime.now())

DESC = dedent(
    """
  DESCRIPTION
    """  # noqa: E501
)
EPILOG = dedent(
    """
    Example call:
    ::
        {filename} --ARGUMENTS
    """.format(  # noqa: E501
        filename=Path(__file__).stem
    )
)

def get_arg_parser():
    pars = ArgumentParser(description=DESC, epilog=EPILOG, formatter_class=RawTextHelpFormatter)
    <ARGUMENTS>
    pars.add_argument("-v", "--version", action="version", version="%(prog)s " + version)
    return pars

def main():
    arg_parser = get_arg_parser()
    args = arg_parser.parse_args()
  • Replace <ARGUMENTS> with the full specification for each script, and ensure all arguments are documented.

Acceptance Criteria

  • Every function and class in MAIA has a numpy-style docstring.
  • Every script in MAIA_scripts uses the provided docstring and usage template, with a comprehensive description and example call.

Labels: documentation, enhancement
Type: Task

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions