Skip to content

Commit

Permalink
Add test conditional for format script
Browse files Browse the repository at this point in the history
  • Loading branch information
bebatut committed Nov 6, 2024
1 parent df4678a commit 4fecd36
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 24 additions & 10 deletions sources/bin/format_tools.sh
Original file line number Diff line number Diff line change
@@ -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" \
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;

0 comments on commit 4fecd36

Please sign in to comment.