From c2081c598dbd55571f2545b3e5ed06d4cdb780e1 Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Wed, 28 Feb 2024 14:23:52 -0500 Subject: [PATCH 1/9] Remove linting test --- .github/workflows/python-app.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 4725e30..b4b6b8e 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -26,12 +26,6 @@ jobs: - name: Install dependencies run: | conda env create -f kir-annotator-env.yml - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | conda activate kir-annotator-env From b0df232d703797d81d9e6aaabf3c885f3cd5adb6 Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Wed, 28 Feb 2024 15:31:38 -0500 Subject: [PATCH 2/9] Bugfix in github test --- .github/workflows/python-app.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index b4b6b8e..da591ad 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -5,9 +5,9 @@ name: Python application on: push: - branches: [ "master" ] + branches: [ "*" ] pull_request: - branches: [ "master" ] + branches: [ "*" ] permissions: contents: read @@ -19,14 +19,13 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.10 + - name: Set up Python 3.9 uses: actions/setup-python@v3 with: - python-version: "3.10" + python-version: "3.9" - name: Install dependencies run: | - conda env create -f kir-annotator-env.yml + $CONDA/bin/conda env update --file kir-annotator-env.yml --name base - name: Test with pytest run: | - conda activate kir-annotator-env pytest From ef5650366fc14b3cc4e152681c3e28653bd57114 Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Thu, 29 Feb 2024 21:59:13 -0500 Subject: [PATCH 3/9] Change trigger, attempt conda fix --- .github/workflows/python-app.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index da591ad..e82eafb 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -5,10 +5,11 @@ name: Python application on: push: - branches: [ "*" ] + branches: [ "master" ] pull_request: - branches: [ "*" ] - + branches: [ "master" ] + workflow_dispatch: + permissions: contents: read @@ -19,13 +20,13 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v3 + - uses: conda-incubator/setup-miniconda@v3 with: - python-version: "3.9" - - name: Install dependencies - run: | - $CONDA/bin/conda env update --file kir-annotator-env.yml --name base - - name: Test with pytest + python-version: 3.9 + mamba-version: "*" + environment-file: kir-annotator-env.yml + activate-environment: kir-annotator-env + - shell: bash -el {0} + name: Test with pytest run: | pytest From 034620cb8d90b4793010a6df9e9042cef95bc83b Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Thu, 29 Feb 2024 22:03:49 -0500 Subject: [PATCH 4/9] Fix to test on branch --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index e82eafb..50dc315 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -5,7 +5,7 @@ name: Python application on: push: - branches: [ "master" ] + branches: [ "master", "feature-github-actions" ] pull_request: branches: [ "master" ] workflow_dispatch: From 1fbe1511b1993144dffb6d4614432d8556d4b4fa Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Thu, 29 Feb 2024 22:10:20 -0500 Subject: [PATCH 5/9] Fix mamba config --- .github/workflows/python-app.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 50dc315..672c527 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -17,16 +17,16 @@ jobs: build: runs-on: ubuntu-latest - + defaults: + run: + shell: bash -el {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: conda-incubator/setup-miniconda@v3 with: python-version: 3.9 - mamba-version: "*" + use-mamba: true environment-file: kir-annotator-env.yml activate-environment: kir-annotator-env - - shell: bash -el {0} - name: Test with pytest - run: | - pytest + - name: Test with Pytest + run: pytest From abfd4b5e792d37ff78e07f2ec81797e80d376704 Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Thu, 29 Feb 2024 22:20:10 -0500 Subject: [PATCH 6/9] Add missing package install --- .github/workflows/python-app.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 672c527..62451d9 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -28,5 +28,7 @@ jobs: use-mamba: true environment-file: kir-annotator-env.yml activate-environment: kir-annotator-env + - name: Install the package + run: pip install . - name: Test with Pytest run: pytest From 387bf61f8d3de8700dd22ffd83e75660b1fe3955 Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Thu, 29 Feb 2024 22:27:14 -0500 Subject: [PATCH 7/9] Rename job to run-tests --- .github/workflows/python-app.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 62451d9..997a76b 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -14,12 +14,13 @@ permissions: contents: read jobs: - build: + run-tests: runs-on: ubuntu-latest defaults: run: shell: bash -el {0} + steps: - uses: actions/checkout@v4 - uses: conda-incubator/setup-miniconda@v3 From 8b9734735680005240998b2a3d81e3a490a43d9c Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Thu, 29 Feb 2024 22:38:19 -0500 Subject: [PATCH 8/9] Rename action --- .github/workflows/{python-app.yml => test.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{python-app.yml => test.yml} (97%) diff --git a/.github/workflows/python-app.yml b/.github/workflows/test.yml similarity index 97% rename from .github/workflows/python-app.yml rename to .github/workflows/test.yml index 997a76b..f8e19c7 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a single version of Python # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python -name: Python application +name: kir-annotator tests on: push: From 4c7318980a08e44c381b745a74d79348a93a963b Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Thu, 29 Feb 2024 22:38:30 -0500 Subject: [PATCH 9/9] Add test badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6ba3cfe..3af406c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # KIR Annotator 🧬 +![Test Status](https://github.com/michael-ford/kir-annotator/actions/workflows/test.yml/badge.svg) + `kir-annotator` is a Python tool for gene sequence analysis, specifically focusing on the KIR (Killer-cell Immunoglobulin-like Receptor) genes. It automates the process of aligning sequences, identifying genes, and annotating them with relevant information such as functional variants and closest matching alleles. ## Features 🚀