toil 6.1.0__tar.gz → 7.0.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 (265) hide show
  1. {toil-6.1.0 → toil-7.0.0}/LICENSE +25 -0
  2. {toil-6.1.0 → toil-7.0.0}/PKG-INFO +56 -21
  3. {toil-6.1.0 → toil-7.0.0}/README.rst +6 -2
  4. toil-7.0.0/requirements-aws.txt +5 -0
  5. {toil-6.1.0 → toil-7.0.0}/requirements-cwl.txt +3 -3
  6. {toil-6.1.0 → toil-7.0.0}/requirements-dev.txt +14 -9
  7. {toil-6.1.0 → toil-7.0.0}/requirements-server.txt +2 -2
  8. {toil-6.1.0 → toil-7.0.0}/requirements-wdl.txt +1 -1
  9. {toil-6.1.0 → toil-7.0.0}/requirements.txt +2 -3
  10. {toil-6.1.0 → toil-7.0.0}/setup.cfg +1 -0
  11. {toil-6.1.0 → toil-7.0.0}/setup.py +4 -11
  12. {toil-6.1.0 → toil-7.0.0}/src/toil/__init__.py +1 -232
  13. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/abstractBatchSystem.py +22 -13
  14. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/abstractGridEngineBatchSystem.py +59 -45
  15. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/awsBatch.py +8 -8
  16. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/contained_executor.py +4 -5
  17. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/gridengine.py +1 -1
  18. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/htcondor.py +5 -5
  19. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/kubernetes.py +25 -11
  20. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/local_support.py +3 -3
  21. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/lsf.py +2 -2
  22. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/mesos/batchSystem.py +4 -4
  23. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/mesos/executor.py +3 -2
  24. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/options.py +9 -0
  25. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/singleMachine.py +11 -10
  26. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/slurm.py +64 -22
  27. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/torque.py +1 -1
  28. {toil-6.1.0 → toil-7.0.0}/src/toil/bus.py +7 -3
  29. {toil-6.1.0 → toil-7.0.0}/src/toil/common.py +36 -13
  30. {toil-6.1.0 → toil-7.0.0}/src/toil/cwl/cwltoil.py +365 -312
  31. {toil-6.1.0 → toil-7.0.0}/src/toil/deferred.py +1 -1
  32. {toil-6.1.0 → toil-7.0.0}/src/toil/fileStores/abstractFileStore.py +17 -17
  33. {toil-6.1.0 → toil-7.0.0}/src/toil/fileStores/cachingFileStore.py +2 -2
  34. {toil-6.1.0 → toil-7.0.0}/src/toil/fileStores/nonCachingFileStore.py +1 -1
  35. {toil-6.1.0 → toil-7.0.0}/src/toil/job.py +228 -60
  36. {toil-6.1.0 → toil-7.0.0}/src/toil/jobStores/abstractJobStore.py +18 -10
  37. {toil-6.1.0 → toil-7.0.0}/src/toil/jobStores/aws/jobStore.py +280 -218
  38. {toil-6.1.0 → toil-7.0.0}/src/toil/jobStores/aws/utils.py +57 -29
  39. {toil-6.1.0 → toil-7.0.0}/src/toil/jobStores/conftest.py +2 -2
  40. {toil-6.1.0 → toil-7.0.0}/src/toil/jobStores/fileJobStore.py +2 -2
  41. {toil-6.1.0 → toil-7.0.0}/src/toil/jobStores/googleJobStore.py +3 -4
  42. {toil-6.1.0 → toil-7.0.0}/src/toil/leader.py +72 -24
  43. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/aws/__init__.py +26 -10
  44. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/aws/iam.py +2 -2
  45. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/aws/session.py +62 -22
  46. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/aws/utils.py +73 -37
  47. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/conversions.py +5 -1
  48. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/ec2.py +118 -69
  49. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/expando.py +1 -1
  50. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/io.py +14 -2
  51. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/misc.py +1 -3
  52. toil-7.0.0/src/toil/lib/resources.py +94 -0
  53. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/retry.py +12 -5
  54. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/threading.py +2 -2
  55. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/throttle.py +1 -1
  56. {toil-6.1.0 → toil-7.0.0}/src/toil/options/common.py +27 -24
  57. {toil-6.1.0 → toil-7.0.0}/src/toil/provisioners/__init__.py +9 -3
  58. {toil-6.1.0 → toil-7.0.0}/src/toil/provisioners/abstractProvisioner.py +9 -7
  59. {toil-6.1.0 → toil-7.0.0}/src/toil/provisioners/aws/__init__.py +20 -15
  60. {toil-6.1.0 → toil-7.0.0}/src/toil/provisioners/aws/awsProvisioner.py +406 -329
  61. {toil-6.1.0 → toil-7.0.0}/src/toil/provisioners/gceProvisioner.py +2 -2
  62. {toil-6.1.0 → toil-7.0.0}/src/toil/provisioners/node.py +13 -5
  63. {toil-6.1.0 → toil-7.0.0}/src/toil/server/app.py +1 -1
  64. {toil-6.1.0 → toil-7.0.0}/src/toil/statsAndLogging.py +58 -16
  65. {toil-6.1.0 → toil-7.0.0}/src/toil/test/__init__.py +27 -12
  66. {toil-6.1.0 → toil-7.0.0}/src/toil/test/batchSystems/batchSystemTest.py +40 -33
  67. toil-7.0.0/src/toil/test/batchSystems/batch_system_plugin_test.py +79 -0
  68. {toil-6.1.0 → toil-7.0.0}/src/toil/test/batchSystems/test_slurm.py +1 -1
  69. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/cwlTest.py +8 -91
  70. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/seqtk_seq.cwl +1 -1
  71. {toil-6.1.0 → toil-7.0.0}/src/toil/test/docs/scriptsTest.py +10 -13
  72. {toil-6.1.0 → toil-7.0.0}/src/toil/test/jobStores/jobStoreTest.py +33 -49
  73. {toil-6.1.0 → toil-7.0.0}/src/toil/test/lib/aws/test_iam.py +2 -2
  74. {toil-6.1.0 → toil-7.0.0}/src/toil/test/provisioners/aws/awsProvisionerTest.py +51 -34
  75. {toil-6.1.0 → toil-7.0.0}/src/toil/test/provisioners/clusterTest.py +90 -8
  76. {toil-6.1.0 → toil-7.0.0}/src/toil/test/server/serverTest.py +2 -2
  77. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/autoDeploymentTest.py +1 -1
  78. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/dockerCheckTest.py +2 -1
  79. toil-7.0.0/src/toil/test/src/environmentTest.py +125 -0
  80. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/fileStoreTest.py +1 -1
  81. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/jobDescriptionTest.py +18 -8
  82. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/jobTest.py +1 -1
  83. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/realtimeLoggerTest.py +4 -0
  84. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/workerTest.py +52 -19
  85. {toil-6.1.0 → toil-7.0.0}/src/toil/test/utils/toilDebugTest.py +61 -3
  86. {toil-6.1.0 → toil-7.0.0}/src/toil/test/utils/utilsTest.py +20 -18
  87. {toil-6.1.0 → toil-7.0.0}/src/toil/test/wdl/wdltoil_test.py +24 -71
  88. toil-7.0.0/src/toil/test/wdl/wdltoil_test_kubernetes.py +77 -0
  89. {toil-6.1.0 → toil-7.0.0}/src/toil/toilState.py +68 -9
  90. toil-7.0.0/src/toil/utils/toilDebugJob.py +204 -0
  91. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilLaunchCluster.py +12 -2
  92. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilRsyncCluster.py +7 -2
  93. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilSshCluster.py +7 -3
  94. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilStats.py +2 -1
  95. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilStatus.py +97 -51
  96. toil-7.0.0/src/toil/version.py +14 -0
  97. {toil-6.1.0 → toil-7.0.0}/src/toil/wdl/wdltoil.py +318 -51
  98. {toil-6.1.0 → toil-7.0.0}/src/toil/worker.py +96 -69
  99. {toil-6.1.0 → toil-7.0.0}/src/toil.egg-info/PKG-INFO +56 -21
  100. {toil-6.1.0 → toil-7.0.0}/src/toil.egg-info/SOURCES.txt +3 -0
  101. {toil-6.1.0 → toil-7.0.0}/src/toil.egg-info/requires.txt +22 -20
  102. toil-6.1.0/requirements-aws.txt +0 -4
  103. toil-6.1.0/src/toil/lib/resources.py +0 -60
  104. toil-6.1.0/src/toil/utils/toilDebugJob.py +0 -77
  105. toil-6.1.0/src/toil/version.py +0 -14
  106. {toil-6.1.0 → toil-7.0.0}/MANIFEST.in +0 -0
  107. {toil-6.1.0 → toil-7.0.0}/requirements-encryption.txt +0 -0
  108. {toil-6.1.0 → toil-7.0.0}/requirements-google.txt +0 -0
  109. {toil-6.1.0 → toil-7.0.0}/requirements-htcondor.txt +0 -0
  110. {toil-6.1.0 → toil-7.0.0}/requirements-kubernetes.txt +0 -0
  111. {toil-6.1.0 → toil-7.0.0}/requirements-mesos.txt +0 -0
  112. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/__init__.py +0 -0
  113. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/cleanup_support.py +0 -0
  114. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/lsfHelper.py +0 -0
  115. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/mesos/__init__.py +0 -0
  116. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/mesos/conftest.py +0 -0
  117. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/mesos/test/__init__.py +0 -0
  118. {toil-6.1.0 → toil-7.0.0}/src/toil/batchSystems/registry.py +0 -0
  119. {toil-6.1.0 → toil-7.0.0}/src/toil/cwl/__init__.py +0 -0
  120. {toil-6.1.0 → toil-7.0.0}/src/toil/cwl/conftest.py +0 -0
  121. {toil-6.1.0 → toil-7.0.0}/src/toil/cwl/utils.py +0 -0
  122. {toil-6.1.0 → toil-7.0.0}/src/toil/exceptions.py +0 -0
  123. {toil-6.1.0 → toil-7.0.0}/src/toil/fileStores/__init__.py +0 -0
  124. {toil-6.1.0 → toil-7.0.0}/src/toil/jobStores/__init__.py +0 -0
  125. {toil-6.1.0 → toil-7.0.0}/src/toil/jobStores/aws/__init__.py +0 -0
  126. {toil-6.1.0 → toil-7.0.0}/src/toil/jobStores/utils.py +0 -0
  127. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/__init__.py +0 -0
  128. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/accelerators.py +0 -0
  129. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/aws/ami.py +0 -0
  130. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/bioio.py +0 -0
  131. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/compatibility.py +0 -0
  132. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/docker.py +0 -0
  133. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/ec2nodes.py +0 -0
  134. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/encryption/__init__.py +0 -0
  135. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/encryption/_dummy.py +0 -0
  136. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/encryption/_nacl.py +0 -0
  137. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/encryption/conftest.py +0 -0
  138. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/exceptions.py +0 -0
  139. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/generatedEC2Lists.py +0 -0
  140. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/humanize.py +0 -0
  141. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/iterables.py +0 -0
  142. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/memoize.py +0 -0
  143. {toil-6.1.0 → toil-7.0.0}/src/toil/lib/objects.py +0 -0
  144. {toil-6.1.0 → toil-7.0.0}/src/toil/options/__init__.py +0 -0
  145. {toil-6.1.0 → toil-7.0.0}/src/toil/options/cwl.py +0 -0
  146. {toil-6.1.0 → toil-7.0.0}/src/toil/options/wdl.py +0 -0
  147. {toil-6.1.0 → toil-7.0.0}/src/toil/provisioners/clusterScaler.py +0 -0
  148. {toil-6.1.0 → toil-7.0.0}/src/toil/realtimeLogger.py +0 -0
  149. {toil-6.1.0 → toil-7.0.0}/src/toil/resource.py +0 -0
  150. {toil-6.1.0 → toil-7.0.0}/src/toil/server/__init__.py +0 -0
  151. {toil-6.1.0 → toil-7.0.0}/src/toil/server/api_spec/__init__.py +0 -0
  152. {toil-6.1.0 → toil-7.0.0}/src/toil/server/api_spec/workflow_execution_service.swagger.yaml +0 -0
  153. {toil-6.1.0 → toil-7.0.0}/src/toil/server/celery_app.py +0 -0
  154. {toil-6.1.0 → toil-7.0.0}/src/toil/server/cli/__init__.py +0 -0
  155. {toil-6.1.0 → toil-7.0.0}/src/toil/server/cli/wes_cwl_runner.py +0 -0
  156. {toil-6.1.0 → toil-7.0.0}/src/toil/server/utils.py +0 -0
  157. {toil-6.1.0 → toil-7.0.0}/src/toil/server/wes/__init__.py +0 -0
  158. {toil-6.1.0 → toil-7.0.0}/src/toil/server/wes/abstract_backend.py +0 -0
  159. {toil-6.1.0 → toil-7.0.0}/src/toil/server/wes/amazon_wes_utils.py +0 -0
  160. {toil-6.1.0 → toil-7.0.0}/src/toil/server/wes/tasks.py +0 -0
  161. {toil-6.1.0 → toil-7.0.0}/src/toil/server/wes/toil_backend.py +0 -0
  162. {toil-6.1.0 → toil-7.0.0}/src/toil/server/wsgi_app.py +0 -0
  163. {toil-6.1.0 → toil-7.0.0}/src/toil/serviceManager.py +0 -0
  164. {toil-6.1.0 → toil-7.0.0}/src/toil/test/batchSystems/__init__.py +0 -0
  165. {toil-6.1.0 → toil-7.0.0}/src/toil/test/batchSystems/test_lsf_helper.py +0 -0
  166. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cactus/__init__.py +0 -0
  167. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cactus/test_cactus_integration.py +0 -0
  168. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/__init__.py +0 -0
  169. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/alwaysfails.cwl +0 -0
  170. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/colon_test_output.cwl +0 -0
  171. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/colon_test_output_job.yaml +0 -0
  172. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/conditional_wf.cwl +0 -0
  173. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/conditional_wf.yaml +0 -0
  174. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/conftest.py +0 -0
  175. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/directory_from_directory.cwl +0 -0
  176. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/download.cwl +0 -0
  177. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/download_directory.cwl +0 -0
  178. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/download_subdirectory.cwl +0 -0
  179. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/echo-stderr.cwl +0 -0
  180. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/echo-stdout-log-dir.cwl +0 -0
  181. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/echo.cwl +0 -0
  182. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/echo_string.cwl +0 -0
  183. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/echo_string_scatter_capture_stdout.cwl +0 -0
  184. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/file_from_directory.cwl +0 -0
  185. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/glob_dir.cwl +0 -0
  186. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/load_contents.cwl +0 -0
  187. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/mpi_simple.cwl +0 -0
  188. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/nvidia_smi.cwl +0 -0
  189. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/preemptible.cwl +0 -0
  190. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/preemptible_expression.cwl +0 -0
  191. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/revsort.cwl +0 -0
  192. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/revsort2.cwl +0 -0
  193. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/revtool.cwl +0 -0
  194. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/revtool2.cwl +0 -0
  195. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/s3_secondary_file.cwl +0 -0
  196. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/sorttool.cwl +0 -0
  197. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/stream.cwl +0 -0
  198. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/test_filename_conflict_detection.cwl +0 -0
  199. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/test_filename_conflict_detection_at_root.cwl +0 -0
  200. {toil-6.1.0 → toil-7.0.0}/src/toil/test/cwl/test_filename_conflict_resolution.cwl +0 -0
  201. {toil-6.1.0 → toil-7.0.0}/src/toil/test/docs/__init__.py +0 -0
  202. {toil-6.1.0 → toil-7.0.0}/src/toil/test/jobStores/__init__.py +0 -0
  203. {toil-6.1.0 → toil-7.0.0}/src/toil/test/lib/__init__.py +0 -0
  204. {toil-6.1.0 → toil-7.0.0}/src/toil/test/lib/aws/__init__.py +0 -0
  205. {toil-6.1.0 → toil-7.0.0}/src/toil/test/lib/aws/test_s3.py +0 -0
  206. {toil-6.1.0 → toil-7.0.0}/src/toil/test/lib/aws/test_utils.py +0 -0
  207. {toil-6.1.0 → toil-7.0.0}/src/toil/test/lib/dockerTest.py +0 -0
  208. {toil-6.1.0 → toil-7.0.0}/src/toil/test/lib/test_conversions.py +0 -0
  209. {toil-6.1.0 → toil-7.0.0}/src/toil/test/lib/test_ec2.py +0 -0
  210. {toil-6.1.0 → toil-7.0.0}/src/toil/test/lib/test_misc.py +0 -0
  211. {toil-6.1.0 → toil-7.0.0}/src/toil/test/mesos/MesosDataStructuresTest.py +0 -0
  212. {toil-6.1.0 → toil-7.0.0}/src/toil/test/mesos/__init__.py +0 -0
  213. {toil-6.1.0 → toil-7.0.0}/src/toil/test/mesos/helloWorld.py +0 -0
  214. {toil-6.1.0 → toil-7.0.0}/src/toil/test/mesos/stress.py +0 -0
  215. {toil-6.1.0 → toil-7.0.0}/src/toil/test/options/__init__.py +0 -0
  216. {toil-6.1.0 → toil-7.0.0}/src/toil/test/options/options.py +0 -0
  217. {toil-6.1.0 → toil-7.0.0}/src/toil/test/provisioners/__init__.py +0 -0
  218. {toil-6.1.0 → toil-7.0.0}/src/toil/test/provisioners/aws/__init__.py +0 -0
  219. {toil-6.1.0 → toil-7.0.0}/src/toil/test/provisioners/clusterScalerTest.py +0 -0
  220. {toil-6.1.0 → toil-7.0.0}/src/toil/test/provisioners/gceProvisionerTest.py +0 -0
  221. {toil-6.1.0 → toil-7.0.0}/src/toil/test/provisioners/provisionerTest.py +0 -0
  222. {toil-6.1.0 → toil-7.0.0}/src/toil/test/provisioners/restartScript.py +0 -0
  223. {toil-6.1.0 → toil-7.0.0}/src/toil/test/server/__init__.py +0 -0
  224. {toil-6.1.0 → toil-7.0.0}/src/toil/test/sort/__init__.py +0 -0
  225. {toil-6.1.0 → toil-7.0.0}/src/toil/test/sort/restart_sort.py +0 -0
  226. {toil-6.1.0 → toil-7.0.0}/src/toil/test/sort/sort.py +0 -0
  227. {toil-6.1.0 → toil-7.0.0}/src/toil/test/sort/sortTest.py +0 -0
  228. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/__init__.py +0 -0
  229. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/busTest.py +0 -0
  230. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/checkpointTest.py +0 -0
  231. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/deferredFunctionTest.py +0 -0
  232. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/helloWorldTest.py +0 -0
  233. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/importExportFileTest.py +0 -0
  234. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/jobEncapsulationTest.py +0 -0
  235. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/jobFileStoreTest.py +0 -0
  236. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/jobServiceTest.py +0 -0
  237. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/miscTests.py +0 -0
  238. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/promisedRequirementTest.py +0 -0
  239. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/promisesTest.py +0 -0
  240. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/regularLogTest.py +0 -0
  241. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/resourceTest.py +0 -0
  242. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/restartDAGTest.py +0 -0
  243. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/resumabilityTest.py +0 -0
  244. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/retainTempDirTest.py +0 -0
  245. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/systemTest.py +0 -0
  246. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/threadingTest.py +0 -0
  247. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/toilContextManagerTest.py +0 -0
  248. {toil-6.1.0 → toil-7.0.0}/src/toil/test/src/userDefinedJobArgTypeTest.py +0 -0
  249. {toil-6.1.0 → toil-7.0.0}/src/toil/test/utils/__init__.py +0 -0
  250. {toil-6.1.0 → toil-7.0.0}/src/toil/test/utils/toilKillTest.py +0 -0
  251. {toil-6.1.0 → toil-7.0.0}/src/toil/test/wdl/__init__.py +0 -0
  252. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/__init__.py +0 -0
  253. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilClean.py +0 -0
  254. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilConfig.py +0 -0
  255. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilDebugFile.py +0 -0
  256. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilDestroyCluster.py +0 -0
  257. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilKill.py +0 -0
  258. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilMain.py +0 -0
  259. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilServer.py +0 -0
  260. {toil-6.1.0 → toil-7.0.0}/src/toil/utils/toilUpdateEC2Instances.py +0 -0
  261. {toil-6.1.0 → toil-7.0.0}/src/toil/wdl/__init__.py +0 -0
  262. {toil-6.1.0 → toil-7.0.0}/src/toil/wdl/utils.py +0 -0
  263. {toil-6.1.0 → toil-7.0.0}/src/toil.egg-info/dependency_links.txt +0 -0
  264. {toil-6.1.0 → toil-7.0.0}/src/toil.egg-info/entry_points.txt +0 -0
  265. {toil-6.1.0 → toil-7.0.0}/src/toil.egg-info/top_level.txt +0 -0
