From 582d111902bb9ba176f5a97190e1774e83f51067 Mon Sep 17 00:00:00 2001 From: Leon Rauschning <99650940+lrauschning@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:30:25 +0800 Subject: [PATCH] switch to modifying code at runtime --- .github/workflows/run_test_example.sh | 22 +++++++++++++--------- .github/workflows/test_example.yml | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/run_test_example.sh b/.github/workflows/run_test_example.sh index 6863521..fc4db71 100755 --- a/.github/workflows/run_test_example.sh +++ b/.github/workflows/run_test_example.sh @@ -4,12 +4,16 @@ # hacky way to hopefully alias the calls # normal alias does not seem to work in GitHub CI # necessary, as the hacky git install does not install the CLI entrypoints -echo "#!/bin/bash python <(echo 'import syri.scripts.syri;syri.scripts.syri.main()')" > syri -chmod +x ./syri -echo "minimap2.py" > ./minimap2 -chmod +x ./minimap2 -PATH=$PATH:./ -syri --version -minimap2 -# run using source to preserve alias -source ./example/example_workflow.sh +#echo "python <(echo 'import syri.scripts.syri;syri.scripts.syri.main()')" > syri +#chmod +x ./syri +#echo "minimap2.py" > ./minimap2 +#chmod +x ./minimap2 +#PATH=$PATH:./ +#syri --version +#minimap2 +## run using source to preserve alias +#source ./example/example_workflow.sh + +$CONDA/bin/conda install -c conda-forge -c bioconda "bioconda::minimap2" +$(tail -n -1 ./example/example_workflow.sh |\ + sed -e 's/^syri/python <(echo "import syri.scripts.syri;syri.scripts.syri.main()")/' ) diff --git a/.github/workflows/test_example.yml b/.github/workflows/test_example.yml index 27a068d..b42fcca 100644 --- a/.github/workflows/test_example.yml +++ b/.github/workflows/test_example.yml @@ -23,7 +23,7 @@ jobs: python-version: "3.12" - name: Install other tools using conda run: | - $CONDA/bin/conda install -c conda-forge -c bioconda "minimap2" + $CONDA/bin/conda install -c conda-forge -c bioconda "bioconda::minimap2" - name: Test example_run.sh run: ./.github/workflows/run_test_example.sh shell: bash