bilby_pipe.parser

Classes

StoreBoolean

argparse class for robust handling of booleans with configargparse

Functions

create_parser([top_level])

Creates the BilbyArgParser for bilby_pipe

_get_items_in_group(label)

This is a utility function to get the names of all of the parser options

main()

Module Contents

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._get_items_in_group(label)[source]

This is a utility function to get the names of all of the parser options in a group. For example _get_items_in_group("waveform") will return a list of all the supported waveform arguments.

bilby_pipe.parser.main()[source]