@@ -202,3 +202,28 @@
202
202
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
203
203
  See the License for the specific language governing permissions and
204
204
  limitations under the License.
205
+
206
+ All code in this repository excluding src/toil/statsAndLogging.py::install_log_color is under the Apache License as outlined directly above.
207
+ Some code in src/toil/statsAndLogging.py::install_log_color is under the MiniWDL MIT License as outlined directly below.
208
+
209
+ MIT License
210
+
211
+ Copyright (c) 2018 Chan Zuckerberg Initiative
212
+
213
+ Permission is hereby granted, free of charge, to any person obtaining a copy
214
+ of this software and associated documentation files (the "Software"), to deal
215
+ in the Software without restriction, including without limitation the rights
216
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
217
+ copies of the Software, and to permit persons to whom the Software is
218
+ furnished to do so, subject to the following conditions:
219
+
220
+ The above copyright notice and this permission notice shall be included in all
221
+ copies or substantial portions of the Software.
222
+
223
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
224
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
225
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
226
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
227
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
228
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
229
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: toil
3
- Version: 6.1.0
3
+ Version: 7.0.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
@@ -29,31 +29,33 @@ Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
29
29
  Classifier: Topic :: System :: Distributed Computing
30
30
  Classifier: Topic :: Utilities
31
31
  Requires-Python: >=3.8
