toil 8.0.0__py3-none-any.whl → 8.2.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.
Files changed (270) hide show
  1. toil/__init__.py +4 -39
  2. toil/batchSystems/abstractBatchSystem.py +1 -1
  3. toil/batchSystems/abstractGridEngineBatchSystem.py +1 -1
  4. toil/batchSystems/awsBatch.py +1 -1
  5. toil/batchSystems/cleanup_support.py +1 -1
  6. toil/batchSystems/kubernetes.py +53 -7
  7. toil/batchSystems/local_support.py +1 -1
  8. toil/batchSystems/mesos/batchSystem.py +13 -8
  9. toil/batchSystems/mesos/test/__init__.py +3 -2
  10. toil/batchSystems/options.py +1 -0
  11. toil/batchSystems/singleMachine.py +1 -1
  12. toil/batchSystems/slurm.py +229 -84
  13. toil/bus.py +5 -3
  14. toil/common.py +198 -54
  15. toil/cwl/cwltoil.py +32 -11
  16. toil/job.py +110 -86
  17. toil/jobStores/abstractJobStore.py +24 -3
  18. toil/jobStores/aws/jobStore.py +46 -10
  19. toil/jobStores/fileJobStore.py +25 -1
  20. toil/jobStores/googleJobStore.py +104 -30
  21. toil/leader.py +9 -0
  22. toil/lib/accelerators.py +3 -1
  23. toil/lib/aws/session.py +14 -3
  24. toil/lib/aws/utils.py +92 -35
  25. toil/lib/aws/utils.py.orig +504 -0
  26. toil/lib/bioio.py +1 -1
  27. toil/lib/docker.py +252 -91
  28. toil/lib/dockstore.py +387 -0
  29. toil/lib/ec2nodes.py +3 -2
  30. toil/lib/exceptions.py +5 -3
  31. toil/lib/history.py +1345 -0
  32. toil/lib/history_submission.py +695 -0
  33. toil/lib/io.py +56 -23
  34. toil/lib/misc.py +25 -1
  35. toil/lib/resources.py +2 -1
  36. toil/lib/retry.py +10 -10
  37. toil/lib/threading.py +11 -10
  38. toil/lib/{integration.py → trs.py} +95 -46
  39. toil/lib/web.py +38 -0
  40. toil/options/common.py +25 -2
  41. toil/options/cwl.py +10 -0
  42. toil/options/wdl.py +11 -0
  43. toil/provisioners/gceProvisioner.py +4 -4
  44. toil/server/api_spec/LICENSE +201 -0
  45. toil/server/api_spec/README.rst +5 -0
  46. toil/server/cli/wes_cwl_runner.py +5 -4
  47. toil/server/utils.py +2 -3
  48. toil/statsAndLogging.py +35 -1
  49. toil/test/__init__.py +275 -115
  50. toil/test/batchSystems/batchSystemTest.py +227 -205
  51. toil/test/batchSystems/test_slurm.py +199 -2
  52. toil/test/cactus/pestis.tar.gz +0 -0
  53. toil/test/conftest.py +7 -0
  54. toil/test/cwl/2.fasta +11 -0
  55. toil/test/cwl/2.fastq +12 -0
  56. toil/test/cwl/conftest.py +39 -0
  57. toil/test/cwl/cwlTest.py +1015 -780
  58. toil/test/cwl/directory/directory/file.txt +15 -0
  59. toil/test/cwl/download_directory_file.json +4 -0
  60. toil/test/cwl/download_directory_s3.json +4 -0
  61. toil/test/cwl/download_file.json +6 -0
  62. toil/test/cwl/download_http.json +6 -0
  63. toil/test/cwl/download_https.json +6 -0
  64. toil/test/cwl/download_s3.json +6 -0
  65. toil/test/cwl/download_subdirectory_file.json +5 -0
  66. toil/test/cwl/download_subdirectory_s3.json +5 -0
  67. toil/test/cwl/empty.json +1 -0
  68. toil/test/cwl/mock_mpi/fake_mpi.yml +8 -0
  69. toil/test/cwl/mock_mpi/fake_mpi_run.py +42 -0
  70. toil/test/cwl/optional-file-exists.json +6 -0
  71. toil/test/cwl/optional-file-missing.json +6 -0
  72. toil/test/cwl/optional-file.cwl +18 -0
  73. toil/test/cwl/preemptible_expression.json +1 -0
  74. toil/test/cwl/revsort-job-missing.json +6 -0
  75. toil/test/cwl/revsort-job.json +6 -0
  76. toil/test/cwl/s3_secondary_file.json +16 -0
  77. toil/test/cwl/seqtk_seq_job.json +6 -0
  78. toil/test/cwl/stream.json +6 -0
  79. toil/test/cwl/test_filename_conflict_resolution.ms/table.dat +0 -0
  80. toil/test/cwl/test_filename_conflict_resolution.ms/table.f0 +0 -0
  81. toil/test/cwl/test_filename_conflict_resolution.ms/table.f1 +0 -0
  82. toil/test/cwl/test_filename_conflict_resolution.ms/table.f1i +0 -0
  83. toil/test/cwl/test_filename_conflict_resolution.ms/table.f2 +0 -0
  84. toil/test/cwl/test_filename_conflict_resolution.ms/table.f2_TSM0 +0 -0
  85. toil/test/cwl/test_filename_conflict_resolution.ms/table.f3 +0 -0
  86. toil/test/cwl/test_filename_conflict_resolution.ms/table.f3_TSM0 +0 -0
  87. toil/test/cwl/test_filename_conflict_resolution.ms/table.f4 +0 -0
  88. toil/test/cwl/test_filename_conflict_resolution.ms/table.f4_TSM0 +0 -0
  89. toil/test/cwl/test_filename_conflict_resolution.ms/table.f5 +0 -0
  90. toil/test/cwl/test_filename_conflict_resolution.ms/table.info +0 -0
  91. toil/test/cwl/test_filename_conflict_resolution.ms/table.lock +0 -0
  92. toil/test/cwl/whale.txt +16 -0
  93. toil/test/docs/scripts/example_alwaysfail.py +38 -0
  94. toil/test/docs/scripts/example_alwaysfail_with_files.wdl +33 -0
  95. toil/test/docs/scripts/example_cachingbenchmark.py +117 -0
  96. toil/test/docs/scripts/stagingExampleFiles/in.txt +1 -0
  97. toil/test/docs/scripts/stagingExampleFiles/out.txt +2 -0
  98. toil/test/docs/scripts/tutorial_arguments.py +23 -0
  99. toil/test/docs/scripts/tutorial_debugging.patch +12 -0
  100. toil/test/docs/scripts/tutorial_debugging_hangs.wdl +126 -0
  101. toil/test/docs/scripts/tutorial_debugging_works.wdl +129 -0
  102. toil/test/docs/scripts/tutorial_docker.py +20 -0
  103. toil/test/docs/scripts/tutorial_dynamic.py +24 -0
  104. toil/test/docs/scripts/tutorial_encapsulation.py +28 -0
  105. toil/test/docs/scripts/tutorial_encapsulation2.py +29 -0
  106. toil/test/docs/scripts/tutorial_helloworld.py +15 -0
  107. toil/test/docs/scripts/tutorial_invokeworkflow.py +27 -0
  108. toil/test/docs/scripts/tutorial_invokeworkflow2.py +30 -0
  109. toil/test/docs/scripts/tutorial_jobfunctions.py +22 -0
  110. toil/test/docs/scripts/tutorial_managing.py +29 -0
  111. toil/test/docs/scripts/tutorial_managing2.py +56 -0
  112. toil/test/docs/scripts/tutorial_multiplejobs.py +25 -0
  113. toil/test/docs/scripts/tutorial_multiplejobs2.py +21 -0
  114. toil/test/docs/scripts/tutorial_multiplejobs3.py +22 -0
  115. toil/test/docs/scripts/tutorial_promises.py +25 -0
  116. toil/test/docs/scripts/tutorial_promises2.py +30 -0
  117. toil/test/docs/scripts/tutorial_quickstart.py +22 -0
  118. toil/test/docs/scripts/tutorial_requirements.py +44 -0
  119. toil/test/docs/scripts/tutorial_services.py +45 -0
  120. toil/test/docs/scripts/tutorial_staging.py +45 -0
  121. toil/test/docs/scripts/tutorial_stats.py +64 -0
  122. toil/test/lib/aws/test_iam.py +3 -1
  123. toil/test/lib/dockerTest.py +205 -122
  124. toil/test/lib/test_history.py +236 -0
  125. toil/test/lib/test_trs.py +161 -0
  126. toil/test/provisioners/aws/awsProvisionerTest.py +12 -9
  127. toil/test/provisioners/clusterTest.py +4 -4
  128. toil/test/provisioners/gceProvisionerTest.py +16 -14
  129. toil/test/sort/sort.py +4 -1
  130. toil/test/src/busTest.py +17 -17
  131. toil/test/src/deferredFunctionTest.py +145 -132
  132. toil/test/src/importExportFileTest.py +71 -63
  133. toil/test/src/jobEncapsulationTest.py +27 -28
  134. toil/test/src/jobServiceTest.py +149 -133
  135. toil/test/src/jobTest.py +219 -211
  136. toil/test/src/miscTests.py +66 -60
  137. toil/test/src/promisedRequirementTest.py +163 -169
  138. toil/test/src/regularLogTest.py +24 -24
  139. toil/test/src/resourceTest.py +82 -76
  140. toil/test/src/restartDAGTest.py +51 -47
  141. toil/test/src/resumabilityTest.py +24 -19
  142. toil/test/src/retainTempDirTest.py +60 -57
  143. toil/test/src/systemTest.py +17 -13
  144. toil/test/src/threadingTest.py +29 -32
  145. toil/test/utils/ABCWorkflowDebug/B_file.txt +1 -0
  146. toil/test/utils/ABCWorkflowDebug/debugWorkflow.py +204 -0
  147. toil/test/utils/ABCWorkflowDebug/mkFile.py +16 -0
  148. toil/test/utils/ABCWorkflowDebug/sleep.cwl +12 -0
  149. toil/test/utils/ABCWorkflowDebug/sleep.yaml +1 -0
  150. toil/test/utils/toilDebugTest.py +117 -102
  151. toil/test/utils/toilKillTest.py +54 -53
  152. toil/test/utils/utilsTest.py +303 -229
  153. toil/test/wdl/lint_error.wdl +9 -0
  154. toil/test/wdl/md5sum/empty_file.json +1 -0
  155. toil/test/wdl/md5sum/md5sum-gs.json +1 -0
  156. toil/test/wdl/md5sum/md5sum.1.0.wdl +32 -0
  157. toil/test/wdl/md5sum/md5sum.input +1 -0
  158. toil/test/wdl/md5sum/md5sum.json +1 -0
  159. toil/test/wdl/md5sum/md5sum.wdl +25 -0
  160. toil/test/wdl/miniwdl_self_test/inputs-namespaced.json +1 -0
  161. toil/test/wdl/miniwdl_self_test/inputs.json +1 -0
  162. toil/test/wdl/miniwdl_self_test/self_test.wdl +40 -0
  163. toil/test/wdl/standard_library/as_map.json +16 -0
  164. toil/test/wdl/standard_library/as_map_as_input.wdl +23 -0
  165. toil/test/wdl/standard_library/as_pairs.json +7 -0
  166. toil/test/wdl/standard_library/as_pairs_as_input.wdl +23 -0
  167. toil/test/wdl/standard_library/ceil.json +3 -0
  168. toil/test/wdl/standard_library/ceil_as_command.wdl +16 -0
  169. toil/test/wdl/standard_library/ceil_as_input.wdl +16 -0
  170. toil/test/wdl/standard_library/collect_by_key.json +1 -0
  171. toil/test/wdl/standard_library/collect_by_key_as_input.wdl +23 -0
  172. toil/test/wdl/standard_library/cross.json +11 -0
  173. toil/test/wdl/standard_library/cross_as_input.wdl +19 -0
  174. toil/test/wdl/standard_library/flatten.json +7 -0
  175. toil/test/wdl/standard_library/flatten_as_input.wdl +18 -0
  176. toil/test/wdl/standard_library/floor.json +3 -0
  177. toil/test/wdl/standard_library/floor_as_command.wdl +16 -0
  178. toil/test/wdl/standard_library/floor_as_input.wdl +16 -0
  179. toil/test/wdl/standard_library/keys.json +8 -0
  180. toil/test/wdl/standard_library/keys_as_input.wdl +24 -0
  181. toil/test/wdl/standard_library/length.json +7 -0
  182. toil/test/wdl/standard_library/length_as_input.wdl +16 -0
  183. toil/test/wdl/standard_library/length_as_input_with_map.json +7 -0
  184. toil/test/wdl/standard_library/length_as_input_with_map.wdl +17 -0
  185. toil/test/wdl/standard_library/length_invalid.json +3 -0
  186. toil/test/wdl/standard_library/range.json +3 -0
  187. toil/test/wdl/standard_library/range_0.json +3 -0
  188. toil/test/wdl/standard_library/range_as_input.wdl +17 -0
  189. toil/test/wdl/standard_library/range_invalid.json +3 -0
  190. toil/test/wdl/standard_library/read_boolean.json +3 -0
  191. toil/test/wdl/standard_library/read_boolean_as_command.wdl +17 -0
  192. toil/test/wdl/standard_library/read_float.json +3 -0
  193. toil/test/wdl/standard_library/read_float_as_command.wdl +17 -0
  194. toil/test/wdl/standard_library/read_int.json +3 -0
  195. toil/test/wdl/standard_library/read_int_as_command.wdl +17 -0
  196. toil/test/wdl/standard_library/read_json.json +3 -0
  197. toil/test/wdl/standard_library/read_json_as_output.wdl +31 -0
  198. toil/test/wdl/standard_library/read_lines.json +3 -0
  199. toil/test/wdl/standard_library/read_lines_as_output.wdl +31 -0
  200. toil/test/wdl/standard_library/read_map.json +3 -0
  201. toil/test/wdl/standard_library/read_map_as_output.wdl +31 -0
  202. toil/test/wdl/standard_library/read_string.json +3 -0
  203. toil/test/wdl/standard_library/read_string_as_command.wdl +17 -0
  204. toil/test/wdl/standard_library/read_tsv.json +3 -0
  205. toil/test/wdl/standard_library/read_tsv_as_output.wdl +31 -0
  206. toil/test/wdl/standard_library/round.json +3 -0
  207. toil/test/wdl/standard_library/round_as_command.wdl +16 -0
  208. toil/test/wdl/standard_library/round_as_input.wdl +16 -0
  209. toil/test/wdl/standard_library/size.json +3 -0
  210. toil/test/wdl/standard_library/size_as_command.wdl +17 -0
  211. toil/test/wdl/standard_library/size_as_output.wdl +36 -0
  212. toil/test/wdl/standard_library/stderr.json +3 -0
  213. toil/test/wdl/standard_library/stderr_as_output.wdl +30 -0
  214. toil/test/wdl/standard_library/stdout.json +3 -0
  215. toil/test/wdl/standard_library/stdout_as_output.wdl +30 -0
  216. toil/test/wdl/standard_library/sub.json +3 -0
  217. toil/test/wdl/standard_library/sub_as_input.wdl +17 -0
  218. toil/test/wdl/standard_library/sub_as_input_with_file.wdl +17 -0
  219. toil/test/wdl/standard_library/transpose.json +6 -0
  220. toil/test/wdl/standard_library/transpose_as_input.wdl +18 -0
  221. toil/test/wdl/standard_library/write_json.json +6 -0
  222. toil/test/wdl/standard_library/write_json_as_command.wdl +17 -0
  223. toil/test/wdl/standard_library/write_lines.json +7 -0
  224. toil/test/wdl/standard_library/write_lines_as_command.wdl +17 -0
  225. toil/test/wdl/standard_library/write_map.json +6 -0
  226. toil/test/wdl/standard_library/write_map_as_command.wdl +17 -0
  227. toil/test/wdl/standard_library/write_tsv.json +6 -0
  228. toil/test/wdl/standard_library/write_tsv_as_command.wdl +17 -0
  229. toil/test/wdl/standard_library/zip.json +12 -0
  230. toil/test/wdl/standard_library/zip_as_input.wdl +19 -0
  231. toil/test/wdl/test.csv +3 -0
  232. toil/test/wdl/test.tsv +3 -0
  233. toil/test/wdl/testfiles/croo.wdl +38 -0
  234. toil/test/wdl/testfiles/drop_files.wdl +62 -0
  235. toil/test/wdl/testfiles/drop_files_subworkflow.wdl +13 -0
  236. toil/test/wdl/testfiles/empty.txt +0 -0
  237. toil/test/wdl/testfiles/not_enough_outputs.wdl +33 -0
  238. toil/test/wdl/testfiles/random.wdl +66 -0
  239. toil/test/wdl/testfiles/string_file_coercion.json +1 -0
  240. toil/test/wdl/testfiles/string_file_coercion.wdl +35 -0
  241. toil/test/wdl/testfiles/test.json +4 -0
  242. toil/test/wdl/testfiles/test_boolean.txt +1 -0
  243. toil/test/wdl/testfiles/test_float.txt +1 -0
  244. toil/test/wdl/testfiles/test_int.txt +1 -0
  245. toil/test/wdl/testfiles/test_lines.txt +5 -0
  246. toil/test/wdl/testfiles/test_map.txt +2 -0
  247. toil/test/wdl/testfiles/test_string.txt +1 -0
  248. toil/test/wdl/testfiles/url_to_file.wdl +13 -0
  249. toil/test/wdl/testfiles/url_to_optional_file.wdl +13 -0
  250. toil/test/wdl/testfiles/vocab.json +1 -0
  251. toil/test/wdl/testfiles/vocab.wdl +66 -0
  252. toil/test/wdl/testfiles/wait.wdl +34 -0
  253. toil/test/wdl/wdl_specification/type_pair.json +23 -0
  254. toil/test/wdl/wdl_specification/type_pair_basic.wdl +36 -0
  255. toil/test/wdl/wdl_specification/type_pair_with_files.wdl +36 -0
  256. toil/test/wdl/wdl_specification/v1_spec.json +1 -0
  257. toil/test/wdl/wdl_specification/v1_spec_declaration.wdl +39 -0
  258. toil/test/wdl/wdltoil_test.py +681 -408
  259. toil/test/wdl/wdltoil_test_kubernetes.py +2 -2
  260. toil/version.py +10 -10
  261. toil/wdl/wdltoil.py +350 -123
  262. toil/worker.py +113 -33
  263. {toil-8.0.0.dist-info → toil-8.2.0.dist-info}/METADATA +13 -7
  264. toil-8.2.0.dist-info/RECORD +439 -0
  265. {toil-8.0.0.dist-info → toil-8.2.0.dist-info}/WHEEL +1 -1
  266. toil/test/lib/test_integration.py +0 -104
  267. toil-8.0.0.dist-info/RECORD +0 -253
  268. {toil-8.0.0.dist-info → toil-8.2.0.dist-info}/entry_points.txt +0 -0
  269. {toil-8.0.0.dist-info → toil-8.2.0.dist-info/licenses}/LICENSE +0 -0
  270. {toil-8.0.0.dist-info → toil-8.2.0.dist-info}/top_level.txt +0 -0
