toil 9.1.0__py3-none-any.whl → 9.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
toil/leader.py CHANGED
@@ -349,14 +349,9 @@ class Leader:
349
349
  def create_status_sentinel_file(self, fail: bool) -> None:
350
350
  """Create a file in the jobstore indicating failure or success."""
351
351
  logName = "failed.log" if fail else "succeeded.log"
352
- localLog = os.path.join(os.getcwd(), logName)
353
- open(localLog, "w").close()
354
- self.jobStore.import_file("file://" + localLog, logName, hardlink=True)
355
-
356
- if os.path.exists(
357
- localLog
358
- ): # Bandaid for Jenkins tests failing stochastically and unexplainably.
359
- os.remove(localLog)
352
+ with self.jobStore.write_shared_file_stream(logName) as file_handle:
353
+ # We just need an empty file, so don't write any content
354
+ pass
360
355
 
361
356
  def _handledFailedSuccessor(self, successor_id: str, predecessor_id: str) -> bool:
362
357
  """
@@ -0,0 +1,52 @@
1
+ version 1.1
2
+
3
+ workflow gather {
4
+ input {
5
+ }
6
+
7
+ scatter(number in [1, 2, 3]) {
8
+ call task1 {
9
+ input:
10
+ number=number
11
+ }
12
+ }
13
+
14
+ call task2 {
15
+ input:
16
+ files = task1.foo
17
+ }
18
+
19
+ output {
20
+ File outfile = task2.outfile
21
+ }
22
+ }
23
+
24
+ task task1 {
25
+
26
+ input {
27
+ Int number
28
+ }
29
+
30
+ command <<<
31
+ echo ~{number} > foo.txt
32
+ >>>
33
+
34
+ output {
35
+ File foo = "foo.txt"
36
+ }
37
+ }
38
+
39
+ task task2 {
40
+ input {
41
+ Array[File] files
42
+ }
43
+
44
+ command <<<
45
+ cat ~{sep=" " files} >out.txt
46
+ >>>
47
+
48
+ output {
49
+ File outfile = "out.txt"
50
+ }
51
+ }
52
+
@@ -321,6 +321,28 @@ class TestWDL:
321
321
 
322
322
  assert "StringFileCoercion.output_file" in result
323
323
 
324
+ @needs_docker
325
+ def test_gather(self, tmp_path: Path) -> None:
326
+ """
327
+ Test files with the same name from different scatter tasks.
328
+ """
329
+ with get_data("test/wdl/testfiles/gather.wdl") as wdl:
330
+ result_json = subprocess.check_output(
331
+ self.base_command
332
+ + [
333
+ str(wdl),
334
+ "-o",
335
+ str(tmp_path),
336
+ "--logInfo",
337
+ "--retryCount=0"
338
+ ]
339
+ )
340
+ result = json.loads(result_json)
341
+
342
+ assert "gather.outfile" in result
343
+ assert isinstance(result["gather.outfile"], str)
344
+ assert open(result["gather.outfile"]).read() == "1\n2\n3\n"
345
+
324
346
  @needs_docker
325
347
  def test_wait(self, tmp_path: Path) -> None:
326
348
  """
toil/version.py CHANGED
@@ -1,13 +1,13 @@
1
- baseVersion = '9.1.0'
1
+ baseVersion = '9.1.2'
2
2
  cgcloudVersion = '1.6.0a1.dev393'
3
- version = '9.1.0-e341bb669efe78f93308e5ff1f02f7e375973511'
3
+ version = '9.1.2-355b72ba0e425619c0367562caf2a337078dba65'
4
4
  cacheTag = 'cache-local-py3.9'
5
5
  mainCacheTag = 'cache-master-py3.9'
6
- distVersion = '9.1.0'
6
+ distVersion = '9.1.2'
7
7
  exactPython = 'python3.9'
8
8
  python = 'python3.9'
9
- dockerTag = '9.1.0-e341bb669efe78f93308e5ff1f02f7e375973511-py3.9'
10
- currentCommit = 'e341bb669efe78f93308e5ff1f02f7e375973511'
9
+ dockerTag = '9.1.2-355b72ba0e425619c0367562caf2a337078dba65-py3.9'
10
+ currentCommit = '355b72ba0e425619c0367562caf2a337078dba65'
11
11
  dockerRegistry = 'quay.io/ucsc_cgl'
12
12
  dockerName = 'toil'
13
13
  dirty = False
toil/wdl/wdltoil.py CHANGED
@@ -5048,6 +5048,9 @@ class WDLSectionJob(WDLBaseJob):
5048
5048
  if subscript is not None:
5049
5049
  # We need to include a scatter loop number.
5050
5050
  task_path += f".{subscript}"
5051
+ # TODO: MyPy can't tell this dict copy will have the same type
5052
+ child_wdl_options = cast(WDLContext, dict(self._wdl_options))
5053
+ child_wdl_options["task_path"] = task_path
5051
5054
 
