From 548cccffc377895828c77d2fb65e749e6d5a189f Mon Sep 17 00:00:00 2001 From: Avik Datta Date: Mon, 9 Mar 2026 15:06:04 +0000 Subject: [PATCH 1/2] change dir and mode before script execution --- igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py b/igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py index 8f965cc9..d1d2f24c 100644 --- a/igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py +++ b/igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py @@ -156,6 +156,8 @@ def prepare_olink_nextflow_script( def run_olink_nextflow_script(run_script: str): try: bash_cmd = f"""set -eo pipefail; +cd { os.path.dirname(run_script) }; +chmod u+x { run_script }; bash { run_script }""" return bash_cmd except Exception as e: From 42e677c27ada13bd003dafe8bc6d4bcf604fbd2c Mon Sep 17 00:00:00 2001 From: Avik Datta Date: Mon, 9 Mar 2026 15:58:00 +0000 Subject: [PATCH 2/2] updated unit tests --- test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py b/test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py index f8dfdae7..113787fd 100644 --- a/test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py +++ b/test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py @@ -84,7 +84,7 @@ def test_run_olink_nextflow_script(self): analysis_cmd = run_olink_nextflow_script.function( script_file ) - assert analysis_cmd == f"set -eo pipefail;\nbash {script_file}" + assert analysis_cmd == f"set -eo pipefail;\ncd {os.path.dirname(script_file)};\nchmod u+x {script_file};\nbash {script_file}" if __name__=='__main__': unittest.main() \ No newline at end of file