toil 5.12.0__tar.gz → 6.1.0__tar.gz

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 (287) hide show
  1. toil-6.1.0/PKG-INFO +123 -0
  2. toil-6.1.0/requirements-cwl.txt +8 -0
  3. toil-6.1.0/requirements-dev.txt +29 -0
  4. toil-6.1.0/requirements-mesos.txt +1 -0
  5. {toil-5.12.0 → toil-6.1.0}/requirements-server.txt +3 -3
  6. toil-6.1.0/requirements-wdl.txt +3 -0
  7. {toil-5.12.0 → toil-6.1.0}/requirements.txt +6 -4
  8. {toil-5.12.0 → toil-6.1.0}/setup.cfg +1 -6
  9. {toil-5.12.0 → toil-6.1.0}/setup.py +12 -7
  10. {toil-5.12.0 → toil-6.1.0}/src/toil/__init__.py +18 -13
  11. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/abstractBatchSystem.py +39 -13
  12. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/abstractGridEngineBatchSystem.py +24 -24
  13. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/awsBatch.py +14 -14
  14. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/cleanup_support.py +7 -3
  15. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/contained_executor.py +3 -3
  16. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/htcondor.py +0 -1
  17. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/kubernetes.py +34 -31
  18. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/local_support.py +3 -1
  19. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/lsf.py +7 -7
  20. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/mesos/batchSystem.py +7 -7
  21. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/options.py +32 -83
  22. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/registry.py +104 -23
  23. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/singleMachine.py +16 -13
  24. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/slurm.py +87 -16
  25. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/torque.py +0 -1
  26. {toil-5.12.0 → toil-6.1.0}/src/toil/bus.py +44 -8
  27. toil-6.1.0/src/toil/common.py +1676 -0
  28. toil-6.1.0/src/toil/cwl/__init__.py +54 -0
  29. {toil-5.12.0 → toil-6.1.0}/src/toil/cwl/cwltoil.py +595 -574
  30. {toil-5.12.0 → toil-6.1.0}/src/toil/cwl/utils.py +55 -10
  31. {toil-5.12.0 → toil-6.1.0}/src/toil/exceptions.py +1 -1
  32. {toil-5.12.0 → toil-6.1.0}/src/toil/fileStores/__init__.py +2 -2
  33. {toil-5.12.0 → toil-6.1.0}/src/toil/fileStores/abstractFileStore.py +88 -14
  34. {toil-5.12.0 → toil-6.1.0}/src/toil/fileStores/cachingFileStore.py +610 -549
  35. {toil-5.12.0 → toil-6.1.0}/src/toil/fileStores/nonCachingFileStore.py +46 -22
  36. {toil-5.12.0 → toil-6.1.0}/src/toil/job.py +182 -101
  37. {toil-5.12.0 → toil-6.1.0}/src/toil/jobStores/abstractJobStore.py +161 -95
  38. {toil-5.12.0 → toil-6.1.0}/src/toil/jobStores/aws/jobStore.py +23 -9
  39. {toil-5.12.0 → toil-6.1.0}/src/toil/jobStores/aws/utils.py +6 -6
  40. {toil-5.12.0 → toil-6.1.0}/src/toil/jobStores/fileJobStore.py +116 -18
  41. {toil-5.12.0 → toil-6.1.0}/src/toil/jobStores/googleJobStore.py +16 -7
  42. {toil-5.12.0 → toil-6.1.0}/src/toil/jobStores/utils.py +5 -6
  43. {toil-5.12.0 → toil-6.1.0}/src/toil/leader.py +87 -56
  44. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/accelerators.py +10 -5
  45. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/aws/__init__.py +3 -14
  46. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/aws/ami.py +22 -9
  47. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/aws/iam.py +21 -13
  48. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/aws/session.py +2 -16
  49. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/aws/utils.py +4 -5
  50. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/compatibility.py +1 -1
  51. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/conversions.py +26 -3
  52. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/docker.py +22 -23
  53. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/ec2.py +10 -6
  54. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/ec2nodes.py +106 -100
  55. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/encryption/_nacl.py +2 -1
  56. toil-6.1.0/src/toil/lib/generatedEC2Lists.py +815 -0
  57. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/io.py +49 -2
  58. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/misc.py +1 -1
  59. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/resources.py +9 -2
  60. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/threading.py +101 -38
  61. toil-6.1.0/src/toil/options/common.py +736 -0
  62. toil-6.1.0/src/toil/options/cwl.py +336 -0
  63. toil-6.1.0/src/toil/options/wdl.py +37 -0
  64. {toil-5.12.0 → toil-6.1.0}/src/toil/provisioners/abstractProvisioner.py +9 -4
  65. {toil-5.12.0 → toil-6.1.0}/src/toil/provisioners/aws/__init__.py +3 -6
  66. {toil-5.12.0 → toil-6.1.0}/src/toil/provisioners/aws/awsProvisioner.py +6 -0
  67. {toil-5.12.0 → toil-6.1.0}/src/toil/provisioners/clusterScaler.py +3 -2
  68. {toil-5.12.0 → toil-6.1.0}/src/toil/provisioners/gceProvisioner.py +2 -2
  69. {toil-5.12.0 → toil-6.1.0}/src/toil/realtimeLogger.py +2 -1
  70. {toil-5.12.0 → toil-6.1.0}/src/toil/resource.py +24 -18
  71. {toil-5.12.0 → toil-6.1.0}/src/toil/server/app.py +2 -3
  72. {toil-5.12.0 → toil-6.1.0}/src/toil/server/cli/wes_cwl_runner.py +4 -4
  73. {toil-5.12.0 → toil-6.1.0}/src/toil/server/utils.py +1 -1
  74. {toil-5.12.0 → toil-6.1.0}/src/toil/server/wes/abstract_backend.py +3 -2
  75. {toil-5.12.0 → toil-6.1.0}/src/toil/server/wes/amazon_wes_utils.py +5 -4
  76. {toil-5.12.0 → toil-6.1.0}/src/toil/server/wes/tasks.py +2 -3
  77. {toil-5.12.0 → toil-6.1.0}/src/toil/server/wes/toil_backend.py +2 -10
  78. {toil-5.12.0 → toil-6.1.0}/src/toil/server/wsgi_app.py +2 -0
  79. {toil-5.12.0 → toil-6.1.0}/src/toil/serviceManager.py +12 -10
  80. {toil-5.12.0 → toil-6.1.0}/src/toil/statsAndLogging.py +41 -9
  81. {toil-5.12.0 → toil-6.1.0}/src/toil/test/__init__.py +29 -54
  82. {toil-5.12.0 → toil-6.1.0}/src/toil/test/batchSystems/batchSystemTest.py +11 -111
  83. {toil-5.12.0 → toil-6.1.0}/src/toil/test/batchSystems/test_slurm.py +24 -8
  84. toil-6.1.0/src/toil/test/cactus/test_cactus_integration.py +58 -0
  85. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/cwlTest.py +438 -223
  86. toil-6.1.0/src/toil/test/cwl/glob_dir.cwl +15 -0
  87. toil-6.1.0/src/toil/test/cwl/preemptible.cwl +21 -0
  88. toil-6.1.0/src/toil/test/cwl/preemptible_expression.cwl +28 -0
  89. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/revsort.cwl +1 -1
  90. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/revsort2.cwl +1 -1
  91. {toil-5.12.0 → toil-6.1.0}/src/toil/test/docs/scriptsTest.py +2 -3
  92. {toil-5.12.0 → toil-6.1.0}/src/toil/test/jobStores/jobStoreTest.py +34 -21
  93. {toil-5.12.0 → toil-6.1.0}/src/toil/test/lib/aws/test_iam.py +4 -14
  94. {toil-5.12.0 → toil-6.1.0}/src/toil/test/lib/aws/test_utils.py +0 -3
  95. {toil-5.12.0 → toil-6.1.0}/src/toil/test/lib/dockerTest.py +4 -4
  96. {toil-5.12.0 → toil-6.1.0}/src/toil/test/lib/test_ec2.py +12 -17
  97. {toil-5.12.0 → toil-6.1.0}/src/toil/test/mesos/helloWorld.py +4 -5
  98. {toil-5.12.0 → toil-6.1.0}/src/toil/test/mesos/stress.py +1 -1
  99. toil-6.1.0/src/toil/test/options/options.py +37 -0
  100. {toil-5.12.0 → toil-6.1.0}/src/toil/test/provisioners/aws/awsProvisionerTest.py +9 -5
  101. {toil-5.12.0 → toil-6.1.0}/src/toil/test/provisioners/clusterScalerTest.py +6 -4
  102. {toil-5.12.0 → toil-6.1.0}/src/toil/test/provisioners/clusterTest.py +23 -11
  103. {toil-5.12.0 → toil-6.1.0}/src/toil/test/provisioners/gceProvisionerTest.py +0 -6
  104. {toil-5.12.0 → toil-6.1.0}/src/toil/test/provisioners/restartScript.py +3 -2
  105. {toil-5.12.0 → toil-6.1.0}/src/toil/test/server/serverTest.py +1 -1
  106. {toil-5.12.0 → toil-6.1.0}/src/toil/test/sort/restart_sort.py +2 -1
  107. {toil-5.12.0 → toil-6.1.0}/src/toil/test/sort/sort.py +2 -1
  108. {toil-5.12.0 → toil-6.1.0}/src/toil/test/sort/sortTest.py +2 -13
  109. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/autoDeploymentTest.py +45 -45
  110. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/busTest.py +5 -5
  111. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/checkpointTest.py +2 -2
  112. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/fileStoreTest.py +32 -16
  113. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/helloWorldTest.py +1 -1
  114. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/jobDescriptionTest.py +2 -1
  115. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/jobTest.py +18 -18
  116. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/miscTests.py +5 -3
  117. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/promisedRequirementTest.py +3 -3
  118. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/realtimeLoggerTest.py +1 -1
  119. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/resourceTest.py +2 -2
  120. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/resumabilityTest.py +36 -2
  121. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/systemTest.py +2 -2
  122. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/toilContextManagerTest.py +2 -2
  123. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/userDefinedJobArgTypeTest.py +1 -1
  124. toil-6.1.0/src/toil/test/utils/__init__.py +13 -0
  125. toil-6.1.0/src/toil/test/utils/toilDebugTest.py +201 -0
  126. {toil-5.12.0 → toil-6.1.0}/src/toil/test/utils/toilKillTest.py +2 -2
  127. {toil-5.12.0 → toil-6.1.0}/src/toil/test/utils/utilsTest.py +23 -3
  128. toil-6.1.0/src/toil/test/wdl/wdltoil_test.py +418 -0
  129. {toil-5.12.0 → toil-6.1.0}/src/toil/toilState.py +7 -6
  130. {toil-5.12.0 → toil-6.1.0}/src/toil/utils/toilClean.py +1 -1
  131. toil-6.1.0/src/toil/utils/toilConfig.py +36 -0
  132. {toil-5.12.0 → toil-6.1.0}/src/toil/utils/toilDebugFile.py +60 -33
  133. toil-6.1.0/src/toil/utils/toilDebugJob.py +77 -0
  134. {toil-5.12.0 → toil-6.1.0}/src/toil/utils/toilDestroyCluster.py +1 -1
  135. {toil-5.12.0 → toil-6.1.0}/src/toil/utils/toilKill.py +1 -1
  136. {toil-5.12.0 → toil-6.1.0}/src/toil/utils/toilLaunchCluster.py +13 -2
  137. {toil-5.12.0 → toil-6.1.0}/src/toil/utils/toilMain.py +3 -2
  138. {toil-5.12.0 → toil-6.1.0}/src/toil/utils/toilRsyncCluster.py +1 -1
  139. {toil-5.12.0 → toil-6.1.0}/src/toil/utils/toilSshCluster.py +1 -1
  140. toil-6.1.0/src/toil/utils/toilStats.py +701 -0
  141. {toil-5.12.0 → toil-6.1.0}/src/toil/utils/toilStatus.py +2 -5
  142. toil-6.1.0/src/toil/version.py +14 -0
  143. toil-6.1.0/src/toil/wdl/__init__.py +0 -0
  144. toil-6.1.0/src/toil/wdl/utils.py +35 -0
  145. {toil-5.12.0 → toil-6.1.0}/src/toil/wdl/wdltoil.py +1257 -492
  146. {toil-5.12.0 → toil-6.1.0}/src/toil/worker.py +55 -46
  147. toil-6.1.0/src/toil.egg-info/PKG-INFO +123 -0
  148. {toil-5.12.0 → toil-6.1.0}/src/toil.egg-info/SOURCES.txt +13 -16
  149. {toil-5.12.0 → toil-6.1.0}/src/toil.egg-info/entry_points.txt +0 -1
  150. {toil-5.12.0 → toil-6.1.0}/src/toil.egg-info/requires.txt +35 -21
  151. toil-5.12.0/PKG-INFO +0 -42
  152. toil-5.12.0/requirements-cwl.txt +0 -7
  153. toil-5.12.0/requirements-dev.txt +0 -28
  154. toil-5.12.0/requirements-mesos.txt +0 -1
  155. toil-5.12.0/requirements-wdl.txt +0 -2
  156. toil-5.12.0/src/toil/batchSystems/parasol.py +0 -379
  157. toil-5.12.0/src/toil/batchSystems/tes.py +0 -459
  158. toil-5.12.0/src/toil/common.py +0 -1885
  159. toil-5.12.0/src/toil/cwl/__init__.py +0 -58
  160. toil-5.12.0/src/toil/lib/generatedEC2Lists.py +0 -508
  161. toil-5.12.0/src/toil/test/batchSystems/parasolTestSupport.py +0 -117
  162. toil-5.12.0/src/toil/test/utils/toilDebugTest.py +0 -135
  163. toil-5.12.0/src/toil/test/wdl/builtinTest.py +0 -506
  164. toil-5.12.0/src/toil/test/wdl/conftest.py +0 -23
  165. toil-5.12.0/src/toil/test/wdl/toilwdlTest.py +0 -522
  166. toil-5.12.0/src/toil/test/wdl/wdltoil_test.py +0 -240
  167. toil-5.12.0/src/toil/utils/toilDebugJob.py +0 -50
  168. toil-5.12.0/src/toil/utils/toilStats.py +0 -561
  169. toil-5.12.0/src/toil/version.py +0 -14
  170. toil-5.12.0/src/toil/wdl/toilwdl.py +0 -141
  171. toil-5.12.0/src/toil/wdl/utils.py +0 -155
  172. toil-5.12.0/src/toil/wdl/versions/dev.py +0 -107
  173. toil-5.12.0/src/toil/wdl/versions/draft2.py +0 -980
  174. toil-5.12.0/src/toil/wdl/versions/v1.py +0 -794
  175. toil-5.12.0/src/toil/wdl/wdl_analysis.py +0 -116
  176. toil-5.12.0/src/toil/wdl/wdl_functions.py +0 -997
  177. toil-5.12.0/src/toil/wdl/wdl_synthesis.py +0 -1011
  178. toil-5.12.0/src/toil/wdl/wdl_types.py +0 -243
  179. toil-5.12.0/src/toil.egg-info/PKG-INFO +0 -42
  180. {toil-5.12.0 → toil-6.1.0}/LICENSE +0 -0
  181. {toil-5.12.0 → toil-6.1.0}/MANIFEST.in +0 -0
  182. {toil-5.12.0 → toil-6.1.0}/README.rst +0 -0
  183. {toil-5.12.0 → toil-6.1.0}/requirements-aws.txt +0 -0
  184. {toil-5.12.0 → toil-6.1.0}/requirements-encryption.txt +0 -0
  185. {toil-5.12.0 → toil-6.1.0}/requirements-google.txt +0 -0
  186. {toil-5.12.0 → toil-6.1.0}/requirements-htcondor.txt +0 -0
  187. {toil-5.12.0 → toil-6.1.0}/requirements-kubernetes.txt +0 -0
  188. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/__init__.py +0 -0
  189. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/gridengine.py +0 -0
  190. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/lsfHelper.py +0 -0
  191. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/mesos/__init__.py +0 -0
  192. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/mesos/conftest.py +0 -0
  193. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/mesos/executor.py +0 -0
  194. {toil-5.12.0 → toil-6.1.0}/src/toil/batchSystems/mesos/test/__init__.py +0 -0
  195. {toil-5.12.0 → toil-6.1.0}/src/toil/cwl/conftest.py +0 -0
  196. {toil-5.12.0 → toil-6.1.0}/src/toil/deferred.py +0 -0
  197. {toil-5.12.0 → toil-6.1.0}/src/toil/jobStores/__init__.py +0 -0
  198. {toil-5.12.0 → toil-6.1.0}/src/toil/jobStores/aws/__init__.py +0 -0
  199. {toil-5.12.0 → toil-6.1.0}/src/toil/jobStores/conftest.py +0 -0
  200. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/__init__.py +0 -0
  201. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/bioio.py +0 -0
  202. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/encryption/__init__.py +0 -0
  203. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/encryption/_dummy.py +0 -0
  204. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/encryption/conftest.py +0 -0
  205. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/exceptions.py +0 -0
  206. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/expando.py +0 -0
  207. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/humanize.py +0 -0
  208. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/iterables.py +0 -0
  209. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/memoize.py +0 -0
  210. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/objects.py +0 -0
  211. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/retry.py +0 -0
  212. {toil-5.12.0 → toil-6.1.0}/src/toil/lib/throttle.py +0 -0
  213. {toil-5.12.0/src/toil/server → toil-6.1.0/src/toil/options}/__init__.py +0 -0
  214. {toil-5.12.0 → toil-6.1.0}/src/toil/provisioners/__init__.py +0 -0
  215. {toil-5.12.0 → toil-6.1.0}/src/toil/provisioners/node.py +0 -0
  216. {toil-5.12.0/src/toil/server/api_spec → toil-6.1.0/src/toil/server}/__init__.py +0 -0
  217. {toil-5.12.0/src/toil/server/cli → toil-6.1.0/src/toil/server/api_spec}/__init__.py +0 -0
  218. {toil-5.12.0 → toil-6.1.0}/src/toil/server/api_spec/workflow_execution_service.swagger.yaml +0 -0
  219. {toil-5.12.0 → toil-6.1.0}/src/toil/server/celery_app.py +0 -0
  220. {toil-5.12.0/src/toil/server/wes → toil-6.1.0/src/toil/server/cli}/__init__.py +0 -0
  221. {toil-5.12.0/src/toil/test/cwl → toil-6.1.0/src/toil/server/wes}/__init__.py +0 -0
  222. {toil-5.12.0 → toil-6.1.0}/src/toil/test/batchSystems/__init__.py +0 -0
  223. {toil-5.12.0 → toil-6.1.0}/src/toil/test/batchSystems/test_lsf_helper.py +0 -0
  224. {toil-5.12.0/src/toil/test/docs → toil-6.1.0/src/toil/test/cactus}/__init__.py +0 -0
  225. {toil-5.12.0/src/toil/test/lib → toil-6.1.0/src/toil/test/cwl}/__init__.py +0 -0
  226. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/alwaysfails.cwl +0 -0
  227. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/colon_test_output.cwl +0 -0
  228. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/colon_test_output_job.yaml +0 -0
  229. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/conditional_wf.cwl +0 -0
  230. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/conditional_wf.yaml +0 -0
  231. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/conftest.py +0 -0
  232. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/directory_from_directory.cwl +0 -0
  233. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/download.cwl +0 -0
  234. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/download_directory.cwl +0 -0
  235. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/download_subdirectory.cwl +0 -0
  236. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/echo-stderr.cwl +0 -0
  237. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/echo-stdout-log-dir.cwl +0 -0
  238. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/echo.cwl +0 -0
  239. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/echo_string.cwl +0 -0
  240. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/echo_string_scatter_capture_stdout.cwl +0 -0
  241. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/file_from_directory.cwl +0 -0
  242. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/load_contents.cwl +0 -0
  243. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/mpi_simple.cwl +0 -0
  244. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/nvidia_smi.cwl +0 -0
  245. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/revtool.cwl +0 -0
  246. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/revtool2.cwl +0 -0
  247. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/s3_secondary_file.cwl +0 -0
  248. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/seqtk_seq.cwl +0 -0
  249. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/sorttool.cwl +0 -0
  250. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/stream.cwl +0 -0
  251. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/test_filename_conflict_detection.cwl +0 -0
  252. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/test_filename_conflict_detection_at_root.cwl +0 -0
  253. {toil-5.12.0 → toil-6.1.0}/src/toil/test/cwl/test_filename_conflict_resolution.cwl +0 -0
  254. {toil-5.12.0/src/toil/test/lib/aws → toil-6.1.0/src/toil/test/docs}/__init__.py +0 -0
  255. {toil-5.12.0 → toil-6.1.0}/src/toil/test/jobStores/__init__.py +0 -0
  256. {toil-5.12.0/src/toil/test/wdl → toil-6.1.0/src/toil/test/lib}/__init__.py +0 -0
  257. {toil-5.12.0/src/toil/utils → toil-6.1.0/src/toil/test/lib/aws}/__init__.py +0 -0
  258. {toil-5.12.0 → toil-6.1.0}/src/toil/test/lib/aws/test_s3.py +0 -0
  259. {toil-5.12.0 → toil-6.1.0}/src/toil/test/lib/test_conversions.py +0 -0
  260. {toil-5.12.0 → toil-6.1.0}/src/toil/test/lib/test_misc.py +0 -0
  261. {toil-5.12.0 → toil-6.1.0}/src/toil/test/mesos/MesosDataStructuresTest.py +0 -0
  262. {toil-5.12.0 → toil-6.1.0}/src/toil/test/mesos/__init__.py +0 -0
  263. {toil-5.12.0/src/toil/test/provisioners → toil-6.1.0/src/toil/test/options}/__init__.py +0 -0
  264. {toil-5.12.0/src/toil/test/provisioners/aws → toil-6.1.0/src/toil/test/provisioners}/__init__.py +0 -0
  265. {toil-5.12.0/src/toil/test/server → toil-6.1.0/src/toil/test/provisioners/aws}/__init__.py +0 -0
  266. {toil-5.12.0 → toil-6.1.0}/src/toil/test/provisioners/provisionerTest.py +0 -0
  267. {toil-5.12.0/src/toil/test/sort → toil-6.1.0/src/toil/test/server}/__init__.py +0 -0
  268. {toil-5.12.0/src/toil/test/src → toil-6.1.0/src/toil/test/sort}/__init__.py +0 -0
  269. {toil-5.12.0/src/toil/test/utils → toil-6.1.0/src/toil/test/src}/__init__.py +0 -0
  270. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/deferredFunctionTest.py +1 -1
  271. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/dockerCheckTest.py +0 -0
  272. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/importExportFileTest.py +1 -1
  273. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/jobEncapsulationTest.py +0 -0
  274. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/jobFileStoreTest.py +0 -0
  275. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/jobServiceTest.py +1 -1
  276. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/promisesTest.py +0 -0
  277. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/regularLogTest.py +0 -0
  278. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/restartDAGTest.py +1 -1
  279. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/retainTempDirTest.py +1 -1
  280. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/threadingTest.py +0 -0
  281. {toil-5.12.0 → toil-6.1.0}/src/toil/test/src/workerTest.py +0 -0
  282. {toil-5.12.0/src/toil → toil-6.1.0/src/toil/test}/wdl/__init__.py +0 -0
  283. {toil-5.12.0/src/toil/wdl/versions → toil-6.1.0/src/toil/utils}/__init__.py +0 -0
  284. {toil-5.12.0 → toil-6.1.0}/src/toil/utils/toilServer.py +0 -0
  285. {toil-5.12.0 → toil-6.1.0}/src/toil/utils/toilUpdateEC2Instances.py +0 -0
  286. {toil-5.12.0 → toil-6.1.0}/src/toil.egg-info/dependency_links.txt +0 -0
  287. {toil-5.12.0 → toil-6.1.0}/src/toil.egg-info/top_level.txt +0 -0
