-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (66 loc) · 3.03 KB
/
run_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Run tests
on:
push:
branches:
- main
pull_request:
jobs:
run-tests:
name: Run tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest , opt_req: true }
- { os: windows-latest, opt_req: false }
- { os: macos-latest , opt_req: true }
steps:
- name: Cancel non-latest runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt -r requirements.txt
- name: Install package
run: |
python -m pip install . # must install in editable mode for coverage to find sources
python -m pip list
- name: Run tests
run: |
pytest
- name: Run GTNet Predict on Bins
run: |
gtnet predict data/small.fna > data/small.raw.test.csv
python -c 'import pandas as pd; pd.testing.assert_frame_equal(pd.read_csv("data/small.raw.csv"), pd.read_csv("data/small.raw.test.csv"), check_exact=False, atol=1e-4)'
- name: Run GTNet Filter on Bins
run: |
gtnet filter --fpr 0.05 data/small.raw.csv > data/small.tax.test.csv
python -c 'import pandas as pd; pd.testing.assert_frame_equal(pd.read_csv("data/small.tax.0.05.csv"), pd.read_csv("data/small.tax.test.csv"), check_exact=False, atol=1e-4)'
- name: Run GTNet Classify on Bins
run: |
gtnet classify --fpr 0.05 data/small.fna > data/small.tax.test.csv
python -c 'import pandas as pd; pd.testing.assert_frame_equal(pd.read_csv("data/small.tax.0.05.csv"), pd.read_csv("data/small.tax.test.csv"), check_exact=False, atol=1e-4)'
- name: Run GTNet Predict on Contigs
run: |
gtnet predict --seqs data/small.fna > data/small.seqs.raw.test.csv
python -c 'import pandas as pd; pd.testing.assert_frame_equal(pd.read_csv("data/small.seqs.raw.csv"), pd.read_csv("data/small.seqs.raw.test.csv"), check_exact=False, atol=1e-4)'
- name: Run GTNet Filter on Contigs
run: |
gtnet filter --fpr 0.05 data/small.seqs.raw.csv > data/small.seqs.tax.test.csv
python -c 'import pandas as pd; pd.testing.assert_frame_equal(pd.read_csv("data/small.seqs.tax.0.05.csv"), pd.read_csv("data/small.seqs.tax.test.csv"), check_exact=False, atol=1e-4)'
- name: Run GTNet Classify on Bins
run: |
gtnet classify --seqs --fpr 0.05 data/small.fna > data/small.seqs.tax.test.csv
python -c 'import pandas as pd; pd.testing.assert_frame_equal(pd.read_csv("data/small.seqs.tax.0.05.csv"), pd.read_csv("data/small.seqs.tax.test.csv"), check_exact=False, atol=1e-4)'