Skip to content

Commit

Permalink
Merge pull request #247 from umccr/bugfix/no-doc-cache
Browse files Browse the repository at this point in the history
Use --no-doc-cache to stop cwltool from locking
  • Loading branch information
alexiswl authored Nov 29, 2023
2 parents 7571695 + 7a5aaa7 commit ec93d33
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bin/create_typescript_interface_from_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def create_packed_schema_json(cwl_yaml_path: Path) -> Dict:
"outputs: {}\n"
)

cwltool_pack_proc: CompletedProcess = run(["cwltool", "--pack", cwl_tool_file.name], capture_output=True)
cwltool_pack_proc: CompletedProcess = run(["cwltool", "--no-doc-cache", "--pack", cwl_tool_file.name], capture_output=True)

if not cwltool_pack_proc.returncode == 0:
logger.error(f"cwltool failed with error '{cwltool_pack_proc.stderr.decode()}'")
Expand Down
8 changes: 4 additions & 4 deletions classes/cwl.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def run_cwltool_pack(self, packed_file: NamedTemporaryFile):
[
"conda", "run",
"--name", ICAV1_CWLTOOL_CONDA_ENV_NAME,
"cwltool", "--pack", self.cwl_file_path
"cwltool", "--no-doc-cache", "--pack", self.cwl_file_path

],
capture_output=True)
Expand All @@ -207,7 +207,7 @@ def run_cwltool_pack(self, packed_file: NamedTemporaryFile):
@staticmethod
def run_cwltool_validate(cwl_file_path: Path):
"""
Run subprocess command ["cwltool", "--validate", "/path/to/cwl"]
Run subprocess command ["cwltool", "--no-doc-cache", "--validate", "/path/to/cwl"]
:return:
"""

Expand All @@ -219,7 +219,7 @@ def run_cwltool_validate(cwl_file_path: Path):
[
"conda", "run",
"--name", ICAV1_CWLTOOL_CONDA_ENV_NAME,
"cwltool", "--validate", cwl_file_path
"cwltool", "--no-doc-cache", "--validate", cwl_file_path

],
capture_output=True)
Expand All @@ -234,7 +234,7 @@ def run_cwltool_validate(cwl_file_path: Path):
[
"conda", "run",
"--name", f"{LATEST_CWLTOOL_CONDA_ENV_NAME}",
"cwltool", "--validate", cwl_file_path
"cwltool", "--no-doc-cache", "--validate", cwl_file_path

],
capture_output=True)
Expand Down
2 changes: 1 addition & 1 deletion subcommands/v2/zip_v2_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def zip_workflow(self):
)
proc_returncode, proc_stdout, proc_stderr = run_subprocess_proc(
[
"cwltool", "--validate", str(output_tempdir / "workflow.cwl")
"cwltool", "--no-doc-cache", "--validate", str(output_tempdir / "workflow.cwl")
],
cwd=str(output_tempdir),
capture_output=True
Expand Down
6 changes: 3 additions & 3 deletions utils/cwl_workflow_helper_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def collect_objects_by_print_deps(cwl_path: Path) -> List:

returncode, stdout, stderr = run_subprocess_proc(
[
"cwltool", "--print-deps", str(cwl_path)
"cwltool", "--no-doc-cache", "--print-deps", str(cwl_path)
],
capture_output=True
)
Expand Down Expand Up @@ -396,7 +396,7 @@ def zip_workflow(cwl_obj: CWLWorkflow, output_zip_path: Path):
logger.info("Now all files have been transferred, confirming successful 'zip' with cwltool --validate")
proc_returncode, proc_stdout, proc_stderr = run_subprocess_proc(
[
"cwltool", "--validate", str(output_tempdir / "workflow.cwl")
"cwltool", "--no-doc-cache", "--validate", str(output_tempdir / "workflow.cwl")
],
cwd=str(output_tempdir),
capture_output=True
Expand Down Expand Up @@ -442,7 +442,7 @@ def create_packed_workflow_from_zipped_workflow_path(zipped_path: Path, output_p
# Pack workflow
pack_returncode, pack_stdout, pack_stderr = run_subprocess_proc(
[
"cwltool", "--pack", extracted_main_workflow_path
"cwltool", "--no-doc-cache", "--pack", extracted_main_workflow_path
],
capture_output=True
)
Expand Down
2 changes: 1 addition & 1 deletion utils/pydot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def build_cwl_dot(cwl_item: CWL, dot_out_path: Path):
with open(str(dot_out_path), 'w') as write_h:
build_dot_returncode, _, build_dot_stderr = run_subprocess_proc(
[
"cwltool", "--debug",
"cwltool", "--debug", "--no-doc-cache",
"--print-dot", cwl_packed_temp_file.name
],
stdout=write_h, stderr=subprocess.PIPE
Expand Down

0 comments on commit ec93d33

Please sign in to comment.