bilby_pipe.parser

Attributes

__version__

Classes

StoreBoolean

argparse class for robust handling of booleans with configargparse

Functions

create_parser([top_level])

Creates the BilbyArgParser for bilby_pipe

main()

Module Contents

bilby_pipe.parser.__version__[source]
class bilby_pipe.parser.StoreBoolean(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: argparse.Action

argparse class for robust handling of booleans with configargparse

When using configargparse, if the argument is setup with action=”store_true”, but the default is set to True, then there is no way, in the config file to switch the parameter off. To resolve this, this class handles the boolean properly.

__call__(parser, namespace, value, option_string=None)[source]
bilby_pipe.parser.create_parser(top_level=True)[source]

Creates the BilbyArgParser for bilby_pipe

Parameters:
top_level:

If true, parser is to be used at the top-level with requirement checking etc, else it is an internal call and will be ignored.

Returns:
parser: BilbyArgParser instance

Argument parser

bilby_pipe.parser.main()[source]