toil.jobStores.utils

Attributes

logger

Exceptions

JobStoreUnavailableException

Raised when a particular type of job store is requested but can't be used.

NoAvailableJobStoreException

Indicates that no job store name is available.

Functions

generate_locator(job_store_type[, local_suggestion, ...])

Generate a random locator for a job store of the given type. Raises an

generate_default_job_store(batch_system_name, ...[, ...])

Choose a default job store appropriate to the requested batch system and

Module Contents

toil.jobStores.utils.logger
exception toil.jobStores.utils.JobStoreUnavailableException[source]

Bases: RuntimeError

Raised when a particular type of job store is requested but can’t be used.

toil.jobStores.utils.generate_locator(job_store_type, local_suggestion=None, decoration=None)[source]

Generate a random locator for a job store of the given type. Raises an JobStoreUnavailableException if that job store cannot be used.

Parameters:
  • job_store_type (str) – Registry name of the job store to use.

  • local_suggestion (str | None) – Path to a nonexistent local directory suitable for use as a file job store.

  • decoration (str | None) – Extra string to add to the job store locator, if convenient.

Return str:

Job store locator for a usable job store.

Return type:

str

exception toil.jobStores.utils.NoAvailableJobStoreException[source]

Bases: Exception

Indicates that no job store name is available.

toil.jobStores.utils.generate_default_job_store(batch_system_name, provisioner_name, local_directory, decoration=None)[source]

Choose a default job store appropriate to the requested batch system and provisioner, and installed modules. Raises an error if no good default is available and the user must choose manually.

Parameters:
  • batch_system_name (str | None) – Registry name of the batch system the user has requested, if any. If no name has been requested, should be None.

  • provisioner_name (str | None) – Name of the provisioner the user has requested, if any. Recognized provisioners include ‘aws’ and ‘gce’. None indicates that no provisioner is in use.

  • local_directory (str) – Path to a nonexistent local directory suitable for use as a file job store.

  • decoration (str | None) – Extra string to add to the job store locator, if convenient.

Return str:

Job store specifier for a usable job store.

Return type:

str