toil-6.1.0/PKG-INFO ADDED
@@ -0,0 +1,123 @@
1
+ Metadata-Version: 2.1
2
+ Name: toil
3
+ Version: 6.1.0
4
+ Summary: Pipeline management software for clusters.
5
+ Home-page: https://github.com/DataBiosphere/toil
6
+ Author: Benedict Paten and the Toil community
7
+ Author-email: toil-community@googlegroups.com
8
+ License: Apache License v2.0
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Intended Audience :: Healthcare Industry
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Natural Language :: English
16
+ Classifier: Operating System :: MacOS :: MacOS X
17
+ Classifier: Operating System :: POSIX
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Topic :: Scientific/Engineering
24
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
25
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
26
+ Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
27
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
28
+ Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
29
+ Classifier: Topic :: System :: Distributed Computing
30
+ Classifier: Topic :: Utilities
31
+ Requires-Python: >=3.8
32
+ License-File: LICENSE
33
+ Requires-Dist: dill<0.4,>=0.3.2
34
+ Requires-Dist: requests<3,>=2
35
+ Requires-Dist: docker<8,>=6.1.0
36
+ Requires-Dist: urllib3<3,>=1.26.0
37
+ Requires-Dist: python-dateutil
38
+ Requires-Dist: psutil<6,>=3.0.1
39
+ Requires-Dist: PyPubSub<5,>=4.0.3
40
+ Requires-Dist: addict<2.5,>=2.2.1
41
+ Requires-Dist: pytz>=2012
42
+ Requires-Dist: enlighten<2,>=1.5.2
43
+ Requires-Dist: configargparse<2,>=1.7
44
+ Requires-Dist: ruamel.yaml>=0.15
45
+ Requires-Dist: pyyaml<7,>=6
46
+ Requires-Dist: typing-extensions<5,>=4.6.2
47
+ Provides-Extra: aws
48
+ Requires-Dist: boto<3,>=2.48.0; extra == "aws"
49
+ Requires-Dist: boto3-stubs[boto3,iam,s3,sdb,sts]<2,>=1.28.3.post2; extra == "aws"
50
+ Requires-Dist: mypy-boto3-iam<2,>=1.28.3.post2; extra == "aws"
51
+ Requires-Dist: moto<5,>=4.1.11; extra == "aws"
52
+ Provides-Extra: cwl
53
+ Requires-Dist: cwltool==3.1.20240112164112; extra == "cwl"
54
+ Requires-Dist: schema-salad<9,>=8.4.20230128170514; extra == "cwl"
55
+ Requires-Dist: galaxy-tool-util<23; extra == "cwl"
56
+ Requires-Dist: galaxy-util<23; extra == "cwl"
57
+ Requires-Dist: ruamel.yaml<=0.19,>=0.15; extra == "cwl"
58
+ Requires-Dist: ruamel.yaml.clib>=0.2.6; extra == "cwl"
59
+ Requires-Dist: networkx!=2.8.1,<4; extra == "cwl"
60
+ Requires-Dist: CacheControl[filecache]; extra == "cwl"
61
+ Provides-Extra: encryption
62
+ Requires-Dist: pynacl<2,>=1.4.0; extra == "encryption"
63
+ Provides-Extra: google
64
+ Requires-Dist: apache-libcloud<3,>=2.2.1; extra == "google"
65
+ Requires-Dist: google-cloud-storage<=2.8.0,>=2; extra == "google"
66
+ Requires-Dist: google-auth<3,>=2.18.1; extra == "google"
67
+ Provides-Extra: kubernetes
68
+ Requires-Dist: kubernetes<22,>=12.0.1; extra == "kubernetes"
69
+ Requires-Dist: kubernetes-stubs==v22.6.0post1; extra == "kubernetes"
70
+ Requires-Dist: types-urllib3; extra == "kubernetes"
71
+ Requires-Dist: types-PyYAML; extra == "kubernetes"
72
+ Requires-Dist: idna>=2; extra == "kubernetes"
73
+ Provides-Extra: wdl
74
+ Requires-Dist: miniwdl==1.11.1; extra == "wdl"
75
+ Requires-Dist: wdlparse==0.1.0; extra == "wdl"
76
+ Requires-Dist: graphlib-backport==1.0; python_version < "3.9" and extra == "wdl"
77
+ Provides-Extra: server
78
+ Requires-Dist: connexion[swagger-ui]<3,>=2.10.0; extra == "server"
79
+ Requires-Dist: flask<3,>=2.0; extra == "server"
80
+ Requires-Dist: werkzeug<3,>=2.0; extra == "server"
81
+ Requires-Dist: flask-cors==4.0.0; extra == "server"
82
+ Requires-Dist: gunicorn==21.2.0; extra == "server"
83
+ Requires-Dist: celery<6,>=5.1.0; extra == "server"
84
+ Requires-Dist: wes-service<5,>=4.0.0; extra == "server"
85
+ Requires-Dist: ruamel.yaml<0.19,>=0.15; extra == "server"
86
+ Provides-Extra: htcondor
87
+ Requires-Dist: htcondor<11,>=10.2.0.post1; sys_platform != "darwin" and extra == "htcondor"
88
+ Provides-Extra: mesos
89
+ Requires-Dist: pymesos<0.4,>=0.3.15; python_version < "3.11" and extra == "mesos"
90
+ Provides-Extra: all
91
+ Requires-Dist: boto<3,>=2.48.0; extra == "all"
92
+ Requires-Dist: boto3-stubs[boto3,iam,s3,sdb,sts]<2,>=1.28.3.post2; extra == "all"
93
+ Requires-Dist: mypy-boto3-iam<2,>=1.28.3.post2; extra == "all"
94
+ Requires-Dist: moto<5,>=4.1.11; extra == "all"
95
+ Requires-Dist: cwltool==3.1.20240112164112; extra == "all"
96
+ Requires-Dist: schema-salad<9,>=8.4.20230128170514; extra == "all"
97
+ Requires-Dist: galaxy-tool-util<23; extra == "all"
98
+ Requires-Dist: galaxy-util<23; extra == "all"
99
+ Requires-Dist: ruamel.yaml<=0.19,>=0.15; extra == "all"
100
+ Requires-Dist: ruamel.yaml.clib>=0.2.6; extra == "all"
101
+ Requires-Dist: networkx!=2.8.1,<4; extra == "all"
102
+ Requires-Dist: CacheControl[filecache]; extra == "all"
103
+ Requires-Dist: pynacl<2,>=1.4.0; extra == "all"
104
+ Requires-Dist: apache-libcloud<3,>=2.2.1; extra == "all"
105
+ Requires-Dist: google-cloud-storage<=2.8.0,>=2; extra == "all"
106
+ Requires-Dist: google-auth<3,>=2.18.1; extra == "all"
107
+ Requires-Dist: kubernetes<22,>=12.0.1; extra == "all"
108
+ Requires-Dist: kubernetes-stubs==v22.6.0post1; extra == "all"
109
+ Requires-Dist: types-urllib3; extra == "all"
110
+ Requires-Dist: types-PyYAML; extra == "all"
111
+ Requires-Dist: idna>=2; extra == "all"
112
+ Requires-Dist: miniwdl==1.11.1; extra == "all"
113
+ Requires-Dist: wdlparse==0.1.0; extra == "all"
114
+ Requires-Dist: graphlib-backport==1.0; python_version < "3.9" and extra == "all"
115
+ Requires-Dist: connexion[swagger-ui]<3,>=2.10.0; extra == "all"
116
+ Requires-Dist: flask<3,>=2.0; extra == "all"
117
+ Requires-Dist: werkzeug<3,>=2.0; extra == "all"
118
+ Requires-Dist: flask-cors==4.0.0; extra == "all"
119
+ Requires-Dist: gunicorn==21.2.0; extra == "all"
120
+ Requires-Dist: celery<6,>=5.1.0; extra == "all"
121
+ Requires-Dist: wes-service<5,>=4.0.0; extra == "all"
122
+ Requires-Dist: ruamel.yaml<0.19,>=0.15; extra == "all"
123
+ Requires-Dist: pymesos<0.4,>=0.3.15; python_version < "3.11" and extra == "all"
@@ -0,0 +1,8 @@
1
+ cwltool==3.1.20240112164112
2
+ schema-salad>=8.4.20230128170514,<9
3
+ galaxy-tool-util<23
4
+ galaxy-util<23
5
+ ruamel.yaml>=0.15,<=0.19
6
+ ruamel.yaml.clib>=0.2.6
7
+ networkx!=2.8.1,<4
8
+ CacheControl[filecache]
@@ -0,0 +1,29 @@
1
+ pytest>=6.2.1,<9
2
+ pytest-cov>=2.12.1,<5
3
+ pytest-timeout>=1.4.2,<3
4
+ stubserver>=1.1,<2
5
+ setuptools>=65.5.1,<70
6
+ sphinx>=7,<8
7
+ sphinx-autoapi>=2.1.1,<3
8
+ # astroid 3 won't work until some sphinx-autoapi release after 2.1.1
9
+ astroid>=2.15,<3
10
+ sphinx-autodoc-typehints>=1.24.0,<3
11
+ sphinxcontrib-autoprogram==0.1.8
12
+ cwltest>=2.2.20211116163652
13
+ mypy==1.8.0
14
+ types-requests
15
+ types-setuptools
16
+ types-boto<2.49.18.20240205
17
+ types-pytz
18
+ flake8>=3.8.4,<8
19
+ flake8-bugbear>=20.11.1,<25
20
+ black
21
+ isort
22
+ pydocstyle
23
+ autoflake
24
+ isort
25
+ diff_cover
26
+ lxml
27
+ docutils>=0.16,<0.21
28
+ pyupgrade
29
+ pytest-xdist
@@ -0,0 +1 @@
1
+ pymesos>=0.3.15,<0.4 ; python_version < '3.11'
@@ -1,8 +1,8 @@
1
1
  connexion[swagger-ui]>=2.10.0, <3
