bitorch.config.Config

class bitorch.config.Config[source]

Config superclass that implements functionality to create argparse arguments for class attributes of subclasses.

Methods

__init__

collects all attributes of class that are not the name as configurable attributes.

add_config_arguments

iterates over this classes configurable attributes and adds an argparse argument.

apply_args_to_configuration

loads the cli set values of configurable attributes.

Attributes

name

__init__() None[source]

collects all attributes of class that are not the name as configurable attributes.

add_config_arguments(parser: ArgumentParser) None[source]

iterates over this classes configurable attributes and adds an argparse argument. in case of a boolean value, the value can then be toggled by either placing or leaving out the according flag.

Parameters:

parser (ArgumentParser) – parser to add the arguments to.

apply_args_to_configuration(args: Namespace) None[source]

loads the cli set values of configurable attributes.

Parameters:

args (Namespace) – cli arguments