toil 6.1.0__py3-none-any.whl → 7.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- toil/__init__.py +1 -232
- toil/batchSystems/abstractBatchSystem.py +22 -13
- toil/batchSystems/abstractGridEngineBatchSystem.py +59 -45
- toil/batchSystems/awsBatch.py +8 -8
- toil/batchSystems/contained_executor.py +4 -5
- toil/batchSystems/gridengine.py +1 -1
- toil/batchSystems/htcondor.py +5 -5
- toil/batchSystems/kubernetes.py +25 -11
- toil/batchSystems/local_support.py +3 -3
- toil/batchSystems/lsf.py +2 -2
- toil/batchSystems/mesos/batchSystem.py +4 -4
- toil/batchSystems/mesos/executor.py +3 -2
- toil/batchSystems/options.py +9 -0
- toil/batchSystems/singleMachine.py +11 -10
- toil/batchSystems/slurm.py +64 -22
- toil/batchSystems/torque.py +1 -1
- toil/bus.py +7 -3
- toil/common.py +36 -13
- toil/cwl/cwltoil.py +365 -312
- toil/deferred.py +1 -1
- toil/fileStores/abstractFileStore.py +17 -17
- toil/fileStores/cachingFileStore.py +2 -2
- toil/fileStores/nonCachingFileStore.py +1 -1
- toil/job.py +228 -60
- toil/jobStores/abstractJobStore.py +18 -10
- toil/jobStores/aws/jobStore.py +280 -218
- toil/jobStores/aws/utils.py +57 -29
- toil/jobStores/conftest.py +2 -2
- toil/jobStores/fileJobStore.py +2 -2
- toil/jobStores/googleJobStore.py +3 -4
- toil/leader.py +72 -24
- toil/lib/aws/__init__.py +26 -10
- toil/lib/aws/iam.py +2 -2
- toil/lib/aws/session.py +62 -22
- toil/lib/aws/utils.py +73 -37
- toil/lib/conversions.py +5 -1
- toil/lib/ec2.py +118 -69
- toil/lib/expando.py +1 -1
- toil/lib/io.py +14 -2
- toil/lib/misc.py +1 -3
- toil/lib/resources.py +55 -21
- toil/lib/retry.py +12 -5
- toil/lib/threading.py +2 -2
- toil/lib/throttle.py +1 -1
- toil/options/common.py +27 -24
- toil/provisioners/__init__.py +9 -3
- toil/provisioners/abstractProvisioner.py +9 -7
- toil/provisioners/aws/__init__.py +20 -15
- toil/provisioners/aws/awsProvisioner.py +406 -329
- toil/provisioners/gceProvisioner.py +2 -2
- toil/provisioners/node.py +13 -5
- toil/server/app.py +1 -1
- toil/statsAndLogging.py +58 -16
- toil/test/__init__.py +27 -12
- toil/test/batchSystems/batchSystemTest.py +40 -33
- toil/test/batchSystems/batch_system_plugin_test.py +79 -0
- toil/test/batchSystems/test_slurm.py +1 -1
- toil/test/cwl/cwlTest.py +8 -91
- toil/test/cwl/seqtk_seq.cwl +1 -1
- toil/test/docs/scriptsTest.py +10 -13
- toil/test/jobStores/jobStoreTest.py +33 -49
- toil/test/lib/aws/test_iam.py +2 -2
- toil/test/provisioners/aws/awsProvisionerTest.py +51 -34
- toil/test/provisioners/clusterTest.py +90 -8
- toil/test/server/serverTest.py +2 -2
- toil/test/src/autoDeploymentTest.py +1 -1
- toil/test/src/dockerCheckTest.py +2 -1
- toil/test/src/environmentTest.py +125 -0
- toil/test/src/fileStoreTest.py +1 -1
- toil/test/src/jobDescriptionTest.py +18 -8
- toil/test/src/jobTest.py +1 -1
- toil/test/src/realtimeLoggerTest.py +4 -0
- toil/test/src/workerTest.py +52 -19
- toil/test/utils/toilDebugTest.py +61 -3
- toil/test/utils/utilsTest.py +20 -18
- toil/test/wdl/wdltoil_test.py +24 -71
- toil/test/wdl/wdltoil_test_kubernetes.py +77 -0
- toil/toilState.py +68 -9
- toil/utils/toilDebugJob.py +153 -26
- toil/utils/toilLaunchCluster.py +12 -2
- toil/utils/toilRsyncCluster.py +7 -2
- toil/utils/toilSshCluster.py +7 -3
- toil/utils/toilStats.py +2 -1
- toil/utils/toilStatus.py +97 -51
- toil/version.py +10 -10
- toil/wdl/wdltoil.py +318 -51
- toil/worker.py +96 -69
- {toil-6.1.0.dist-info → toil-7.0.0.dist-info}/LICENSE +25 -0
- {toil-6.1.0.dist-info → toil-7.0.0.dist-info}/METADATA +55 -21
- {toil-6.1.0.dist-info → toil-7.0.0.dist-info}/RECORD +93 -90
- {toil-6.1.0.dist-info → toil-7.0.0.dist-info}/WHEEL +1 -1
- {toil-6.1.0.dist-info → toil-7.0.0.dist-info}/entry_points.txt +0 -0
- {toil-6.1.0.dist-info → toil-7.0.0.dist-info}/top_level.txt +0 -0
|
@@ -70,6 +70,14 @@ except ImportError:
|
|
|
70
70
|
class ProxyConnectionError(BaseException): # type: ignore
|
|
71
71
|
"""Dummy class."""
|
|
72
72
|
|
|
73
|
+
class LocatorException(Exception):
|
|
74
|
+
"""
|
|
75
|
+
Base exception class for all locator exceptions.
|
|
76
|
+
For example, job store/aws bucket exceptions where they already exist
|
|
77
|
+
"""
|
|
78
|
+
def __init__(self, error_msg: str, locator: str, prefix: Optional[str]=None):
|
|
79
|
+
full_locator = locator if prefix is None else f"{prefix}:{locator}"
|
|
80
|
+
super().__init__(error_msg % full_locator)
|
|
73
81
|
|
|
74
82
|
class InvalidImportExportUrlException(Exception):
|
|
75
83
|
def __init__(self, url: ParseResult) -> None:
|
|
@@ -136,24 +144,24 @@ class NoSuchFileException(Exception):
|
|
|
136
144
|
super().__init__(message)
|
|
137
145
|
|
|
138
146
|
|
|
139
|
-
class NoSuchJobStoreException(
|
|
147
|
+
class NoSuchJobStoreException(LocatorException):
|
|
140
148
|
"""Indicates that the specified job store does not exist."""
|
|
141
|
-
def __init__(self, locator: str):
|
|
149
|
+
def __init__(self, locator: str, prefix: str):
|
|
142
150
|
"""
|
|
143
151
|
:param str locator: The location of the job store
|
|
144
152
|
"""
|
|
145
|
-
super().__init__("The job store '%s' does not exist, so there is nothing to restart."
|
|
153
|
+
super().__init__("The job store '%s' does not exist, so there is nothing to restart.", locator, prefix)
|
|
146
154
|
|
|
147
155
|
|
|
148
|
-
class JobStoreExistsException(
|
|
156
|
+
class JobStoreExistsException(LocatorException):
|
|
149
157
|
"""Indicates that the specified job store already exists."""
|
|
150
|
-
def __init__(self, locator: str):
|
|
158
|
+
def __init__(self, locator: str, prefix: str):
|
|
151
159
|
"""
|
|
152
160
|
:param str locator: The location of the job store
|
|
153
161
|
"""
|
|
154
162
|
super().__init__(
|
|
155
163
|
"The job store '%s' already exists. Use --restart to resume the workflow, or remove "
|
|
156
|
-
"the job store with 'toil clean' to start the workflow from scratch."
|
|
164
|
+
"the job store with 'toil clean' to start the workflow from scratch.", locator, prefix)
|
|
157
165
|
|
|
158
166
|
|
|
159
167
|
class AbstractJobStore(ABC):
|
|
@@ -835,7 +843,7 @@ class AbstractJobStore(ABC):
|
|
|
835
843
|
root_job_description = self.load_root_job()
|
|
836
844
|
reachable_from_root: Set[str] = set()
|
|
837
845
|
|
|
838
|
-
|
|
846
|
+
|
|
839
847
|
for merged_in in root_job_description.get_chain():
|
|
840
848
|
# Add the job itself and any other jobs that chained with it.
|
|
841
849
|
# Keep merged-in jobs around themselves, but don't bother
|
|
@@ -845,7 +853,7 @@ class AbstractJobStore(ABC):
|
|
|
845
853
|
for service_job_store_id in root_job_description.services:
|
|
846
854
|
if haveJob(service_job_store_id):
|
|
847
855
|
reachable_from_root.add(service_job_store_id)
|
|
848
|
-
|
|
856
|
+
|
|
849
857
|
|
|
850
858
|
# Unprocessed means it might have successor jobs we need to add.
|
|
851
859
|
unprocessed_job_descriptions = [root_job_description]
|
|
@@ -924,11 +932,11 @@ class AbstractJobStore(ABC):
|
|
|
924
932
|
jobDescription.filesToDelete = []
|
|
925
933
|
changed[0] = True
|
|
926
934
|
|
|
927
|
-
# For a job whose
|
|
935
|
+
# For a job whose body has already executed, remove jobs from the
|
|
928
936
|
# stack that are already deleted. This cleans up the case that the
|
|
929
937
|
# jobDescription had successors to run, but had not been updated to
|
|
930
938
|
# reflect this.
|
|
931
|
-
if jobDescription.
|
|
939
|
+
if not jobDescription.has_body():
|
|
932
940
|
|
|
933
941
|
def stackSizeFn() -> int:
|
|
934
942
|
return len(list(jobDescription.allSuccessors()))
|