Skip to content

CI

CI #155

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
tags: '*'
schedule:
- cron: '00 04 * * 1' # 4am every Monday
workflow_dispatch:
jobs:
test_repo:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.9
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v2
- name: Set up conda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install PyTorch and FAISS
run: conda install pytorch==1.11 faiss-cpu -c pytorch
- name: Install PyTorch Scatter and PyTorch Geometric
run: conda install pytorch-scatter pyg -c pyg
- name: Install STRIDE
run: conda install kimlab::stride
- name: Test install
run: pip install -e .
- name: Test help
run: time python bin/progres -h
- name: Test import
run: time python -c "import progres"
- name: Download structures
run: |
wget https://files.rcsb.org/view/1CRN.pdb
wget https://files.rcsb.org/view/1SSU.cif
wget https://alphafold.ebi.ac.uk/files/AF-P31434-F1-model_v4.pdb
- name: Test search
run: time python bin/progres search -q 1CRN.pdb -t scope95
- name: Test domain split
run: time python bin/progres search -q AF-P31434-F1-model_v4.pdb -t cath40 -c
- name: Test score
run: time python bin/progres score 1CRN.pdb 1SSU.cif > score.txt
- name: Check score
run: |
sc=$(cat score.txt)
if [ ${sc:0:7} == "0.72652" ]; then echo "Correct score"; else echo "Wrong score, score is $sc"; exit 1; fi
- name: Test database embedding
run: |
cd data
time python ../bin/progres embed -l filepaths.txt -o out.pt
time python ../bin/progres search -q query.pdb -t out.pt
test_pypi:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.9
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v2
- name: Set up conda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install PyTorch and FAISS
run: conda install pytorch==1.11 faiss-cpu -c pytorch
- name: Install PyTorch Scatter and PyTorch Geometric
run: conda install pytorch-scatter pyg -c pyg
- name: Install STRIDE
run: conda install kimlab::stride
- name: Test install
run: pip install progres
- name: Test help
run: time progres -h
- name: Test import
run: time python -c "import progres"
- name: Download structures
run: |
wget https://files.rcsb.org/view/1CRN.pdb
wget https://files.rcsb.org/view/1SSU.cif
wget https://alphafold.ebi.ac.uk/files/AF-P31434-F1-model_v4.pdb
- name: Test search
run: time progres search -q 1CRN.pdb -t scope95
- name: Test domain split
run: time progres search -q AF-P31434-F1-model_v4.pdb -t cath40 -c
- name: Test score
run: time progres score 1CRN.pdb 1SSU.cif > score.txt
- name: Check score
run: |
sc=$(cat score.txt)
if [ ${sc:0:7} == "0.72652" ]; then echo "Correct score"; else echo "Wrong score, score is $sc"; exit 1; fi
- name: Test database embedding
run: |
cd data
time progres embed -l filepaths.txt -o out.pt
time progres search -q query.pdb -t out.pt