toil.batchSystems.options

Module Contents

Classes

OptionSetter

Protocol for the setOption function we get to let us set up CLI options for

Functions

set_batchsystem_options(batch_system, set_option)

Call set_option for all the options for the given named batch system, or

add_all_batchsystem_options(parser)

set_batchsystem_config_defaults(config)

Set default and environment-based options for builtin batch systems. This

Attributes

logger

toil.batchSystems.options.logger
class toil.batchSystems.options.OptionSetter[source]

Bases: Protocol

digraph inheritance8ba17497d0 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Generic" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Abstract base class for generic types."]; "OptionSetter" [URL="#toil.batchSystems.options.OptionSetter",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Protocol for the setOption function we get to let us set up CLI options for"]; "Protocol" -> "OptionSetter" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Protocol" -> "OptionSetter" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Protocol" -> "OptionSetter" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Protocol" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class for protocol classes."]; "Generic" -> "Protocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Protocol" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class for protocol classes. Protocol classes are defined as::"]; "Protocol" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "Generic" -> "Protocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

Protocol for the setOption function we get to let us set up CLI options for each batch system.

Actual functionality is defined in the Config class.

OptionType
__call__(option_name, parsing_function=None, check_function=None, default=None, env=None, old_names=None)[source]
Parameters
  • option_name (str) –

  • parsing_function (Optional[Callable[[Any], OptionType]]) –

  • check_function (Optional[Callable[[OptionType], Union[None, bool]]]) –

  • default (Optional[OptionType]) –

  • env (Optional[List[str]]) –

  • old_names (Optional[List[str]]) –

Return type

bool

toil.batchSystems.options.set_batchsystem_options(batch_system, set_option)[source]

Call set_option for all the options for the given named batch system, or all batch systems if no name is provided.

Parameters
Return type

None

toil.batchSystems.options.add_all_batchsystem_options(parser)[source]
Parameters

parser (Union[argparse.ArgumentParser, argparse._ArgumentGroup]) –

Return type

None

toil.batchSystems.options.set_batchsystem_config_defaults(config)[source]

Set default and environment-based options for builtin batch systems. This is required if a Config object is not constructed from an Options object.

Return type

None