32
+ Description-Content-Type: text/x-rst
32
33
  License-File: LICENSE
33
34
  Requires-Dist: dill<0.4,>=0.3.2
34
- Requires-Dist: requests<3,>=2
35
+ Requires-Dist: requests<=2.31.0
35
36
  Requires-Dist: docker<8,>=6.1.0
36
37
  Requires-Dist: urllib3<3,>=1.26.0
37
38
  Requires-Dist: python-dateutil
38
39
  Requires-Dist: psutil<6,>=3.0.1
39
40
  Requires-Dist: PyPubSub<5,>=4.0.3
40
41
  Requires-Dist: addict<2.5,>=2.2.1
41
- Requires-Dist: pytz>=2012
42
42
  Requires-Dist: enlighten<2,>=1.5.2
43
43
  Requires-Dist: configargparse<2,>=1.7
44
44
  Requires-Dist: ruamel.yaml>=0.15
45
45
  Requires-Dist: pyyaml<7,>=6
46
46
  Requires-Dist: typing-extensions<5,>=4.6.2
47
+ Requires-Dist: coloredlogs<16,>=15
47
48
  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"
49
+ Requires-Dist: boto3-stubs[autoscaling,boto3,ec2,iam,s3,sdb,sts]<2,>=1.28.3.post2; extra == "aws"
50
50
  Requires-Dist: mypy-boto3-iam<2,>=1.28.3.post2; extra == "aws"
