-
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 #1 from EBI-Metagenomics/pypi
Add PyPi publishing to kegg-pathways-completeness
- Loading branch information
Showing
1,025 changed files
with
539 additions
and
427 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: Check KEGG API for new records | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 1 * *' # Runs at midnight on the 1st of every month | ||
|
||
jobs: | ||
check-api: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Check API for new records | ||
run: python kegg_pathways_completeness/bin/update_pathways_data/get_modules_list.py | ||
|
||
- name: Check if new_modules.txt exists | ||
id: check-file | ||
run: | | ||
if [[ -f "new_modules.txt" ]]; then | ||
echo "file_exists=true" >> $GITHUB_ENV | ||
else | ||
echo "file_exists=false" >> $GITHUB_ENV | ||
fi | ||
- name: Get current date | ||
id: date | ||
run: echo "BRANCH_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
|
||
- name: Commit and push changes | ||
if: env.file_exists == 'true' | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config pull.rebase false | ||
git pull origin master --allow-unrelated-histories | ||
git checkout -b changes-${{ env.BRANCH_DATE }} | ||
git add new_modules.txt | ||
git commit -m "Add new_modules.txt with updates" | ||
git push origin HEAD:changes-${{ env.BRANCH_DATE }} | ||
- name: Create Pull Request | ||
if: env.file_exists == 'true' | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: changes | ||
title: "Automated update of new_modules.txt" | ||
body: "This PR was created automatically by the GitHub Action." |
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,31 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [master, dev] | ||
pull_request: | ||
branches: [master, dev] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ '3.10', '3.11' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Graphviz | ||
uses: ts-graphviz/setup-graphviz@v2 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: pip install .[test] | ||
|
||
- name: Run pytest | ||
run: pytest |
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,19 @@ | ||
repos: | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: 'v0.4.8' | ||
hooks: | ||
- id: ruff | ||
- repo: https://github.com/PyCQA/isort | ||
rev: '5.13.2' | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/psf/black | ||
rev: '24.4.2' | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: 'v4.6.0' | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
File renamed without changes.
Empty file.
Empty file.
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
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.