Skip to content

Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows #42

Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows #42

name: CI
on:
push:
paths-ignore:
- 'README.md'
- 'LICENSE'
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
download_taxonomy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install .
- name: Download taxonomy
run: contigtax download taxonomy
- name: Upload taxonomy
uses: actions/upload-artifact@v1
with:
name: taxonomy
path: taxonomy
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
os: [ubuntu-latest, macos-latest]
needs: download_taxonomy
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: s-weigand/setup-conda@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -r requirements.txt
- 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: Install base env
run: conda install -n base -c bioconda diamond
- name: Install package
run: python -m pip install .
- name: Test with pytest
run: python -m pytest
- name: Format fasta
run: |
gzip -c tests/data/uniref100.fasta > uniref100.fasta.gz
contigtax format -m uniref100.map.gz uniref100.fasta.gz uniref100.reformat.fasta.gz
- name: Download taxonomy
uses: actions/download-artifact@v4.1.7
with:
name: taxonomy
- name: Build
run: contigtax build -d uniref100.dmnd uniref100.reformat.fasta.gz uniref100.map.gz taxonomy/nodes.dmp
- name: Search
run: contigtax search --taxonmap uniref100.map.gz -p 4 tests/data/shreds.fasta uniref100.dmnd shreds.tsv.gz
- name: Assign
run: contigtax assign --taxidout taxids.tsv -p 4 shreds.tsv.gz taxonomy.tsv
- name: Evaluate
run: |
mkdir -p ${{ github.workspace }}/${{ matrix.python-version }}/evaluate
evaluate_contigtax.py taxids.tsv tests/data/shreds.taxids.tsv >${{ github.workspace }}/${{ matrix.python-version }}/evaluate/eval.tsv 2>${{ github.workspace }}/${{ matrix.python-version }}/evaluate/eval.log
- name: Archive evaluation results
uses: actions/upload-artifact@v1
with:
name: ${{ runner.os }}-python-${{ matrix.python-version }}-eval
path: ${{ github.workspace }}/${{ matrix.python-version }}/evaluate