51
- Requires-Dist: moto<5,>=4.1.11; extra == "aws"
51
+ Requires-Dist: mypy-boto3-s3<2,>=1.28.3.post2; extra == "aws"
52
+ Requires-Dist: moto<6,>=5.0.3; extra == "aws"
53
+ Requires-Dist: ec2_metadata<3; extra == "aws"
52
54
  Provides-Extra: cwl
53
- Requires-Dist: cwltool==3.1.20240112164112; extra == "cwl"
55
+ Requires-Dist: cwltool==3.1.20240508115724; extra == "cwl"
54
56
  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: galaxy-tool-util<25; extra == "cwl"
58
+ Requires-Dist: galaxy-util<25; extra == "cwl"
57
59
  Requires-Dist: ruamel.yaml<=0.19,>=0.15; extra == "cwl"
58
60
  Requires-Dist: ruamel.yaml.clib>=0.2.6; extra == "cwl"
59
61
  Requires-Dist: networkx!=2.8.1,<4; extra == "cwl"
@@ -71,15 +73,15 @@ Requires-Dist: types-urllib3; extra == "kubernetes"
71
73
  Requires-Dist: types-PyYAML; extra == "kubernetes"
72
74
  Requires-Dist: idna>=2; extra == "kubernetes"
73
75
  Provides-Extra: wdl
