Skip to content

Commit 5709305

Browse files
vjaganat90Vasu Jaganath
andauthored
fix basepath issue in run_cwl_serialized_async and fix erroneous _inline extension (PolusAI#331)
* fix unnecessary/obselete suffix to yaml stem when using inlining * fix the path issue in python api --------- Co-authored-by: Vasu Jaganath <[email protected]>
1 parent 8a5ef2b commit 5709305

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sophios/run_local.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ def run_local(args: argparse.Namespace, rose_tree: RoseTree, cachedir: Optional[
150150
# will cause github to terminate the CI Action...
151151
skip_schemas = ['--skip-schemas'] if not args.no_skip_dollar_schemas else []
152152

153-
yaml_stem = yaml_stem + '_inline' if args.cwl_inline_subworkflows else yaml_stem
154153
if cwl_runner == 'cwltool':
155154
parallel = ['--parallel'] if args.parallel else []
156155
# NOTE: --parallel is required for real-time analysis / real-time plots,
@@ -474,13 +473,14 @@ async def run_cwl_serialized_async(workflow: Json, basepath: str,
474473
compiled_cwl = workflow_name + '.cwl'
475474
inputs_yml = workflow_name + '_inputs.yml'
476475
# write _input.yml file
477-
with open(Path.cwd() / basepath / inputs_yml, 'w', encoding='utf-8') as f:
476+
with open(basepath / inputs_yml, 'w', encoding='utf-8') as f:
478477
yaml.dump(workflow['yaml_inputs'], f)
479478
workflow.pop('retval', None)
480479
workflow.pop('yaml_inputs', None)
481480
workflow.pop('name', None)
481+
basepath = basepath.rstrip("/") if basepath != "/" else basepath
482482
# write compiled .cwl file
483-
with open(Path.cwd() / basepath / compiled_cwl, 'w', encoding='utf-8') as f:
483+
with open(basepath / compiled_cwl, 'w', encoding='utf-8') as f:
484484
yaml.dump(workflow, f)
485485
retval = run_cwl_workflow(workflow_name, basepath,
486486
cwl_runner, container_cmd, False, env_commands=env_commands)

0 commit comments

Comments
 (0)