Skip to content

Commit

Permalink
Merge pull request #222 from jfennick/python_api_use_subprocess
Browse files Browse the repository at this point in the history
python api use subprocess.run()
  • Loading branch information
jfennick authored May 10, 2024
2 parents f7efb21 + 0e7b2fc commit eeaefd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wic/api/pythonapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ def write_ast_to_disk(self, directory: Path) -> None:
yaml_contents = {"inputs": inputs, "steps": steps} if inputs else {"steps": steps}
# NOTE: For various reasons, process_name should be globally unique.
# In this case, it is to avoid overwriting files.
directory.mkdir(exist_ok=True, parents=True)
with open(str(directory / self.process_name) + '.wic', mode='w', encoding='utf-8') as f:
f.write(yaml.dump(yaml_contents, sort_keys=False, line_break='\n', indent=2))

Expand Down Expand Up @@ -755,7 +756,7 @@ def run(self) -> None:
input_output.write_to_disk(rose_tree, Path('autogenerated/'), True, args.inputs_file)

# Do NOT capture stdout and/or stderr and pipe warnings and errors into a black hole.
retval = run_local_module.run_local(args, rose_tree, args.cachedir, 'cwltool', False)
retval = run_local_module.run_local(args, rose_tree, args.cachedir, 'cwltool', True)

# Finally, since there is an output file copying bug in cwltool,
# we need to copy the output files manually. See comment above.
Expand Down

0 comments on commit eeaefd6

Please sign in to comment.