74
- Requires-Dist: miniwdl==1.11.1; extra == "wdl"
76
+ Requires-Dist: miniwdl==1.12.0; extra == "wdl"
75
77
  Requires-Dist: wdlparse==0.1.0; extra == "wdl"
76
78
  Requires-Dist: graphlib-backport==1.0; python_version < "3.9" and extra == "wdl"
77
79
  Provides-Extra: server
78
80
  Requires-Dist: connexion[swagger-ui]<3,>=2.10.0; extra == "server"
79
81
  Requires-Dist: flask<3,>=2.0; extra == "server"
80
82
  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: flask-cors==4.0.1; extra == "server"
84
+ Requires-Dist: gunicorn==22.0.0; extra == "server"
83
85
  Requires-Dist: celery<6,>=5.1.0; extra == "server"
84
86
  Requires-Dist: wes-service<5,>=4.0.0; extra == "server"
85
87
  Requires-Dist: ruamel.yaml<0.19,>=0.15; extra == "server"
@@ -88,14 +90,15 @@ Requires-Dist: htcondor<11,>=10.2.0.post1; sys_platform != "darwin" and extra ==
88
90
  Provides-Extra: mesos
89
91
  Requires-Dist: pymesos<0.4,>=0.3.15; python_version < "3.11" and extra == "mesos"
90
92
  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: boto3-stubs[autoscaling,boto3,ec2,iam,s3,sdb,sts]<2,>=1.28.3.post2; extra == "all"
93
94
  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"
95
+ Requires-Dist: mypy-boto3-s3<2,>=1.28.3.post2; extra == "all"
96
+ Requires-Dist: moto<6,>=5.0.3; extra == "all"
97
+ Requires-Dist: ec2_metadata<3; extra == "all"
98
+ Requires-Dist: cwltool==3.1.20240508115724; extra == "all"
96
99
  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"
100
+ Requires-Dist: galaxy-tool-util<25; extra == "all"
101
+ Requires-Dist: galaxy-util<25; extra == "all"
99
102
  Requires-Dist: ruamel.yaml<=0.19,>=0.15; extra == "all"
100
103
  Requires-Dist: ruamel.yaml.clib>=0.2.6; extra == "all"
101
104
  Requires-Dist: networkx!=2.8.1,<4; extra == "all"
@@ -109,15 +112,47 @@ Requires-Dist: kubernetes-stubs==v22.6.0post1; extra == "all"
109
112
  Requires-Dist: types-urllib3; extra == "all"
110
113
  Requires-Dist: types-PyYAML; extra == "all"
111
114
  Requires-Dist: idna>=2; extra == "all"
112
- Requires-Dist: miniwdl==1.11.1; extra == "all"
115
+ Requires-Dist: miniwdl==1.12.0; extra == "all"
113
116
  Requires-Dist: wdlparse==0.1.0; extra == "all"
114
117
  Requires-Dist: graphlib-backport==1.0; python_version < "3.9" and extra == "all"
115
118
  Requires-Dist: connexion[swagger-ui]<3,>=2.10.0; extra == "all"
116
119
  Requires-Dist: flask<3,>=2.0; extra == "all"
117
120
  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"
121
+ Requires-Dist: flask-cors==4.0.1; extra == "all"
122
+ Requires-Dist: gunicorn==22.0.0; extra == "all"
120
123
  Requires-Dist: celery<6,>=5.1.0; extra == "all"
121
124
  Requires-Dist: wes-service<5,>=4.0.0; extra == "all"
122
125
  Requires-Dist: ruamel.yaml<0.19,>=0.15; extra == "all"
123
126
  Requires-Dist: pymesos<0.4,>=0.3.15; python_version < "3.11" and extra == "all"
127
+
128
+ .. image:: https://badges.gitter.im/bd2k-genomics-toil/Lobby.svg
129
+ :alt: Join the chat at https://gitter.im/bd2k-genomics-toil/Lobby
130
+ :target: https://gitter.im/bd2k-genomics-toil/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
131
+
132
+ Toil is a scalable, efficient, cross-platform (Linux & macOS) pipeline management system,
133
+ written entirely in Python, and designed around the principles of functional
134
+ programming. It supports running workflows written in either Common Workflow Language (`CWL`_) 1.0-1.2 or
135
+ Workflow Description Language (`WDL`_) 1.0-1.1, as well as having its own rich Python API for writing workflows against.
136
+ It supports running workflows locally on your system (e.g. a laptop), on an HPC cluster, or in the cloud.
137
+
138
+ * Check the `website`_ for a description of Toil and its features.
139
+ * Full documentation for the latest stable release can be found at
140
+ `Read the Docs`_.
141
+ * Please subscribe to low-volume `announce`_ mailing list so we keep you informed
142
+ * Google Groups discussion `forum`_
143
+ * See our occasional `blog`_ for tutorials.
144
+ * Use `biostars`_ channel for discussion.
145
+
146
+ .. _website: http://toil.ucsc-cgl.org/
147
+ .. _Read the Docs: https://toil.readthedocs.io/en/latest
148
+ .. _announce: https://groups.google.com/forum/#!forum/toil-announce
149
+ .. _forum: https://groups.google.com/forum/#!forum/toil-community
150
+ .. _blog: https://toilpipelines.wordpress.com/
151
+ .. _biostars: https://www.biostars.org/t/toil/
152
+ .. _CWL: https://www.commonwl.org/
153
+ .. _WDL: https://openwdl.org/
154
+
155
+ Notes:
156
+
157
+ * Toil moved from https://github.com/BD2KGenomics/toil to https://github.com/DataBiosphere/toil on July 5th, 2018.
158
+ * Toil dropped Python 2.7 support on February 13, 2020 (the last working py2.7 version is 3.24.0).
@@ -4,7 +4,9 @@
4
4
 
