toil.options.common¶
Attributes¶
Functions¶
Parse a list of strings of the form "NAME=VALUE" or just "NAME" into a dictionary. |
|
|
Returns a function that checks if a given int is in the given half-open interval. |
|
Returns a function that checks if a given float is in the given half-open interval. |
|
Parse a string description of one or more accelerator requirements. |
|
|
|
Returns an argparse action class to check if the input is within the given half-open interval. |
|
Turn the jobstore string into it's corresponding URI |
|
Add base Toil command line options to the parser. |
Module Contents¶
- toil.options.common.logger¶
- toil.options.common.defaultTargetTime = 1800¶
- toil.options.common.SYS_MAX_SIZE = 9223372036854775807¶
- toil.options.common.parse_set_env(l)[source]¶
Parse a list of strings of the form “NAME=VALUE” or just “NAME” into a dictionary.
Strings of the latter from will result in dictionary entries whose value is None.
>>> parse_set_env([]) {} >>> parse_set_env(['a']) {'a': None} >>> parse_set_env(['a=']) {'a': ''} >>> parse_set_env(['a=b']) {'a': 'b'} >>> parse_set_env(['a=a', 'a=b']) {'a': 'b'} >>> parse_set_env(['a=b', 'c=d']) {'a': 'b', 'c': 'd'} >>> parse_set_env(['a=b=c']) {'a': 'b=c'} >>> parse_set_env(['']) Traceback (most recent call last): ... ValueError: Empty name >>> parse_set_env(['=1']) Traceback (most recent call last): ... ValueError: Empty name
- toil.options.common.iC(min_value, max_value=None)[source]¶
Returns a function that checks if a given int is in the given half-open interval.
- toil.options.common.fC(minValue, maxValue=None)[source]¶
Returns a function that checks if a given float is in the given half-open interval.
- toil.options.common.parse_accelerator_list(specs)[source]¶
Parse a string description of one or more accelerator requirements.
- Parameters:
specs (Optional[str])
- Return type:
- toil.options.common.make_open_interval_action(min, max=None)[source]¶
Returns an argparse action class to check if the input is within the given half-open interval. ex: Provided value to argparse must be within the interval [min, max) Types of min and max must be the same (max may be None)
- toil.options.common.parse_jobstore(jobstore_uri)[source]¶
Turn the jobstore string into it’s corresponding URI ex: /path/to/jobstore -> file:/path/to/jobstore
If the jobstore string already is a URI, return the jobstore: aws:/path/to/jobstore -> aws:/path/to/jobstore :param jobstore_uri: string of the jobstore :return: URI of the jobstore
- toil.options.common.JOBSTORE_HELP = Multiline-String¶
Show Value
"""The location of the job store for the workflow. A job store holds persistent information about the jobs, stats, and files in a workflow. If the workflow is run with a distributed batch system, the job store must be accessible by all worker nodes. Depending on the desired job store implementation, the location should be formatted according to one of the following schemes: file:<path> where <path> points to a directory on the file system aws:<region>:<prefix> where <region> is the name of an AWS region like us-west-2 and <prefix> will be prepended to the names of any top-level AWS resources in use by job store, e.g. S3 buckets. google:<project_id>:<prefix> TODO: explain For backwards compatibility, you may also specify ./foo (equivalent to file:./foo or just file:foo) or /bar (equivalent to file:/bar)."""
- toil.options.common.add_base_toil_options(parser, jobstore_as_flag=False, cwl=False)[source]¶
Add base Toil command line options to the parser. :param parser: Argument parser to add options to :param jobstore_as_flag: make the job store option a –jobStore flag instead of a required jobStore positional argument. :param cwl: whether CWL should be included or not
- Parameters:
parser (argparse.ArgumentParser)
jobstore_as_flag (bool)
cwl (bool)
- Return type:
None