From 4fecd36cee0509e87cc1da2a90c4309f9828babf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9r=C3=A9nice=20Batut?= Date: Wed, 6 Nov 2024 11:57:11 +0100 Subject: [PATCH] Add test conditional for format script --- .github/workflows/run_tests.yaml | 2 +- sources/bin/format_tools.sh | 34 ++++++++++++++++++++++---------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index 38d40e0a..012bea3b 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -64,7 +64,7 @@ jobs: bash sources/bin/get_community_tools.sh test - name: Create interactive table and wordcloud run: | - bash sources/bin/format_tools.sh + bash sources/bin/format_tools.sh test test-tutorials: runs-on: ubuntu-20.04 diff --git a/sources/bin/format_tools.sh b/sources/bin/format_tools.sh index 04c88095..ecf25c2a 100755 --- a/sources/bin/format_tools.sh +++ b/sources/bin/format_tools.sh @@ -1,13 +1,27 @@ #!/usr/bin/env bash -python sources/bin/create_interactive_table.py \ - --input "communities/all/resources/tools.tsv" \ - --template "sources/data/interactive_table_template.html" \ - --output "communities/all/resources/tools.html" +if [[ ! -z $1 && $1 == "test" ]]; then + python sources/bin/create_interactive_table.py \ + --input "communities/all/resources/test_tools.tsv" \ + --template "sources/data/interactive_table_template.html" \ + --output "communities/all/resources/tools.html" -python sources/bin/create_wordcloud.py \ - --input "communities/all/resources/tools.tsv" \ - --name-col "Galaxy wrapper id" \ - --stat-col "No. of tool users (5 years) - all main servers" \ - --wordcloud_mask "sources/data/usage_stats/wordcloud_mask.png" \ - --output "communities/all/resources/tools_wordcloud.png" \ \ No newline at end of file + python sources/bin/create_wordcloud.py \ + --input "communities/all/resources/test_tools.tsv" \ + --name-col "Galaxy wrapper id" \ + --stat-col "No. of tool users (5 years) - all main servers" \ + --wordcloud_mask "sources/data/usage_stats/wordcloud_mask.png" \ + --output "communities/all/resources/tools_wordcloud.png" +else + python sources/bin/create_interactive_table.py \ + --input "communities/all/resources/tools.tsv" \ + --template "sources/data/interactive_table_template.html" \ + --output "communities/all/resources/tools.html" + + python sources/bin/create_wordcloud.py \ + --input "communities/all/resources/tools.tsv" \ + --name-col "Galaxy wrapper id" \ + --stat-col "No. of tool users (5 years) - all main servers" \ + --wordcloud_mask "sources/data/usage_stats/wordcloud_mask.png" \ + --output "communities/all/resources/tools_wordcloud.png" +fi; \ No newline at end of file