5
5
  Toil is a scalable, efficient, cross-platform (Linux & macOS) pipeline management system,
6
6
  written entirely in Python, and designed around the principles of functional
7
- programming.
7
+ programming. It supports running workflows written in either Common Workflow Language (`CWL`_) 1.0-1.2 or
8
+ Workflow Description Language (`WDL`_) 1.0-1.1, as well as having its own rich Python API for writing workflows against.
9
+ It supports running workflows locally on your system (e.g. a laptop), on an HPC cluster, or in the cloud.
8
10
 
9
11
  * Check the `website`_ for a description of Toil and its features.
10
12
  * Full documentation for the latest stable release can be found at
@@ -20,8 +22,10 @@ programming.
20
22
  .. _forum: https://groups.google.com/forum/#!forum/toil-community
21
23
  .. _blog: https://toilpipelines.wordpress.com/
22
24
  .. _biostars: https://www.biostars.org/t/toil/
25
+ .. _CWL: https://www.commonwl.org/
26
+ .. _WDL: https://openwdl.org/
23
27
 
24
28
  Notes:
25
29
 
26
30
  * Toil moved from https://github.com/BD2KGenomics/toil to https://github.com/DataBiosphere/toil on July 5th, 2018.
27
- * Toil dropped python 2.7 support on February 13, 2020 (last working py2.7 version is 3.24.0).
31
+ * Toil dropped Python 2.7 support on February 13, 2020 (the last working py2.7 version is 3.24.0).
@@ -0,0 +1,5 @@
1
+ boto3-stubs[s3,sdb,iam,sts,boto3,ec2,autoscaling]>=1.28.3.post2, <2
2
+ mypy-boto3-iam>=1.28.3.post2, <2 # Need to force .post1 to be replaced
3
+ mypy-boto3-s3>=1.28.3.post2, <2
4
+ moto>=5.0.3, <6
5
+ ec2_metadata<3
@@ -1,7 +1,7 @@
1
- cwltool==3.1.20240112164112
1
+ cwltool==3.1.20240508115724
2
2
  schema-salad>=8.4.20230128170514,<9
3
- galaxy-tool-util<23
4
- galaxy-util<23
3
+ galaxy-tool-util<25
4
+ galaxy-util<25
5
5
  ruamel.yaml>=0.15,<=0.19
6
6
  ruamel.yaml.clib>=0.2.6
7
7
  networkx!=2.8.1,<4
@@ -1,20 +1,24 @@
1
1
  pytest>=6.2.1,<9
2
- pytest-cov>=2.12.1,<5
2
+ pytest-cov>=2.12.1,<6
3
3
  pytest-timeout>=1.4.2,<3
4
4
  stubserver>=1.1,<2
5
5
  setuptools>=65.5.1,<70
6
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
7
+ sphinx-autoapi>=3,<4
8
+ astroid>=3,<4
10
9
  sphinx-autodoc-typehints>=1.24.0,<3
11
- sphinxcontrib-autoprogram==0.1.8
10
+ sphinxcontrib-autoprogram==0.1.9
12
11
  cwltest>=2.2.20211116163652
13
- mypy==1.8.0
12
+ mypy==1.10.0
13
+ types-aws-xray-sdk
14
+ types-boto<2.49.18.20240205
15
+ types-Flask-Cors
14
16
  types-requests
17
+ types-psutil
18
+ types-python-dateutil
15
19
  types-setuptools
16
- types-boto<2.49.18.20240205
17
- types-pytz
20
+ types-xmltodict
21
+ backports.zoneinfo[tzdata];python_version<"3.9"
18
22
  flake8>=3.8.4,<8
19
23
  flake8-bugbear>=20.11.1,<25
20
24
  black
@@ -24,6 +28,7 @@ autoflake
24
28
  isort
25
29
  diff_cover
26
30
  lxml
27
- docutils>=0.16,<0.21
31
+ docutils>=0.16,<0.22
28
32
  pyupgrade
29
33
  pytest-xdist
34
+ build
@@ -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==4.0.0
5
- gunicorn==21.2.0
4
+ flask-cors==4.0.1
5
+ gunicorn==22.0.0
6
6
  celery>=5.1.0, <6
7
7
  wes-service>=4.0.0, <5
8
8
  ruamel.yaml>=0.15,<0.19
@@ -1,3 +1,3 @@
1
- miniwdl==1.11.1
1
+ miniwdl==1.12.0
2
2
  wdlparse==0.1.0
3
3
  graphlib-backport==1.0 ; python_version < '3.9'
@@ -1,15 +1,14 @@
1
1
  dill>=0.3.2, <0.4
2
- requests>=2, <3
2
+ requests<=2.31.0
3
3
  docker>=6.1.0, <8
4
- # Work around https://github.com/docker/docker-py/issues/3113
5
4
  urllib3>=1.26.0,<3
6
5
  python-dateutil
7
6
  psutil >= 3.0.1, <6
8
7
  PyPubSub >=4.0.3, <5
9
8
  addict>=2.2.1, <2.5
10
- pytz>=2012
11
9
  enlighten>=1.5.2, <2
12
10
  configargparse>=1.7,<2
13
11
  ruamel.yaml>=0.15
14
12
  pyyaml>=6,<7
15
13
  typing-extensions>=4.6.2, <5
14
+ coloredlogs>=15,<16
@@ -33,6 +33,7 @@ markers =
33
33
  wes_server
34
34
  cwl_small_log_dir
35
35
  cwl_small
36
+ wdl
36
37
 
37
38
  [flake8]
38
39
  max-line-length = 88
@@ -11,7 +11,6 @@
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
15
14
  import os
16
15
  import types
17
16
  from importlib.machinery import SourceFileLoader
@@ -19,6 +18,8 @@ from tempfile import NamedTemporaryFile
19
18
 
20
19
  from setuptools import find_packages, setup
21
20
 
21
+ SETUP_DIR = os.path.dirname(__file__)
22
+ README = os.path.join(SETUP_DIR, "README.rst")
22
23
 