5052
5055
  if local_environment is not None:
5053
5056
  # Bring local environment into scope
@@ -5115,7 +5118,7 @@ class WDLSectionJob(WDLBaseJob):
5115
5118
  job: WDLBaseJob = WDLWorkflowNodeJob(
5116
5119
  section_graph.get(node_ids[0]),
5117
5120
  rvs,
5118
- wdl_options=self._wdl_options,
5121
+ wdl_options=child_wdl_options,
5119
5122
  local=True,
5120
5123
  )
5121
5124
  else:
@@ -5123,7 +5126,7 @@ class WDLSectionJob(WDLBaseJob):
5123
5126
  job = WDLWorkflowNodeListJob(
5124
5127
  [section_graph.get(node_id) for node_id in node_ids],
5125
5128
  rvs,
5126
- wdl_options=self._wdl_options,
5129
+ wdl_options=child_wdl_options,
5127
5130
  local=True,
5128
5131
  )
5129
5132
  for prev_job in prev_jobs:
@@ -5158,7 +5161,7 @@ class WDLSectionJob(WDLBaseJob):
5158
5161
  # And to fill in bindings from code not executed in this instantiation
5159
5162
  # with Null, and filter out stuff that should leave scope.
5160
5163
  sink = WDLCombineBindingsJob(
5161
- leaf_rvs, wdl_options=self._wdl_options, local=True
5164
+ leaf_rvs, wdl_options=child_wdl_options, local=True
5162
5165
  )
5163
5166
  # It runs inside us
5164
5167
  self.addChild(sink)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: toil
3
- Version: 9.1.0
3
+ Version: 9.1.2
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
@@ -4,13 +4,13 @@ toil/common.py,sha256=SCcqojtspk3oqwStKUx-daP7fMCgWQ8TWBgh7WNcSRY,83253
4
4
  toil/deferred.py,sha256=2ShsuPqDwu0jhBQ6ocMwe4lfNegBm2lj7dOG9E7X3Zc,14152
5
5
  toil/exceptions.py,sha256=oL2d9uutwtcPkMcEUGrixKUd4y1JLSA0-N7hNJqCLSk,1883
6
6
  toil/job.py,sha256=KGcmuzoCFtWakl_y4LwBlo8Uuh1-FnGqHOXc_BwAF0A,175901
7
- toil/leader.py,sha256=abI47MI8zUlWZCjFce2QMwoFF9-QQ1aF8kWn7qKtrpM,85829
7
+ toil/leader.py,sha256=jyx9pRREOfbA8X-IfVQmhNv34UvhmUJfm2Tr6-oqKwc,85659
8
8
  toil/realtimeLogger.py,sha256=2O4AUaKtvItzzCAQKORIEHZ2cDoLf_6njoKWv_uzdFc,9878
9
9
  toil/resource.py,sha256=2LmdM6zqjG_aYqQ25UixpkdKipLYnKngMGhll4I-O6M,25349
10
10
  toil/serviceManager.py,sha256=GE5IUjQmNrekYv9tclim0RlCFf4ueOQ2H4qHjMBrOcg,19978
11
11
  toil/statsAndLogging.py,sha256=JXir7TCV8OdDaAdt3VsDR2rbdNWk4ILyOwlKHVdoXT0,18696
12
12
  toil/toilState.py,sha256=DD52XQv8wRCYzF7-F6Olqa_k6u-_py-JWyjqJHRh6Z0,17989
13
- toil/version.py,sha256=CHyCVncfvUkQyL2LsngddgCkkBkhrtOF8yHxwkeLVYw,486
13
+ toil/version.py,sha256=1R_b63zYENcFZU5lPdbYiY-fe6Wfugp63fYEbhmEcaA,486
14
14
  toil/worker.py,sha256=uEU3BnmFS-SQf2JW6FDvcf7t8uUXFXiInaJLTt8l9Lk,39315
15
15
  toil/batchSystems/__init__.py,sha256=T8psI5GmvE71_XmajKsfeQ3YUs6XM7rX1Fy9VNUX_-Q,1036
16
16
  toil/batchSystems/abstractBatchSystem.py,sha256=yOsKGlKOADtBhsG6OVvBY2yRJREJtPd84WisE47xBO0,33803
@@ -320,7 +320,7 @@ toil/test/wdl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
320
320
  toil/test/wdl/lint_error.wdl,sha256=vLwgk8CrPzLNRJnMLuQV22m1E1cwG-m76ZM0XgSKfLY,86
321
321
  toil/test/wdl/test.csv,sha256=1hPDzKegqv1H582Bx-4CaFBLE-jCSyZo3N6KhjhsXO8,18
322
322
  toil/test/wdl/test.tsv,sha256=O4F7lQouDB33aMklmbL2KOoLNNEDx_EUiHmANZ4pKeg,18
