-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic CI to fetch, merge, filter tools and create static pages #34
Changes from all commits
bf9d54a
467e6bb
07961c9
e7626b6
48d9af2
27b180c
98d0fae
49f4805
2213666
ab56119
e18845f
10a4660
9e890f9
0f523f9
071f01b
e2586df
7cf6523
35b3ec8
42581d4
15a1a40
5636b03
4823d23
fa063ca
68ff222
6e5e119
1dae981
d97005d
668005c
3b2a2ad
931936e
26c7e1e
afbe5db
5ae46fc
8850334
a87e711
15a4ea6
f2fab68
380704f
0955e59
8d4d487
0392d76
bf50bb9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,75 @@ | ||||||||||
name: Fetch all tools | ||||||||||
|
||||||||||
on: | ||||||||||
workflow_dispatch: | ||||||||||
schedule: | ||||||||||
#Every Sunday at 8:00 am | ||||||||||
- cron: "0 8 * * 0" | ||||||||||
|
||||||||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||||||||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||||||||||
concurrency: | ||||||||||
group: "tools" | ||||||||||
cancel-in-progress: false | ||||||||||
|
||||||||||
permissions: | ||||||||||
contents: write | ||||||||||
|
||||||||||
jobs: | ||||||||||
fetch-all-tools-stepwise: | ||||||||||
runs-on: ubuntu-20.04 | ||||||||||
environment: fetch-tools | ||||||||||
name: Fetch all tool stepwise | ||||||||||
strategy: | ||||||||||
matrix: | ||||||||||
python-version: [3.8] | ||||||||||
subset: | ||||||||||
- repositories01.list | ||||||||||
- repositories02.list | ||||||||||
- repositories03.list | ||||||||||
- repositories04.list | ||||||||||
steps: | ||||||||||
- uses: actions/checkout@v3 | ||||||||||
- uses: actions/setup-python@v4 | ||||||||||
with: | ||||||||||
python-version: ${{ matrix.python-version }} | ||||||||||
- name: Install requirement | ||||||||||
run: python -m pip install -r requirements.txt | ||||||||||
- name: Run script | ||||||||||
run: | | ||||||||||
export GITHUB_API_KEY=${{ secrets.GH_API_TOKEN }} | ||||||||||
bash ./bin/extract_all_tools_stepwise.sh "${{ matrix.subset }}" | ||||||||||
- name: Commit all tools | ||||||||||
# add or commit any changes in results if there was a change, merge with main and push as bot | ||||||||||
run: | | ||||||||||
git config user.name github-actions | ||||||||||
git config user.email [email protected] | ||||||||||
git add results | ||||||||||
git status | ||||||||||
git diff --quiet && git diff --staged --quiet || (git commit -m "fetch all tools bot - step fetch") | ||||||||||
git pull -s recursive -X ours | ||||||||||
git push | ||||||||||
|
||||||||||
fetch-all-tools-merge: | ||||||||||
runs-on: ubuntu-20.04 | ||||||||||
needs: fetch-all-tools-stepwise | ||||||||||
name: Fetch all tools merge | ||||||||||
steps: | ||||||||||
- uses: actions/checkout@v3 | ||||||||||
- uses: actions/setup-python@v4 | ||||||||||
Comment on lines
+58
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
- name: Install requirement | ||||||||||
run: python -m pip install -r requirements.txt | ||||||||||
- name: Run script | ||||||||||
run: | | ||||||||||
cat results/repositories*.list_tools.tsv > results/all_tools.tsv | ||||||||||
bash ./bin/extract_all_tools_downstream.sh | ||||||||||
- name: Commit all tools | ||||||||||
# add or commit any changes in results if there was a change, merge with main and push as bot | ||||||||||
run: | | ||||||||||
git config user.name github-actions | ||||||||||
git config user.email [email protected] | ||||||||||
git add results | ||||||||||
git status | ||||||||||
git diff --quiet && git diff --staged --quiet || (git commit -m "fetch all tools bot - step merge") | ||||||||||
git pull -s recursive -X ours | ||||||||||
git push |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,38 @@ | ||||||||||
name: Filter community tools | ||||||||||
|
||||||||||
on: | ||||||||||
workflow_dispatch: | ||||||||||
|
||||||||||
# the workflow it triggered when all_tools_tsv is changed | ||||||||||
push: | ||||||||||
paths: | ||||||||||
- 'results/all_tools_tsv' | ||||||||||
branches: ["main"] | ||||||||||
|
||||||||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||||||||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||||||||||
concurrency: | ||||||||||
group: "filter" | ||||||||||
cancel-in-progress: false | ||||||||||
|
||||||||||
permissions: | ||||||||||
contents: write | ||||||||||
|
||||||||||
jobs: | ||||||||||
filter-all-tools: | ||||||||||
runs-on: ubuntu-20.04 | ||||||||||
steps: | ||||||||||
- uses: actions/checkout@v3 | ||||||||||
- uses: actions/setup-python@v4 | ||||||||||
Comment on lines
+25
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
- name: Install requirement | ||||||||||
run: python -m pip install -r requirements.txt | ||||||||||
- name: Run script | ||||||||||
run: | | ||||||||||
bash ./bin/get_community_tools.sh | ||||||||||
- name: Commit results | ||||||||||
# commit the new filtered data, only if stuff was changed | ||||||||||
run: | | ||||||||||
git config user.name github-actions | ||||||||||
git config user.email [email protected] | ||||||||||
git diff --quiet || (git add results && git commit -m "filter communities bot") | ||||||||||
git push |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,66 @@ | ||||||||||
name: Run tests | ||||||||||
|
||||||||||
on: | ||||||||||
workflow_dispatch: | ||||||||||
|
||||||||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||||||||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||||||||||
# concurrency: | ||||||||||
# group: "tools" | ||||||||||
# cancel-in-progress: false | ||||||||||
|
||||||||||
permissions: | ||||||||||
contents: write | ||||||||||
|
||||||||||
jobs: | ||||||||||
fetch-all-tools-stepwise: | ||||||||||
runs-on: ubuntu-20.04 | ||||||||||
environment: fetch-tools | ||||||||||
name: Fetch all tool stepwise | ||||||||||
strategy: | ||||||||||
matrix: | ||||||||||
python-version: [3.8] | ||||||||||
subset: | ||||||||||
- repositories02.list | ||||||||||
steps: | ||||||||||
- uses: actions/checkout@v3 | ||||||||||
- uses: actions/setup-python@v4 | ||||||||||
Comment on lines
+26
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
with: | ||||||||||
python-version: ${{ matrix.python-version }} | ||||||||||
- name: Install requirement | ||||||||||
run: python -m pip install -r requirements.txt | ||||||||||
- name: Run script | ||||||||||
# run: bash bin/extract_all_tools.sh | ||||||||||
run: | | ||||||||||
export GITHUB_API_KEY=${{ secrets.GH_API_TOKEN }} | ||||||||||
bash ./bin/extract_all_tools_test.sh "${{ matrix.subset }}" | ||||||||||
- name: Commit all tools | ||||||||||
# add or commit any changes in results if there was a change, merge with main and push as bot | ||||||||||
run: | | ||||||||||
git config user.name github-actions | ||||||||||
git config user.email [email protected] | ||||||||||
git add results | ||||||||||
git status | ||||||||||
git diff --quiet && git diff --staged --quiet || (git commit -m "fetch all tools bot - step fetch") | ||||||||||
git pull -s recursive -X ours | ||||||||||
git push | ||||||||||
|
||||||||||
# fetch-all-tools-merge: | ||||||||||
# runs-on: ubuntu-20.04 | ||||||||||
# needs: fetch-all-tools-stepwise | ||||||||||
# name: Fetch all tools merge | ||||||||||
# steps: | ||||||||||
# - uses: actions/checkout@v3 | ||||||||||
# - uses: actions/setup-python@v4 | ||||||||||
Comment on lines
+53
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
# - name: Install requirement | ||||||||||
# run: python -m pip install -r requirements.txt | ||||||||||
# - name: Run script | ||||||||||
# run: | | ||||||||||
# cat results/repositories*.list_tools.tsv > results/all_tools.tsv | ||||||||||
# bash ./bin/extract_all_tools_downstream.sh | ||||||||||
# - name: Commit all tools | ||||||||||
# run: | | ||||||||||
# git config user.name github-actions | ||||||||||
# git config user.email [email protected] | ||||||||||
# git diff --quiet || (git add results && git commit -m "fetch all tools bot - step merge") | ||||||||||
# git push |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir -p 'results/' | ||
|
||
python bin/create_interactive_table.py \ | ||
--table "results/all_tools.tsv" \ | ||
--template "data/interactive_table_template.html" \ | ||
--output "results/index.html" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir -p 'results/' | ||
|
||
output="results/${1}_tools.tsv" | ||
|
||
python bin/extract_galaxy_tools.py \ | ||
extractools \ | ||
--api $GITHUB_API_KEY \ | ||
--all_tools $output \ | ||
--planemorepository $1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir -p 'results/' | ||
|
||
output="results/${1}_tools.tsv" | ||
|
||
python bin/extract_galaxy_tools.py \ | ||
extractools \ | ||
--api $GITHUB_API_KEY \ | ||
--all_tools $output \ | ||
--planemorepository $1 \ | ||
--test | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.