-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github actions for tests and pre-commit (#1)
* Create python-package.yml Add first github action Signed-off-by: mmdanziger <[email protected]> * Update python-package.yml Signed-off-by: mmdanziger <[email protected]> * add defult for input file * add click to installments * add creation of tasks to workflow needed for tests * update command input name for reactome * update total number of tasks in test * update total tasks number * add pre commit * update pre commit file path * change file location * run pre commit on all files * split pre commit into seperate workflow * rename pre commit file * reformat files from pre commit * change version * change version * add whitespace * update pre-commit and run --------- Signed-off-by: mmdanziger <[email protected]> Co-authored-by: edenjenzohar <[email protected]>
- Loading branch information
1 parent
dd0cde6
commit ecb2039
Showing
7 changed files
with
90 additions
and
54 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,28 @@ | ||
|
||
name: Pre-commit | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
- name: Run pre-commit | ||
run: pre-commit run --all-files |
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,43 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install packagge | ||
run: | | ||
python -m pip install --upgrade pip pytest pytest-cov | ||
python -m pip install -e . | ||
- name: Create tasks needed for testing | ||
run: | | ||
python scripts/tasks_retrival/gene2gene_task_creation.py --allow-downloads True | ||
python scripts/tasks_retrival/Genecorpus_tasks_creation.py --allow-downloads True | ||
python scripts/tasks_retrival/HLA_task_creation.py --allow-downloads True | ||
python scripts/tasks_retrival/HPA_tasks_creation.py --allow-downloads True | ||
python scripts/tasks_retrival/humantfs_task_creation.py --allow-downloads True | ||
python scripts/tasks_retrival/Reactome_tasks_creation.py --use-local-files False | ||
- name: Test with pytest | ||
run: | | ||
python -m pytest -v --durations=40 --cov=gene_benchmark--cov-fail-under=70 gene_benchmark |
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
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