-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (69 loc) · 2.93 KB
/
.travis.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
language: python
python:
- "3.6"
install:
# Adapted from https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html
- sudo apt-get update
# We do this conditionally because it saves us some downloading if the
# version is the same.
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
# # Replace dep1 dep2 ... with your dependencies
# - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION dep1 dep2 ...
# - source activate test-environment
# - python setup.py install
# Set up conda environment with all requirements
- cd $TRAVIS_BUILD_DIR
- conda config --add channels conda-forge
- conda config --add channels bioconda
- conda env create -f environment.yml
- source activate varalign-env-py3
# Install VarAlign
- pip install .
# Structural analyses
# Setup environment with arpeggio dependencies
- cd $HOME
- conda create -n arpeggio python=2 pip numpy biopython openbabel
- source activate arpeggio
# Get patched Arpeggio
- git clone https://bitbucket.org/biomadeira/arpeggio
- cd arpeggio
- python arpeggio.py -h
# Store Arpeggio paths for ProIntVar config
- export ARPEGGIO_PATH=$(readlink -f arpeggio.py)
- export ARPEGGIO_PYTHON=$(which python)
- export ARPEGGIO_PYTHON_PATH=$(python -c 'import sys; print sys.path[-2]')
#- export ARPEGGIO_PYTHON_PATH=$(echo $PYTHONPATH)
# Install ProIntVar (https://github.com/bartongroup/ProIntVar)
- cd $HOME
- source activate varalign-env-py3
- git clone git@github.com:bartongroup/ProIntVar.git
- cd ProIntVar
# Patch ProIntVar and install
- git apply ${TRAVIS_BUILD_DIR}/ProIntVar.patch
- pip install .
# Configure ProIntVar
- ProIntVar-config-setup prointvar_config.ini
# *** Edit the following values in prointvar_config.ini ***
# arpeggio_bin = /path/to/arpeggio/arpeggio.py
# python_exe = /path/to/anaconda/envs/arpeggio/bin/python
# python_path = /path/to/anaconda/envs/arpeggio/python/lib/site-packages/
- sed -i "s:arpeggio_bin = /path/to/arpeggio/arpeggio.py:arpeggio_bin = ${ARPEGGIO_PATH}:" prointvar_config.ini
- sed -i "s:python_exe = /path/to/bin/python:python_exe = ${ARPEGGIO_PYTHON}:" prointvar_config.ini
- sed -i "s:python_path = /path/to/bin/python/lib/site-packages/:python_path = ${ARPEGGIO_PYTHON_PATH}:" prointvar_config.ini
- sed -i "s:db_root = .:db_root = ./.prointvar:" prointvar_config.ini
- ProIntVar-config-load --yes prointvar_config.ini
# Return to build dir
- cd $TRAVIS_BUILD_DIR
script:
- python -m unittest discover tests