23
24
  def get_requirements(extra=None):
24
25
  """
@@ -70,6 +71,8 @@ def run_setup():
70
71
  setup(
71
72
  name='toil',
72
73
  version=version.distVersion,
74
+ long_description=open(README).read(),
75
+ long_description_content_type="text/x-rst",
73
76
  description='Pipeline management software for clusters.',
74
77
  author='Benedict Paten and the Toil community',
75
78
  author_email='toil-community@googlegroups.com',
@@ -138,16 +141,6 @@ def import_version():
138
141
  }))
139
142
  os.rename(f.name, 'src/toil/version.py')
140
143
 
141
- # Unfortunately, we can't use a straight import here because that would also load the stuff
142
- # defined in "src/toil/__init__.py" which imports modules from external dependencies that may
143
- # yet to be installed when setup.py is invoked.
144
- #
145
- # This is also the reason we cannot switch from the "deprecated" imp library
146
- # and use:
147
- # from importlib.machinery import SourceFileLoader
148
- # return SourceFileLoader('toil.version', path='src/toil/version.py').load_module()
149
- #
150
- # Because SourceFileLoader will error and load "src/toil/__init__.py" .
151
144
  loader = SourceFileLoader('toil.version', 'src/toil/version.py')
152
145
  mod = types.ModuleType(loader.name)
153
146
  loader.exec_module(mod)
@@ -22,7 +22,6 @@ from datetime import datetime
22
22
  from typing import TYPE_CHECKING, Optional, Tuple
23
23
 
24
24
  import requests
25
- from pytz import timezone
26
25
 
27
26
  from docker.errors import ImageNotFound
28
27
  from toil.lib.memoize import memoize
@@ -210,7 +209,7 @@ def customDockerInitCmd() -> str:
210
209
  private docker registries). Any single quotes are escaped and the command cannot contain a
211
210
  set of blacklisted chars (newline or tab).
212
211
 
213
- :returns: The custom commmand, or an empty string is returned if the environment variable is not set.
212
+ :returns: The custom command, or an empty string is returned if the environment variable is not set.
214
213
  """