323
- toil/test/wdl/wdltoil_test.py,sha256=FyVZHRIp7qoSpospQUB4rt08mGcctI_l2OJY3KUnV1I,50554
323
+ toil/test/wdl/wdltoil_test.py,sha256=GajkwQqFCcbUYqALEpW2KIUYhVvgnCcQH_qXwfHAzh4,51302
324
324
  toil/test/wdl/wdltoil_test_kubernetes.py,sha256=vJdmSuQJslvrfF6nadjORkdanED99xElG54EC7L2rR4,2996
325
325
  toil/test/wdl/md5sum/empty_file.json,sha256=Y4Yb2dygeV8J7wowyUuTi8qOwmRR-znb70r3jsPw688,27
326
326
  toil/test/wdl/md5sum/md5sum-gs.json,sha256=PppK5H77nRcpo_n2ttZzEPkoxrLVypGlFD6Wrwe-hfk,123
@@ -403,6 +403,7 @@ toil/test/wdl/testfiles/croo.wdl,sha256=LglQ9WjDYmMI6fsDE_CacTRMHtTRu84LX-H05IIS
403
403
  toil/test/wdl/testfiles/drop_files.wdl,sha256=6pR3s6IOIg6tvZesvF4Fh78QvzlKGz3HP3X4PUQgIWs,1929
404
404
  toil/test/wdl/testfiles/drop_files_subworkflow.wdl,sha256=Qrq7LPfQGmD8ALWUVyp3AlZ8_KcD1nqKCb5bVf9wDb4,158
405
405
  toil/test/wdl/testfiles/empty.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
406
+ toil/test/wdl/testfiles/gather.wdl,sha256=kzycmVYei6LkZkcAtCM1JD6g498bMALiO-JVjBwa3hc,637
406
407
  toil/test/wdl/testfiles/not_enough_outputs.wdl,sha256=AO3v20B5nR28MZmmKYCTiqh3hRJgg6LCENAZ2nC4IYg,438
407
408
  toil/test/wdl/testfiles/random.wdl,sha256=74vORE5a-fcQs_z73uyjUzkRqpGLv22bWmlNuvE83nw,1017
408
409
  toil/test/wdl/testfiles/read_file.wdl,sha256=9UkeiNK7QQJfzARfWfApL_zQ_7O3cTAF3_IyJfBhQJs,296
@@ -442,10 +443,10 @@ toil/utils/toilStatus.py,sha256=qacxW5lcguvmhUi1b4cjm1acJik0zpsP7CsUuZyX-fo,2042
442
443
  toil/utils/toilUpdateEC2Instances.py,sha256=47972f1_oRvKOZv77EcBr3QjP2YNl8SZWhTsw6mWG-4,1318
443
444
  toil/wdl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
444
445
  toil/wdl/utils.py,sha256=U0TqbVTsap0VdeZjrUf4l71A7Zns-Hkso1B1Zdp2LRk,1316
445
- toil/wdl/wdltoil.py,sha256=bxg5QBKK404VW6MCOlNgTpFnrOvDlNkDLGVO7u70rSY,265800
446
- toil-9.1.0.dist-info/licenses/LICENSE,sha256=YVxVi652J1ZDmtC3EMP5r0EbK85-hm_pzogiULmlqUA,12862
447
- toil-9.1.0.dist-info/METADATA,sha256=r7k37536fUxWnVEP9c5wT-7gqeqYcl1J0gHAu942pXQ,8695
448
- toil-9.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
449
- toil-9.1.0.dist-info/entry_points.txt,sha256=EF2yFhV2UYuJGr-OjMkUOd3RyOCgRWQbS6XJtBJ25eM,436
450
- toil-9.1.0.dist-info/top_level.txt,sha256=1ydj7IXvHS9tMT5OVTSSpub6ZOaQeIn3KGCgJqaikF0,5
451
- toil-9.1.0.dist-info/RECORD,,
446
+ toil/wdl/wdltoil.py,sha256=DKGkqbGjjEaXt9QrnSKDzEE3JuAMNzE_jc9cxyibk7c,265992
447
+ toil-9.1.2.dist-info/licenses/LICENSE,sha256=YVxVi652J1ZDmtC3EMP5r0EbK85-hm_pzogiULmlqUA,12862
448
+ toil-9.1.2.dist-info/METADATA,sha256=jNXFOpp2P2OkDd2zNWN_RGSuhnsxXvWaxin8lgBE3B4,8695
449
+ toil-9.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
450
+ toil-9.1.2.dist-info/entry_points.txt,sha256=EF2yFhV2UYuJGr-OjMkUOd3RyOCgRWQbS6XJtBJ25eM,436
451
+ toil-9.1.2.dist-info/top_level.txt,sha256=1ydj7IXvHS9tMT5OVTSSpub6ZOaQeIn3KGCgJqaikF0,5
452
+ toil-9.1.2.dist-info/RECORD,,
File without changes