Skip to content

Commit e0a9301

Browse files
vjaganat90Vasu Jaganath
andauthored
append name of workflow to default outdir_toil (PolusAI#320)
Co-authored-by: Vasu Jaganath <[email protected]>
1 parent 039f995 commit e0a9301

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sophios/run_local.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import platform
1111
import traceback
1212
from typing import Dict, List, Optional
13+
from datetime import datetime
1314

1415
try:
1516
import cwltool.main
@@ -245,7 +246,9 @@ def run_local(args: argparse.Namespace, rose_tree: RoseTree, cachedir: Optional[
245246
# https://github.com/DataBiosphere/toil/blob/6558c7f97fb37c6ef6f469c7ae614109050322f4/src/toil/options/cwl.py#L152
246247
docker_pull = [] # toil supports --force-docker-pull, but not --disable-pull
247248
cmd = ['toil-cwl-runner'] + docker_pull + net + provenance + docker_cmd_ + path_check
248-
cmd += ['--outdir', 'outdir_toil',
249+
now = datetime.now()
250+
date_time = now.strftime("%Y%m%d%H%M%S")
251+
cmd += ['--outdir', f'outdir_toil_{yaml_stem}_{date_time}',
249252
'--jobStore', f'file:./jobStore_{yaml_stem}', # NOTE: This is the equivalent of --cachedir
250253
# TODO: Check --clean, --cleanWorkDir, --restart
251254
'--clean', 'always', # This effectively disables caching, but is reproducible

0 commit comments

Comments
 (0)