215
214
  command = lookupEnvVar(name='user-defined custom docker init command',
216
215
  envName='TOIL_CUSTOM_DOCKER_INIT_COMMAND',
@@ -440,7 +439,6 @@ def logProcessContext(config: "Config") -> None:
440
439
 
441
440
 
442
441
  try:
443
- from boto import provider
444
442
  from botocore.credentials import (JSONFileCache,
445
443
  RefreshableCredentials,
446
444
  create_credential_resolver)
@@ -477,234 +475,5 @@ try:
477
475
  """
478
476
  return datetime.strptime(s, datetime_format)
479
477
 
480
-
481
- class BotoCredentialAdapter(provider.Provider):
482
- """
483
- Boto 2 Adapter to use AWS credentials obtained via Boto 3's credential finding logic.
484
-
485
- This allows for automatic role assumption
486
- respecting the Boto 3 config files, even when parts of the app still use
487
- Boto 2.
488
-
489
- This class also handles caching credentials in multi-process environments
490
- to avoid loads of processes swamping the EC2 metadata service.
491
- """
492
-
493
- # TODO: We take kwargs because new boto2 versions have an 'anon'
494
- # argument and we want to be future proof
495
-
496
- def __init__(self, name, access_key=None, secret_key=None,
497
- security_token=None, profile_name=None, **kwargs):
498
- """Create a new BotoCredentialAdapter."""
499
- # TODO: We take kwargs because new boto2 versions have an 'anon'
500
- # argument and we want to be future proof
501
-
502
- if (name == 'aws' or name is None) and access_key is None and not kwargs.get('anon', False):
503
- # We are on AWS and we don't have credentials passed along and we aren't anonymous.
504
- # We will backend into a boto3 resolver for getting credentials.
505
- # Make sure to enable boto3's own caching, so we can share that
506
- # cache with pure boto3 code elsewhere in Toil.
507
- # Keep synced with toil.lib.aws.session.establish_boto3_session
508
- self._boto3_resolver = create_credential_resolver(Session(profile=profile_name), cache=JSONFileCache())
509
- else:
510
- # We will use the normal flow
511
- self._boto3_resolver = None
512
-
513
- # Pass along all the arguments
514
- super().__init__(name, access_key=access_key,
515
- secret_key=secret_key, security_token=security_token,
516
- profile_name=profile_name, **kwargs)
517
-
518
- def get_credentials(self, access_key=None, secret_key=None, security_token=None, profile_name=None):
519
- """
520
- Make sure our credential fields are populated.
521
-
522
- Called by the base class constructor.
523
- """
524
- if self._boto3_resolver is not None:
525
- # Go get the credentials from the cache, or from boto3 if not cached.
526
- # We need to be eager here; having the default None
527
- # _credential_expiry_time makes the accessors never try to refresh.
528
- self._obtain_credentials_from_cache_or_boto3()
529
- else:
530
- # We're not on AWS, or they passed a key, or we're anonymous.
531
- # Use the normal route; our credentials shouldn't expire.
532
- super().get_credentials(access_key=access_key,
533
- secret_key=secret_key, security_token=security_token,
534
- profile_name=profile_name)
535
-
536
- def _populate_keys_from_metadata_server(self):
537
- """
538
- Hack to catch _credential_expiry_time being too soon and refresh the credentials.
539
-
540
- This override is misnamed; it's actually the only hook we have to catch
541
- _credential_expiry_time being too soon and refresh the credentials. We
542
- actually just go back and poke the cache to see if it feels like
543
- getting us new credentials.
544
-
545
- Boto 2 hardcodes a refresh within 5 minutes of expiry:
546
- https://github.com/boto/boto/blob/591911db1029f2fbb8ba1842bfcc514159b37b32/boto/provider.py#L247
547
-
548
- Boto 3 wants to refresh 15 or 10 minutes before expiry:
549
- https://github.com/boto/botocore/blob/8d3ea0e61473fba43774eb3c74e1b22995ee7370/botocore/credentials.py#L279
550
-
551
- So if we ever want to refresh, Boto 3 wants to refresh too.
552
- """
553
- # This should only happen if we have expiring credentials, which we should only get from boto3
554
- if self._boto3_resolver is None:
555
- raise RuntimeError("The Boto3 resolver should not be None.")
556
-
557
- self._obtain_credentials_from_cache_or_boto3()
558
-
559
- @retry()
560
- def _obtain_credentials_from_boto3(self):
561
- """
562
- Fill our credential fields from Boto 3.
563
-
564
- We know the current cached credentials are not good, and that we
565
- need to get them from Boto 3. Fill in our credential fields
566
- (_access_key, _secret_key, _security_token,
567
- _credential_expiry_time) from Boto 3.
568
- """
569
- # We get a Credentials object
570
- # <https://github.com/boto/botocore/blob/8d3ea0e61473fba43774eb3c74e1b22995ee7370/botocore/credentials.py#L227>
571
- # or a RefreshableCredentials, or None on failure.
572
- creds = self._boto3_resolver.load_credentials()
573
-
574
- if creds is None:
575
- try:
576
- resolvers = str(self._boto3_resolver.providers)
577
- except:
578
- resolvers = "(Resolvers unavailable)"
579
- raise RuntimeError("Could not obtain AWS credentials from Boto3. Resolvers tried: " + resolvers)
580
-
581
- # Make sure the credentials actually has some credentials if it is lazy
582
- creds.get_frozen_credentials()
583
-
584
- # Get when the credentials will expire, if ever
585
- if isinstance(creds, RefreshableCredentials):
586
- # Credentials may expire.
587
- # Get a naive UTC datetime like boto 2 uses from the boto 3 time.
588
- self._credential_expiry_time = creds._expiry_time.astimezone(timezone('UTC')).replace(tzinfo=None)
589
- else:
590
- # Credentials never expire
591
- self._credential_expiry_time = None
592
-
593
- # Then, atomically get all the credentials bits. They may be newer than we think they are, but never older.
594
- frozen = creds.get_frozen_credentials()
595
-
596
- # Copy them into us
597
- self._access_key = frozen.access_key
598
- self._secret_key = frozen.secret_key
599
- self._security_token = frozen.token
600
-
601
- def _obtain_credentials_from_cache_or_boto3(self):
602
- """
603
- Get the cached credentials.
604
-
605
- Or retrieve them from Boto 3 and cache them
606
- (or wait for another cooperating process to do so) if they are missing
607
- or not fresh enough.
608
- """
609
- cache_path = '~/.cache/aws/cached_temporary_credentials'
610
- path = os.path.expanduser(cache_path)
611
- tmp_path = path + '.tmp'
612
- while True:
613
- log.debug('Attempting to read cached credentials from %s.', path)
614
- try:
615
- with open(path) as f:
616
- content = f.read()
617
- if content:
618
- record = content.split('\n')
619
- if len(record) != 4:
620
- raise RuntimeError("Number of cached credentials is not 4.")
621
- self._access_key = record[0]
622
- self._secret_key = record[1]
623
- self._security_token = record[2]
624
- self._credential_expiry_time = str_to_datetime(record[3])
625
- else:
626
- log.debug('%s is empty. Credentials are not temporary.', path)
627
- self._obtain_credentials_from_boto3()
628
- return
629
- except OSError as e:
630
- if e.errno == errno.ENOENT:
631
- log.debug('Cached credentials are missing.')
632
- dir_path = os.path.dirname(path)
633
- if not os.path.exists(dir_path):
634
- log.debug('Creating parent directory %s', dir_path)
635
- try:
636
- # A race would be ok at this point
637
- os.makedirs(dir_path, exist_ok=True)
638
- except OSError as e2:
639
- if e2.errno == errno.EROFS:
640
- # Sometimes we don't actually have write access to ~.
641
- # We may be running in a non-writable Toil container.
642
- # We should just go get our own credentials
643
- log.debug('Cannot use the credentials cache because we are working on a read-only filesystem.')
644
- self._obtain_credentials_from_boto3()
645
- else:
646
- raise
647
- else:
648
- raise
649
- else:
650
- if self._credentials_need_refresh():
651
- log.debug('Cached credentials are expired.')
652
- else:
653
- log.debug('Cached credentials exist and are still fresh.')
654
- return
655
- # We get here if credentials are missing or expired
656
- log.debug('Racing to create %s.', tmp_path)
657
- # Only one process, the winner, will succeed
658
- try:
659
- fd = os.open(tmp_path, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o600)
660
- except OSError as e:
661
- if e.errno == errno.EEXIST:
662
- log.debug('Lost the race to create %s. Waiting on winner to remove it.', tmp_path)
663
- while os.path.exists(tmp_path):
664
- time.sleep(0.1)
665
- log.debug('Winner removed %s. Trying from the top.', tmp_path)
666
- else:
667
- raise
668
- else:
669
- try:
670
- log.debug('Won the race to create %s. Requesting credentials from backend.', tmp_path)
671
- self._obtain_credentials_from_boto3()
672
- except:
673
- os.close(fd)
674
- fd = None
675
- log.debug('Failed to obtain credentials, removing %s.', tmp_path)
676
- # This unblocks the losers.
677
- os.unlink(tmp_path)
678
- # Bail out. It's too likely to happen repeatedly
679
- raise
680
- else:
681
- if self._credential_expiry_time is None:
682
- os.close(fd)
683
- fd = None
684
- log.debug('Credentials are not temporary. Leaving %s empty and renaming it to %s.',
685
- tmp_path, path)
686
- # No need to actually cache permanent credentials,
687
- # because we know we aren't getting them from the
688
- # metadata server or by assuming a role. Those both
689
- # give temporary credentials.
690
- else:
691
- log.debug('Writing credentials to %s.', tmp_path)
692
- with os.fdopen(fd, 'w') as fh:
693
- fd = None
694
- fh.write('\n'.join([
695
- self._access_key,
696
- self._secret_key,
697
- self._security_token,
698
- datetime_to_str(self._credential_expiry_time)]))
699
- log.debug('Wrote credentials to %s. Renaming to %s.', tmp_path, path)
700
- os.rename(tmp_path, path)
701
- return
702
- finally:
703
- if fd is not None:
704
- os.close(fd)
705
-
706
-
707
- provider.Provider = BotoCredentialAdapter
708
-
709
478
  except ImportError:
710
479
  pass