-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from EBI-Metagenomics/create_release
Create release action
- Loading branch information
Showing
11 changed files
with
349 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Create Release with Images | ||
|
||
on: | ||
workflow_dispatch: # Allows manual triggering | ||
push: | ||
tags: | ||
- "v*" # Trigger on version tags | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: 'pip' # caching pip dependencies | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install . | ||
- name: Install graphviz | ||
run: sudo apt-get install -y graphviz | ||
|
||
- name: Generate Images Folder | ||
run: | | ||
cat kegg_pathways_completeness/pathways_data/all_pathways.txt | tr ':' '\t' | cut -f1 > list_modules.txt | ||
python -m kegg_pathways_completeness.bin.plot_modules_graphs --modules-file list_modules.txt --graphs kegg_pathways_completeness/pathways_data/graphs.pkl --definitions kegg_pathways_completeness/pathways_data/all_pathways.txt -o plots --use-pydot | ||
rm list_modules.txt | ||
- name: Compress Folder into GZIP | ||
run: | | ||
tar -czf plots.tar.gz ./plots | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ github.ref_name }} | ||
release_name: "Release ${{ github.ref_name }}" | ||
body: "Automatically generated release ${{ github.ref_name }} with images." | ||
draft: false | ||
prerelease: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload Archive to Release | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./plots.tar.gz | ||
asset_name: plots.tar.gz | ||
asset_content_type: application/gzip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
tests/outputs/plot_modules_graphs/test_pydot/dot/M00001.dot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
digraph G { | ||
name=M00001; | ||
comment="(K00844,K12407,K00845,K25026,K00886,K08074,K00918) (K01810,K06859,K13810,K15916) (K00850,K16370,K21071,K24182,K00918) (K01623,K01624,K11645,K16305,K16306) K01803 ((K00134,K00150) K00927,K11389) (K01834,K15633,K15634,K15635) (K01689,K27394) (K00873,K12406)"; | ||
0; | ||
2; | ||
0 -> 2 [label="K00844 \n [1/9]", color=black]; | ||
0; | ||
2; | ||
0 -> 2 [label="K12407 \n [1/9]", color=black]; | ||
0; | ||
2; | ||
0 -> 2 [label="K00845 \n [1/9]", color=black]; | ||
0; | ||
2; | ||
0 -> 2 [label="K25026 \n [1/9]", color=black]; | ||
0; | ||
2; | ||
0 -> 2 [label="K00886 \n [1/9]", color=black]; | ||
0; | ||
2; | ||
0 -> 2 [label="K08074 \n [1/9]", color=black]; | ||
0; | ||
2; | ||
0 -> 2 [label="K00918 \n [1/9]", color=black]; | ||
2; | ||
3; | ||
2 -> 3 [label="K01810 \n [1/9]", color=black]; | ||
2; | ||
3; | ||
2 -> 3 [label="K06859 \n [1/9]", color=black]; | ||
2; | ||
3; | ||
2 -> 3 [label="K13810 \n [1/9]", color=black]; | ||
2; | ||
3; | ||
2 -> 3 [label="K15916 \n [1/9]", color=black]; | ||
3; | ||
4; | ||
3 -> 4 [label="K00850 \n [1/9]", color=black]; | ||
3; | ||
4; | ||
3 -> 4 [label="K16370 \n [1/9]", color=black]; | ||
3; | ||
4; | ||
3 -> 4 [label="K21071 \n [1/9]", color=black]; | ||
3; | ||
4; | ||
3 -> 4 [label="K24182 \n [1/9]", color=black]; | ||
3; | ||
4; | ||
3 -> 4 [label="K00918 \n [1/9]", color=black]; | ||
4; | ||
5; | ||
4 -> 5 [label="K01623 \n [1/9]", color=black]; | ||
4; | ||
5; | ||
4 -> 5 [label="K01624 \n [1/9]", color=black]; | ||
4; | ||
5; | ||
4 -> 5 [label="K11645 \n [1/9]", color=black]; | ||
4; | ||
5; | ||
4 -> 5 [label="K16305 \n [1/9]", color=black]; | ||
4; | ||
5; | ||
4 -> 5 [label="K16306 \n [1/9]", color=black]; | ||
5; | ||
6; | ||
5 -> 6 [label="K01803 \n [1/9]", color=black]; | ||
6; | ||
8; | ||
6 -> 8 [label="K00134 \n [1/18]", color=black]; | ||
6; | ||
8; | ||
6 -> 8 [label="K00150 \n [1/18]", color=black]; | ||
6; | ||
7; | ||
6 -> 7 [label="K11389 \n [1/9]", color=black]; | ||
7; | ||
9; | ||
7 -> 9 [label="K01834 \n [1/9]", color=black]; | ||
7; | ||
9; | ||
7 -> 9 [label="K15633 \n [1/9]", color=black]; | ||
7; | ||
9; | ||
7 -> 9 [label="K15634 \n [1/9]", color=black]; | ||
7; | ||
9; | ||
7 -> 9 [label="K15635 \n [1/9]", color=black]; | ||
8; | ||
7; | ||
8 -> 7 [label="K00927 \n [1/18]", color=black]; | ||
9; | ||
10; | ||
9 -> 10 [label="K01689 \n [1/9]", color=black]; | ||
9; | ||
10; | ||
9 -> 10 [label="K27394 \n [1/9]", color=black]; | ||
10; | ||
1; | ||
10 -> 1 [label="K00873 \n [1/9]", color=red]; | ||
10; | ||
1; | ||
10 -> 1 [label="K12406 \n [1/9]", color=black]; | ||
} |
Oops, something went wrong.