2
2
  flask>=2.0,<3
3
3
  werkzeug>=2.0,<3
4
- flask-cors==3.0.10
5
- gunicorn==20.1.0
4
+ flask-cors==4.0.0
5
+ gunicorn==21.2.0
6
6
  celery>=5.1.0, <6
7
7
  wes-service>=4.0.0, <5
8
- ruamel.yaml>=0.15,<0.17.22
8
+ ruamel.yaml>=0.15,<0.19
@@ -0,0 +1,3 @@
1
+ miniwdl==1.11.1
2
+ wdlparse==0.1.0
3
+ graphlib-backport==1.0 ; python_version < '3.9'
@@ -1,13 +1,15 @@
1
1
  dill>=0.3.2, <0.4
2
2
  requests>=2, <3
3
- docker>=3.7.2, <6
3
+ docker>=6.1.0, <8
4
4
  # Work around https://github.com/docker/docker-py/issues/3113
5
- urllib3>=1.26.0, <2.0.0
5
+ urllib3>=1.26.0,<3
6
6
  python-dateutil
7
7
  psutil >= 3.0.1, <6
8
- py-tes>=0.4.2,<1
9
8
  PyPubSub >=4.0.3, <5
10
9
  addict>=2.2.1, <2.5
11
10
  pytz>=2012