toil/worker.py CHANGED
@@ -11,6 +11,7 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
+ import atexit
14
15
  import base64
15
16
  import copy
16
17
  import json
@@ -22,7 +23,9 @@ import shutil
22
23
  import signal
23
24
  import socket
24
25
  import stat
26
+ import subprocess
25
27
  import sys
28
+ import threading
26
29
  import time
27
30
  import traceback
28
31
  from collections.abc import Iterator
@@ -59,7 +62,6 @@ class StatsDict(MagicExpando):
59
62
 
60
63
  jobs: list[MagicExpando]
61
64
 
62
-
63
65
  def nextChainable(
64
66
  predecessor: JobDescription, job_store: AbstractJobStore, config: Config
65
67
  ) -> Optional[JobDescription]:
@@ -165,6 +167,85 @@ def nextChainable(
165
167
  # Made it through! This job is chainable.
166
168
  return successor
167
169
 
170
+ def unstick_worker(interval: float = 120, timeout: float = 120) -> None:
171
+ """
172
+ Thread function that tries to prevent the process from getting stuck.
173
+
174
+ Meant to be used as a daemon thread: does not have a shutdown signal but
175
+ cleans up on exit.
176
+
177
+ :param interval: Try to unstick the process at intervals of this many
178
+ seconds.
179
+ :param timeout: Stop child processes that take longer than this many
180
+ seconds to finish.
181
+ """
182
+
183
+ # We've observed Toil getting stuck reading the job from the job store,
184
+ # either due to a problem with the FileJobStore or with local temp storage,
185
+ # but then get unstuck as soon as someone logged in and ran lsof on the
186
+ # Toil process. So we make sure to do that to ourselves every once in a
187
+ # while as long as the worker is running.
188
+
189
+ # Figure out our process ID
190
+ pid = os.getpid()
191
+
192
+ child: Optional[subprocess.Popen[bytes]] = None
193
+
194
+ def clean_up_child() -> None:
195
+ """
196
+ Cleanup function to run at daemon thread shutdown when the main thread
197
+ terminates without shutting us down.
198
+
199
+ Also used to kill the child process if it takes too long.
200
+ """
201
+ if child is not None:
202
+ # Kill the child immediately if it is running
203
+ child.kill()
204
+ try:
205
+ # Wait one last time to try and reap the child process
206
+ child.wait(timeout=5)
207
+ except subprocess.TimeoutExpired:
208
+ pass
209
+
210
+ atexit.register(clean_up_child)
211
+
212
+ # TODO: If we handle daemon thread shutdown just fine, why do we bother
213
+ # with all the event stuff? Why not cut it?
214
+
215
+ # Wait the interval before trying the first unstick
216
+ time.sleep(interval)
217
+
218
+ while True:
219
+ # Run an lsof on our PID, which has been observed to unstick reads.
220
+ #
221
+ # We rely on the thread being able to go away and atexit() hooks
222
+ # happening in the middle of a wait with a timeout.
223
+ #
224
+ # We also want to handle the case where the child process gets so
225
+ # gummed up that it can't exit when killed.
226
+
227
+ # Preserve errors form child process but not output
228
+ child = subprocess.Popen(
229
+ ["lsof", "-p", str(pid)],
230
+ stdin=subprocess.DEVNULL,
231
+ stdout=subprocess.DEVNULL,
232
+ )
233
+ try:
234
+ child.wait(timeout=timeout)
235
+ except subprocess.TimeoutExpired:
236
+ logger.warning("Running lsof took too long!")
237
+ clean_up_child()
238
+ if child.returncode is None:
239
+ # Kill didn't take
240
+ logger.warning("Could not promptly kill child process: %s", child.pid)
241
+
242
+ if child.returncode != 0:
243
+ # Something went wrong, which is suspicious. Either it failed or it
244
+ # timed out and could not be killed promptly.
245
+ logger.warning("Could not list open files on ourselves. Return code: %s", child.returncode)
246
+
247
+ # Wait the interval.
248
+ time.sleep(interval)
168
249
 
169
250
  def workerScript(
170
251
  job_store: AbstractJobStore,
@@ -240,6 +321,13 @@ def workerScript(
240
321
  # We don't need to reap the child. Either it kills us, or we finish
241
322
  # before it does. Either way, init will have to clean it up for us.
242
323
 
324
+ ##########################################
325
+ # Create the worker unsticker
326
+ ##########################################
327
+ unstick_thread = threading.Thread(target=unstick_worker, args=())
328
+ unstick_thread.daemon = True
329
+ unstick_thread.start()
330
+
243
331
  ##########################################
244
332
  # Load the environment for the job
245
333
  ##########################################
@@ -443,13 +531,12 @@ def workerScript(
443
531
  )
444
532
 
445
533
  ##########################################
446
- # Setup the stats, if requested
534
+ # Setup the stats
447
535
  ##########################################
448
536
 
449
- if config.stats:
450
- # Remember the cores from the first job, which is how many we have reserved for us.
451
- statsDict.workers.requested_cores = jobDesc.cores
452
- startClock = ResourceMonitor.get_total_cpu_time()
537
+ # Remember the cores from the first job, which is how many we have reserved for us.
538
+ statsDict.workers.requested_cores = jobDesc.cores
539
+ startClock = ResourceMonitor.get_total_cpu_time()
453
540
 
454
541
  startTime = time.time()
455
542
  while True:
@@ -483,7 +570,7 @@ def workerScript(
483
570
  )
484
571
  try:
485
572
  with job._executor(
486
- stats=statsDict if config.stats else None, fileStore=fileStore
573
+ stats=statsDict, fileStore=fileStore
487
574
  ):
488
575
  with deferredFunctionManager.open() as defer:
489
576
  with fileStore.open(job):
@@ -594,22 +681,21 @@ def workerScript(
594
681
  ##########################################
595
682
  # Finish up the stats
596
683
  ##########################################
597
- if config.stats:
598
- totalCPUTime, totalMemoryUsage = (
599
- ResourceMonitor.get_total_cpu_time_and_memory_usage()
600
- )
601
- statsDict.workers.time = str(time.time() - startTime)
602
- statsDict.workers.clock = str(totalCPUTime - startClock)
603
- statsDict.workers.memory = str(totalMemoryUsage)
604
- # Say the worker used the max disk we saw from any job
605
- max_bytes = 0
606
- for job_stats in statsDict.jobs:
607
- if "disk" in job_stats:
608
- max_bytes = max(max_bytes, int(job_stats.disk))
609
- statsDict.workers.disk = str(max_bytes)
610
- # Count the jobs executed.
611
- # TODO: toil stats could compute this but its parser is too general to hook into simply.
612
- statsDict.workers.jobs_run = len(statsDict.jobs)
684
+ totalCPUTime, totalMemoryUsage = (
685
+ ResourceMonitor.get_total_cpu_time_and_memory_usage()
686
+ )
687
+ statsDict.workers.time = str(time.time() - startTime)
688
+ statsDict.workers.clock = str(totalCPUTime - startClock)
689
+ statsDict.workers.memory = str(totalMemoryUsage)
690
+ # Say the worker used the max disk we saw from any job
691
+ max_bytes = 0
692
+ for job_stats in statsDict.jobs:
693
+ if "disk" in job_stats:
694
+ max_bytes = max(max_bytes, int(job_stats.disk))
695
+ statsDict.workers.disk = str(max_bytes)
696
+ # Count the jobs executed.
697
+ # TODO: toil stats could compute this but its parser is too general to hook into simply.
698
+ statsDict.workers.jobs_run = len(statsDict.jobs)
613
699
 
614
700
  # log the worker log path here so that if the file is truncated the path can still be found
615
701
  if redirect_output_to_log_file:
@@ -767,16 +853,10 @@ def workerScript(
767
853
  statsDict.logs.names = [names.stats_name for names in jobDesc.get_chain()]
768
854
  statsDict.logs.messages = logMessages
769
855
 
770
- if (
771
- debugging
772
- or config.stats
773
- or statsDict.workers.logs_to_leader
774
- or statsDict.workers.logging_user_streams
775
- ):
776
- # We have stats/logging to report back.
777
- # We report even if the job attempt failed.
778
- # TODO: Will that upset analysis of the stats?
779
- job_store.write_logs(json.dumps(statsDict, ensure_ascii=True))
856
+ # We have stats/logging to report back.
857
+ # We report even if the job attempt failed.
858
+ # TODO: Will that upset analysis of the stats?
859
+ job_store.write_logs(json.dumps(statsDict, ensure_ascii=True))
780
860
 
781
861
  # Remove the temp dir
782
862
  cleanUp = config.cleanWorkDir
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: toil
3
- Version: 8.0.0
3
+ Version: 8.2.0
4
4
  Summary: Pipeline management software for clusters.
5
5
  Home-page: https://github.com/DataBiosphere/toil
6
6
  Author: Benedict Paten and the Toil community
@@ -37,7 +37,7 @@ Requires-Dist: requests<=2.31.0
37
37
  Requires-Dist: docker<8,>=6.1.0
38
38
  Requires-Dist: urllib3<3,>=1.26.0
39
39
  Requires-Dist: python-dateutil
40
- Requires-Dist: psutil<7,>=6.1.0
40
+ Requires-Dist: psutil<8,>=6.1.0
41
41
  Requires-Dist: PyPubSub<5,>=4.0.3
42
42
  Requires-Dist: addict<2.5,>=2.2.1
43
43
  Requires-Dist: backports.zoneinfo[tzdata]; python_version < "3.9"
@@ -47,6 +47,7 @@ Requires-Dist: ruamel.yaml>=0.15
47
47
  Requires-Dist: pyyaml<7,>=6
48
48
  Requires-Dist: typing-extensions<5,>=4.6.2
49
49
  Requires-Dist: coloredlogs<16,>=15
50
+ Requires-Dist: prompt_toolkit<4,>=3.0
50
51
  Provides-Extra: aws
51
52
  Requires-Dist: boto3-stubs[autoscaling,boto3,ec2,iam,s3,sdb,sts]<2,>=1.28.3.post2; extra == "aws"
52
53
  Requires-Dist: mypy-boto3-iam<2,>=1.28.3.post2; extra == "aws"
@@ -81,9 +82,9 @@ Requires-Dist: wdlparse==0.1.0; extra == "wdl"
81
82
  Requires-Dist: graphlib-backport==1.0; python_version < "3.9" and extra == "wdl"
82
83
  Provides-Extra: server
83
84
  Requires-Dist: connexion[swagger-ui]<4,>=2.10.0; extra == "server"
84
- Requires-Dist: flask<4,>=2.0; extra == "server"
85
+ Requires-Dist: flask<2.3,>=2.0; extra == "server"
85
86
  Requires-Dist: werkzeug<4,>=2.0; extra == "server"
86
- Requires-Dist: flask-cors==5.0.0; extra == "server"
87
+ Requires-Dist: flask-cors==5.0.1; extra == "server"
87
88
  Requires-Dist: gunicorn==23.0.0; extra == "server"
88
89
  Requires-Dist: celery<6,>=5.1.0; extra == "server"
89
90
  Requires-Dist: wes-service<5,>=4.0.0; extra == "server"
@@ -120,9 +121,9 @@ Requires-Dist: miniwdl==1.12.1; extra == "all"
120
121
  Requires-Dist: wdlparse==0.1.0; extra == "all"
121
122
  Requires-Dist: graphlib-backport==1.0; python_version < "3.9" and extra == "all"
122
123
  Requires-Dist: connexion[swagger-ui]<4,>=2.10.0; extra == "all"
123
- Requires-Dist: flask<4,>=2.0; extra == "all"
124
+ Requires-Dist: flask<2.3,>=2.0; extra == "all"
124
125
  Requires-Dist: werkzeug<4,>=2.0; extra == "all"
125
- Requires-Dist: flask-cors==5.0.0; extra == "all"
126
+ Requires-Dist: flask-cors==5.0.1; extra == "all"
126
127
  Requires-Dist: gunicorn==23.0.0; extra == "all"
127
128
  Requires-Dist: celery<6,>=5.1.0; extra == "all"
128
129
  Requires-Dist: wes-service<5,>=4.0.0; extra == "all"
@@ -135,11 +136,16 @@ Dynamic: description
135
136
  Dynamic: description-content-type
136
137
  Dynamic: home-page
137
138
  Dynamic: license
139
+ Dynamic: license-file
138
140
  Dynamic: provides-extra
139
141
  Dynamic: requires-dist
140
142
  Dynamic: requires-python
141
143
  Dynamic: summary
142
144
 
145
+ .. image:: https://flat.badgen.net/https/ucsc-ci.com/api/v4/projects/3/jobs/artifacts/master/raw/badges1.2/required.json%3Fjob=cwl_badge?icon=commonwl&label=CWL%201.2%20Conformance
146
+ :alt: Toil CWL 1.2 Conformance Badge
147
+ :target: https://github.com/common-workflow-language/cwl-v1.2/blob/main/CONFORMANCE_TESTS.md
148
+
143
149
  .. image:: https://badges.gitter.im/bd2k-genomics-toil/Lobby.svg
144
150
  :alt: Join the chat at https://gitter.im/bd2k-genomics-toil/Lobby
145
151
  :target: https://gitter.im/bd2k-genomics-toil/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge