Skip to content

Commit

Permalink
GitHub actions integration tests (#48)
Browse files Browse the repository at this point in the history
* GitHub actions clean (#40)

* Create pytest.yml

* Create pylint.yml

* Create .pylintrc

* Create test_env.yml

* Full path

* Remove conda install

* Replace path

* Pytest tests

* pip -e

* Create integration_tests.yml

* Simplify name

* CRISPRESSO2_DIR environment variable

* Up one dir

* ls workspace

* Install CRISPResso and ydiff

* Clone repo instead of checkout

* submodule

* ls

* CRISPResso2_copy

* ls

* Update env

* Simplify

* Pull from githubactions branch

* Pull githubactions repo

* Checkout githubactions

* Mckay/pd warnings (#45)

* refactor errors='ignore' to try except

* refactored integer slice to iloc[]

* moved to_numeric try except to function

* Refactor to_numeric_ignore_errors to to_numeric_ignore_columns

This change is slightly cleaner because it addresses the root issue that some
columns are strings (and can therefore not be converted to numeric types). Now
if an error does occur when converting the dfs to numeric types it won't be
swallowed up.

* Add documentation to to_numeric_ignore_columns

---------

Co-authored-by: Cole Lyman <cole@colelyman.com>

* Run tests individually

* Pin plotly version

* Run all tests even if one fails

* Test on another branch

* Switch branch with token

* Update integration_tests.yml

* Introduce pandas sorting in CRISPRessoCompare (#47)

* New makefile commands

* Fix interleaved fastq input in CRISPRessoPooled and suppress CRISPRessoWGS params (#42)

* Extract out split_interleaved_fastq function to CRISPRessoShared

* Implement splitting interleaved fastq files in CRISPRessoPooled

* Suppress split_interleaved_input from CRISPRessoWGS parameters

* Suppress other parameters in CRISPRessoWGS

* Move where interleaved fastq files are split to be trimmed properly

* Bug Fix - 367 (#35)

* - Fixed references to ref_names_for_pe

* removed extra tabs

* trying to match empty line, no tabs

* - changed references to ref_names[0]

* Mckay/pd warnings (#45)

* refactor errors='ignore' to try except

* refactored integer slice to iloc[]

* moved to_numeric try except to function

* Refactor to_numeric_ignore_errors to to_numeric_ignore_columns

This change is slightly cleaner because it addresses the root issue that some
columns are strings (and can therefore not be converted to numeric types). Now
if an error does occur when converting the dfs to numeric types it won't be
swallowed up.

* Add documentation to to_numeric_ignore_columns

---------

Co-authored-by: Cole Lyman <cole@colelyman.com>

---------

Co-authored-by: Cole Lyman <cole@colelyman.com>

* On push no branches

* On push no branches

* All in one file

* Fix yml errors

* Rename jobs

* Remove old workflow files

* Remove paths

* Run jobs in parallel

---------

Co-authored-by: mbowcut2 <55161542+mbowcut2@users.noreply.github.com>
Co-authored-by: Cole Lyman <cole@colelyman.com>
  • Loading branch information
3 people authored and kclem committed Mar 18, 2024
1 parent ad3bd4e commit cee6489
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/envs/test_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ dependencies:
- scipy
- matplotlib
- pandas
- plotly
- plotly=5.18.0
80 changes: 80 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Run Integration Tests

on:
push:

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
env:
CRISPRESSO2_DIR: ${GITHUB_WORKSPACE}/../CRISPResso2_copy

strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge,bioconda,defaults
auto-activate-base: false
activate-environment: test_env
environment-file: .github/envs/test_env.yml

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ bowtie2 samtools libsys-hostname-long-perl
pip install ydiff
- name: Create directory for files
run: |
mkdir ../CRISPResso2_copy
cp -r * ../CRISPResso2_copy
- name: Copy C2_tests repo
uses: actions/checkout@master
with:
repository: edilytics/CRISPResso2_tests
token: ${{ secrets.ACCESS_CRISPRESSO2_TESTS }}
# ref: '<BRANCH_NAME>' // Use this to specify a branch other than master

- name: Run Basic
run: |
make basic test
- name: Run Params
if: success() || failure()
run: |
make params test
- name: Run Prime Editor
if: success() || failure()
run: |
make prime-editor test
- name: Run Batch
if: success() || failure()
run: |
make batch test
- name: Run Pooled
if: success() || failure()
run: |
make pooled test
- name: Run WGS
if: success() || failure()
run: |
make wgs test
- name: Run Compare
if: success() || failure()
run: |
make compare test
2 changes: 0 additions & 2 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Pylint

on:
push:
branches:
- '*'

jobs:
build:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: Run Pytest on Push
name: Run Pytest

on:
push:
paths:
- '.github/workflows/pytest.yml'
- '.github/envs/test_env.yml'
branches:
- '*'

jobs:
build:
Expand Down

0 comments on commit cee6489

Please sign in to comment.