12
11
  enlighten>=1.5.2, <2
13
- typing-extensions
12
+ configargparse>=1.7,<2
13
+ ruamel.yaml>=0.15
14
+ pyyaml>=6,<7
15
+ typing-extensions>=4.6.2, <5
@@ -23,13 +23,12 @@ markers =
23
23
  local_cuda
24
24
  lsf
25
25
  mesos
26
- parasol
26
+ online
27
27
  rsync
28
28
  server_mode
29
29
  slow
30
30
  slurm
31
31
  singularity
32
- tes
33
32
  torque
34
33
  wes_server
35
34
  cwl_small_log_dir
@@ -62,10 +61,6 @@ no_warn_no_return = True
62
61
  [mypy-toil.cwl.*]
63
62
  strict = True
64
63
 
65
- [mypy-tes]
66
- ignore_errors = True
67
- follow_imports = skip
68
-
69
64
  [egg_info]
70
65
  tag_build =
71
66
  tag_date = 0
@@ -11,8 +11,10 @@
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 imp
14
+ # import imp
15
15
  import os
16
+ import types
17
+ from importlib.machinery import SourceFileLoader
16
18
  from tempfile import NamedTemporaryFile
17
19
 
18
20
  from setuptools import find_packages, setup
@@ -47,13 +49,13 @@ def run_setup():
47
49
  # to how wheels work, so it is not included in all and
48
50
  # must be explicitly installed as an extra
49
51
  all_reqs = []
52
+
50
53
  non_htcondor_extras = [
51
54
  "aws",
52
55
  "cwl",
53
56
  "encryption",
54
57
  "google",
55
58
  "kubernetes",
56
- "mesos",
57
59
  "wdl",
58
60
  "server"
59
61
  ]
@@ -62,8 +64,9 @@ def run_setup():
62
64
  all_reqs += extras_require[extra]
63
65
  # We exclude htcondor from "all" because it can't be on Mac
64
66
  extras_require['htcondor:sys_platform!="darwin"'] = get_requirements("htcondor")
67
+ extras_require['mesos'] = get_requirements("mesos")
68
+ all_reqs += get_requirements("mesos")
65
69
  extras_require["all"] = all_reqs
66
-
67
70
  setup(
68
71
  name='toil',
69
72
  version=version.distVersion,
@@ -82,10 +85,10 @@ def run_setup():
82
85
  'Operating System :: MacOS :: MacOS X',
83
86
  'Operating System :: POSIX',
84
87
  'Operating System :: POSIX :: Linux',
85
- 'Programming Language :: Python :: 3.7',
86
88
  'Programming Language :: Python :: 3.8',
87
89
  'Programming Language :: Python :: 3.9',
88
90
  'Programming Language :: Python :: 3.10',
91
+ 'Programming Language :: Python :: 3.11',
89
92
  'Topic :: Scientific/Engineering',
90
93
  'Topic :: Scientific/Engineering :: Bio-Informatics',
91
94
  'Topic :: Scientific/Engineering :: Astronomy',
@@ -95,7 +98,7 @@ def run_setup():
95
98
  'Topic :: System :: Distributed Computing',
96
99
  'Topic :: Utilities'],
97
100
  license="Apache License v2.0",
98
- python_requires=">=3.7",
101
+ python_requires=">=3.8",
99
102
  install_requires=install_requires,
100
103
  extras_require=extras_require,
101
104
  package_dir={'': 'src'},
@@ -113,7 +116,6 @@ def run_setup():
113
116
  'cwltoil = toil.cwl.cwltoil:cwltoil_was_removed [cwl]',
114
117
  'toil-cwl-runner = toil.cwl.cwltoil:main [cwl]',
115
118
  'toil-wdl-runner = toil.wdl.wdltoil:main [wdl]',
116
- 'toil-wdl-runner-old = toil.wdl.toilwdl:main [wdl]',
117
119
  'toil-wes-cwl-runner = toil.server.cli.wes_cwl_runner:main [server]',
118
120
  '_toil_mesos_executor = toil.batchSystems.mesos.executor:main [mesos]',
119
121
  '_toil_contained_executor = toil.batchSystems.contained_executor:executor']})
@@ -146,7 +148,10 @@ def import_version():
146
148
  # return SourceFileLoader('toil.version', path='src/toil/version.py').load_module()
147
149
  #
148
150
  # Because SourceFileLoader will error and load "src/toil/__init__.py" .
149
- return imp.load_source('toil.version', 'src/toil/version.py')
151
+ loader = SourceFileLoader('toil.version', 'src/toil/version.py')
152
+ mod = types.ModuleType(loader.name)
153
+ loader.exec_module(mod)
154
+ return mod
150
155
 
151
156
 
152
157
  version = import_version()
@@ -20,6 +20,7 @@ import sys
20
20
  import time
21
21
  from datetime import datetime
22
22
  from typing import TYPE_CHECKING, Optional, Tuple
23
+
23
24
  import requests
24
25
  from pytz import timezone
25
26
 
@@ -106,7 +107,8 @@ def toilPackageDirPath() -> str:
106
107
  The return value is guaranteed to end in '/toil'.
107
108
  """
108
109
  result = os.path.dirname(os.path.realpath(__file__))
109
- assert result.endswith('/toil')
110
+ if not result.endswith('/toil'):
111
+ raise RuntimeError("The top-level toil package is not named Toil.")
110
112
  return result
111
113
 
112
114
 
@@ -132,7 +134,8 @@ def resolveEntryPoint(entryPoint: str) -> str:
132
134
  # opposed to being included via --system-site-packages). For clusters this means that
133
135
  # if Toil is installed in a virtualenv on the leader, it must be installed in
134
136
  # a virtualenv located at the same path on each worker as well.
135
- assert os.access(path, os.X_OK)
137
+ if not os.access(path, os.X_OK):
138
+ raise RuntimeError("Cannot access the Toil virtualenv. If installed in a virtualenv on a cluster, make sure that the virtualenv path is the same for the leader and workers.")
136
139
  return path
137
140
  # Otherwise, we aren't in a virtualenv, or we're in a virtualenv but Toil
138
141
  # came in via --system-site-packages, or we think the virtualenv might not
@@ -238,7 +241,8 @@ def customInitCmd() -> str:
238
241
 
239
242
  def _check_custom_bash_cmd(cmd_str):
240
243
  """Ensure that the Bash command doesn't contain invalid characters."""
241
- assert not re.search(r'[\n\r\t]', cmd_str), f'"{cmd_str}" contains invalid characters (newline and/or tab).'
244
+ if re.search(r'[\n\r\t]', cmd_str):
245
+ raise RuntimeError(f'"{cmd_str}" contains invalid characters (newline and/or tab).')
242
246
 
243
247
 
244
248
  def lookupEnvVar(name: str, envName: str, defaultValue: str) -> str:
@@ -370,11 +374,10 @@ def requestCheckRegularDocker(origAppliance: str, registryName: str, imageName:
370
374
  separate check is done for docker.io images.
371
375
 
372
376
  :param origAppliance: The full url of the docker image originally
373
- specified by the user (or the default).
374
- e.g. ``quay.io/ucsc_cgl/toil:latest``
375
- :param registryName: The url of a docker image's registry. e.g. ``quay.io``
376
- :param imageName: The image, including path and excluding the tag. e.g. ``ucsc_cgl/toil``
377
- :param tag: The tag used at that docker image's registry. e.g. ``latest``
377
+ specified by the user (or the default). For example, ``quay.io/ucsc_cgl/toil:latest``.
378
+ :param registryName: The url of a docker image's registry. For example, ``quay.io``.
379
+ :param imageName: The image, including path and excluding the tag. For example, ``ucsc_cgl/toil``.
380
+ :param tag: The tag used at that docker image's registry. For example, ``latest``.
378
381
  :raises: ApplianceImageNotFound if no match is found.
379
382
  :return: Return True if match found.
380
383
  """
@@ -399,9 +402,9 @@ def requestCheckDockerIo(origAppliance: str, imageName: str, tag: str) -> bool:
399
402
  URL is based on the docker v2 schema. Requires that an access token be fetched first.
400
403
 
401
404
  :param origAppliance: The full url of the docker image originally
402
- specified by the user (or the default). e.g. "ubuntu:latest"
403
- :param imageName: The image, including path and excluding the tag. e.g. "ubuntu"
404
- :param tag: The tag used at that docker image's registry. e.g. "latest"
405
+ specified by the user (or the default). For example, ``ubuntu:latest``.
406
+ :param imageName: The image, including path and excluding the tag. For example, ``ubuntu``.
407
+ :param tag: The tag used at that docker image's registry. For example, ``latest``.
405
408
  :raises: ApplianceImageNotFound if no match is found.
406
409
  :return: Return True if match found.
407
410
  """
@@ -548,7 +551,8 @@ try:
548
551
  So if we ever want to refresh, Boto 3 wants to refresh too.
549
552
  """
550
553
  # This should only happen if we have expiring credentials, which we should only get from boto3
551
- assert (self._boto3_resolver is not None)
554
+ if self._boto3_resolver is None:
555
+ raise RuntimeError("The Boto3 resolver should not be None.")
552
556
 
553
557
  self._obtain_credentials_from_cache_or_boto3()
554
558
 
@@ -612,7 +616,8 @@ try:
612
616
  content = f.read()
613
617
  if content:
614
618
  record = content.split('\n')
615
- assert len(record) == 4
619
+ if len(record) != 4:
620
+ raise RuntimeError("Number of cached credentials is not 4.")
616
621
  self._access_key = record[0]
617
622
  self._secret_key = record[1]
618
623
  self._security_token = record[2]
@@ -15,19 +15,19 @@ import enum
15
15
  import logging
16
16
  import os
17
17
  import shutil
18
+ import time
18
19
  from abc import ABC, abstractmethod
19
20
  from argparse import ArgumentParser, _ArgumentGroup
20
21
  from contextlib import contextmanager
21
22
  from threading import Condition
22
- import time
23
23
  from typing import (Any,
24
24
  ContextManager,
25
25
  Dict,
26
- List,
27
- Set,
28
26
  Iterator,
27
+ List,
29
28
  NamedTuple,
30
29
  Optional,
30
+ Set,
31
31
  Union,
32
32
  cast)
33
33
 
@@ -37,6 +37,7 @@ from toil.common import Config, Toil, cacheDirName
37
37
  from toil.deferred import DeferredFunctionManager
38
38
  from toil.fileStores.abstractFileStore import AbstractFileStore
39
39
  from toil.job import JobDescription, ParsedRequirement, Requirer
40
+ from toil.lib.memoize import memoize
40
41
  from toil.resource import Resource
41
42
 
42
43
  logger = logging.getLogger(__name__)
@@ -58,13 +59,28 @@ class BatchJobExitReason(enum.IntEnum):
58
59
  MEMLIMIT: int = 6
59
60
  """Job hit batch system imposed memory limit."""
60
61
 
62
+ @classmethod
63
+ def to_string(cls, value: int) -> str:
64
+ """
65
+ Convert to human-readable string.
66
+
67
+ Given an int that may be or may be equal to a value from the enum,
68
+ produce the string value of its matching enum entry, or a stringified
69
+ int.
70
+ """
71
+ try:
72
+ return cls(value).name
73
+ except ValueError:
74
+ return str(value)
75
+
61
76
  class UpdatedBatchJobInfo(NamedTuple):
62
77
  jobID: int
63
78
  exitStatus: int
64
79
  """
65
80
  The exit status (integer value) of the job. 0 implies successful.
66
81
 
67
- EXIT_STATUS_UNAVAILABLE_VALUE is used when the exit status is not available (e.g. job is lost).
82
+ EXIT_STATUS_UNAVAILABLE_VALUE is used when the exit status is not available
83
+ (e.g. job is lost, or otherwise died but actual exit code was not reported).
68
84
  """
69
85
 
70
86
  exitReason: Optional[BatchJobExitReason]
@@ -106,6 +122,8 @@ class AbstractBatchSystem(ABC):
106
122
  @abstractmethod
107
123
  def supportsWorkerCleanup(cls) -> bool:
108
124
  """
125
+ Whether this batch system supports worker cleanup.
126
+
109
127
  Indicates whether this batch system invokes
110
128
  :meth:`BatchSystemSupport.workerCleanup` after the last job for a
111
129
  particular workflow invocation finishes. Note that the term *worker*
@@ -119,7 +137,9 @@ class AbstractBatchSystem(ABC):
119
137
 
120
138
  def setUserScript(self, userScript: Resource) -> None:
121
139
  """
122
- Set the user script for this workflow. This method must be called before the first job is
140
+ Set the user script for this workflow.
141
+
142
+ This method must be called before the first job is
123
143
  issued to this batch system, and only if :meth:`.supportsAutoDeployment` returns True,
124
144
  otherwise it will raise an exception.
125
145
 
@@ -134,7 +154,6 @@ class AbstractBatchSystem(ABC):
134
154
  bus, so that it can send informational messages about the jobs it is
135
155
  running to other Toil components.
136
156
  """
137
- pass
138
157
 
139
158
  @abstractmethod
140
159
  def issueBatchJob(self, jobDesc: JobDescription, job_environment: Optional[Dict[str, str]] = None) -> int:
@@ -263,7 +282,6 @@ class AbstractBatchSystem(ABC):
263
282
  setOption(option_name, parsing_function=None, check_function=None, default=None, env=None)
264
283
  returning nothing, used to update run configuration as a side effect.
265
284
  """
266
- pass
267
285
 
268
286
  def getWorkerContexts(self) -> List[ContextManager[Any]]:
269
287
  """
@@ -372,7 +390,7 @@ class BatchSystemSupport(AbstractBatchSystem):
372
390
  :param name: the environment variable to be set on the worker.
373
391
 
374
392
  :param value: if given, the environment variable given by name will be set to this value.
375
- if None, the variable's current value will be used as the value on the worker
393
+ If None, the variable's current value will be used as the value on the worker
376
394
 
377
395
  :raise RuntimeError: if value is None and the name cannot be found in the environment
378
396
  """
@@ -392,6 +410,7 @@ class BatchSystemSupport(AbstractBatchSystem):
392
410
  # We do in fact send messages to the message bus.
393
411
  self._outbox = message_bus.outbox()
394
412
 
413
+ @memoize
395
414
  def get_batch_logs_dir(self) -> str:
396
415
  """
397
416
  Get the directory where the backing batch system should save its logs.
@@ -404,6 +423,9 @@ class BatchSystemSupport(AbstractBatchSystem):
404
423
  """
405
424
  if self.config.batch_logs_dir:
406
425
  # Use what is specified
426
+ if not os.path.isdir(self.config.batch_logs_dir):
427
+ # But if it doesn't exist, make it exist
428
+ os.makedirs(self.config.batch_logs_dir, exist_ok=True)
407
429
  return self.config.batch_logs_dir
408
430
  # And if nothing is specified use the workDir.
409
431
  return Toil.getToilWorkDir(self.config.workDir)
@@ -430,7 +452,7 @@ class BatchSystemSupport(AbstractBatchSystem):
430
452
  file_name: str = f'toil_{self.config.workflowID}.{toil_job_id}.{cluster_job_id}.{std}.log'
431
453
  logs_dir: str = self.get_batch_logs_dir()
432
454
  return os.path.join(logs_dir, file_name)
433
-
455
+
434
456
  def format_std_out_err_glob(self, toil_job_id: int) -> str:
435
457
  """
436
458
  Get a glob string that will match all file paths generated by format_std_out_err_path for a job.
@@ -438,11 +460,13 @@ class BatchSystemSupport(AbstractBatchSystem):
438
460
  file_glob: str = f'toil_{self.config.workflowID}.{toil_job_id}.*.log'
439
461
  logs_dir: str = self.get_batch_logs_dir()
440
462
  return os.path.join(logs_dir, file_glob)
441
-
463
+
442
464
  @staticmethod
443
465
  def workerCleanup(info: WorkerCleanupInfo) -> None:
444
466
  """
445
- Cleans up the worker node on batch system shutdown. Also see :meth:`supportsWorkerCleanup`.
467
+ Cleans up the worker node on batch system shutdown.
468
+
469
+ Also see :meth:`supportsWorkerCleanup`.
446
470
 
447
471
  :param WorkerCleanupInfo info: A named tuple consisting of all the relevant information
448
472
  for cleaning up the worker.
@@ -498,8 +522,10 @@ class NodeInfo:
498
522
 
499
523
  class AbstractScalableBatchSystem(AbstractBatchSystem):
500
524
  """
501
- A batch system that supports a variable number of worker nodes. Used by :class:`toil.
502
- provisioners.clusterScaler.ClusterScaler` to scale the number of worker nodes in the cluster
525
+ A batch system that supports a variable number of worker nodes.
526
+
527
+ Used by :class:`toil.provisioners.clusterScaler.ClusterScaler`
528
+ to scale the number of worker nodes in the cluster
503
529
  up or down depending on overall load.
504
530
  """
505
531
 
@@ -17,13 +17,13 @@ from abc import ABCMeta, abstractmethod
17
17
  from datetime import datetime
18
18
  from queue import Empty, Queue
19
19
  from threading import Lock, Thread
20
- from typing import Any, Dict, List, Optional, Tuple, Union
20
+ from typing import Dict, List, Optional, Tuple, Union
21
21
 
22
22
  from toil.batchSystems.abstractBatchSystem import (BatchJobExitReason,
23
23
  UpdatedBatchJobInfo)
24
24
  from toil.batchSystems.cleanup_support import BatchSystemCleanupSupport
25
- from toil.bus import ExternalBatchIdMessage
26
- from toil.job import JobDescription, AcceleratorRequirement
25
+ from toil.bus import ExternalBatchIdMessage, get_job_kind
26
+ from toil.job import AcceleratorRequirement
27
27
  from toil.lib.misc import CalledProcessErrorStderr
28
28
 
29
29
  logger = logging.getLogger(__name__)
@@ -225,23 +225,20 @@ class AbstractGridEngineBatchSystem(BatchSystemCleanupSupport):
225
225
  return activity
226
226
 
227
227
  def _handle_job_status(
228
- self, job_id: int, status: Union[int, None], activity: bool
228
+ self, job_id: int, status: Union[int, Tuple[int, Optional[BatchJobExitReason]], None], activity: bool
229
229
  ) -> bool:
230
230
  """
231
231
  Helper method for checkOnJobs to handle job statuses
232
232
  """
233
233
  if status is not None:
234
+ if isinstance(status, int):
235
+ code = status
236
+ reason = None
237
+ else:
238
+ code, reason = status
234
239
  self.updatedJobsQueue.put(
235
240
  UpdatedBatchJobInfo(
236
- jobID=job_id, exitStatus=status, exitReason=None, wallTime=None
237
- )
238
- )
239
- self.forgetJob(job_id)
240
- return True
241
- if status is not None and isinstance(status, BatchJobExitReason):
242
- self.updatedJobsQueue.put(
243
- UpdatedBatchJobInfo(
244
- jobID=job_id, exitStatus=1, exitReason=status, wallTime=None
241
+ jobID=job_id, exitStatus=code, exitReason=reason, wallTime=None
245
242
  )
246
243
  )
247
244
  self.forgetJob(job_id)
@@ -279,9 +276,9 @@ class AbstractGridEngineBatchSystem(BatchSystemCleanupSupport):
279
276
  logger.error("GridEngine like batch system failure", exc_info=ex)
280
277
  raise
281
278
 
282
- def coalesce_job_exit_codes(self, batch_job_id_list: list) -> list:
279
+ def coalesce_job_exit_codes(self, batch_job_id_list: list) -> List[Union[int, Tuple[int, Optional[BatchJobExitReason]], None]]:
283
280
  """
284
- Returns exit codes for a list of jobs.
281
+ Returns exit codes and possibly exit reasons for a list of jobs, or None if they are running.
285
282
 
286
283
  Called by AbstractGridEngineWorker.checkOnJobs().
287
284
 
@@ -351,16 +348,19 @@ class AbstractGridEngineBatchSystem(BatchSystemCleanupSupport):
351
348
  raise NotImplementedError()
352
349
 
353
350
  @abstractmethod
354
- def getJobExitCode(self, batchJobID):
351
+ def getJobExitCode(self, batchJobID) -> Union[int, Tuple[int, Optional[BatchJobExitReason]], None]:
355
352
  """
356
- Returns job exit code or an instance of abstractBatchSystem.BatchJobExitReason.
357
- if something else happened other than the job exiting.
358
- Implementation-specific; called by AbstractGridEngineWorker.checkOnJobs()
353
+ Returns job exit code and possibly an instance of abstractBatchSystem.BatchJobExitReason.
359
354
 
360
- :param string batchjobID: batch system job ID
355
+ Returns None if the job is still running.
356
+
357
+ If the job is not running but the exit code is not available, it
358
+ will be EXIT_STATUS_UNAVAILABLE_VALUE. Implementation-specific;
359
+ called by AbstractGridEngineWorker.checkOnJobs().
361
360
 
362
- :rtype: int|toil.batchSystems.abstractBatchSystem.BatchJobExitReason: exit code int
363
- or BatchJobExitReason if something else happened other than job exiting.
361
+ The exit code will only be 0 if the job affirmatively succeeded.
362
+
363
+ :param string batchjobID: batch system job ID
364
364
  """
365
365
  raise NotImplementedError()
366
366
 
@@ -407,10 +407,10 @@ class AbstractGridEngineBatchSystem(BatchSystemCleanupSupport):
407
407
  else:
408
408
  gpus = jobDesc.accelerators
409
409
 
410
- self.newJobsQueue.put((jobID, jobDesc.cores, jobDesc.memory, jobDesc.command, jobDesc.get_job_kind(),
410
+ self.newJobsQueue.put((jobID, jobDesc.cores, jobDesc.memory, jobDesc.command, get_job_kind(jobDesc.get_names()),
411
411
  job_environment, gpus))
412
412
  logger.debug("Issued the job command: %s with job id: %s and job name %s", jobDesc.command, str(jobID),
413
- jobDesc.get_job_kind())
413
+ get_job_kind(jobDesc.get_names()))
414
414
  return jobID
415
415
 
416
416
  def killBatchJobs(self, jobIDs):