forked from snigdhagit/selective-inference
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
144 lines (139 loc) · 3.94 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
language: python
dist: trusty
python:
- 2.7
- 3.5
notifications:
email: false
addons:
apt:
packages:
- libblas-dev
- liblapack-dev
env:
global:
# Maximal dependencies
- DEPENDS="cython numpy scipy matplotlib"
matrix:
include:
- python: 3.5
env:
- RUN_R_TESTS=1
- python: 2.7
env:
- RUN_R_TESTS=1
# Testing without matplotlib
- python: 2.7
env:
- DEPENDS="cython numpy scipy"
# Documentation doctests
- python: 2.7
env:
- DOC_DOC_TEST=1
# Setup.py install
- python: 2.7
env:
- INSTALL_TYPE=setup
- python: 2.7
env:
# Sdist install should collect all dependencies
- INSTALL_TYPE=sdist
- DEPENDS="cython numpy scipy"
- python: 2.7
env:
# Wheel install should collect all dependencies
- INSTALL_TYPE=wheel
- DEPENDS="cython numpy scipy"
- python: 2.7
env:
- INSTALL_TYPE=requirements
- DEPENDS=
# Testing without matplotlib
- python: 3.5
env:
- DEPENDS="cython numpy scipy"
# Documentation doctests
- python: 3.5
env:
- DOC_DOC_TEST=1
# Setup.py install
- python: 3.5
env:
- INSTALL_TYPE=setup
- python: 3.5
env:
# Sdist install should collect all dependencies
- INSTALL_TYPE=sdist
- DEPENDS="cython numpy scipy"
- python: 3.5
env:
# Wheel install should collect all dependencies
- INSTALL_TYPE=wheel
- DEPENDS="cython numpy scipy"
- python: 3.5
env:
- INSTALL_TYPE=requirements
- DEPENDS=
before_install:
- source travis-tools/utils.sh
- travis_before_install
# Install regreg
- git clone https://github.com/jonathan-taylor/regreg.git
- cd regreg
- pip install -r requirements.txt
- pip install -e .
- cd ..
- sudo apt-get install software-properties-common
- sudo add-apt-repository -y ppa:marutter/c2d4u
- sudo add-apt-repository -y ppa:marutter/rrutter
- sudo apt-get update
- sudo apt-get install -y r-base r-base-dev r-cran-devtools r-cran-rcpp
install:
# Install selection
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
pip install -r requirements.txt -c constraints.txt;
else
pip install -r requirements.txt;
fi
- git submodule init
- git submodule update
- git clone https://github.com/jonathan-taylor/R-selective.git
- cd R-selective
- git submodule init
- git submodule update
- Rscript -e "library(Rcpp); Rcpp::compileAttributes('selectiveInference')"
- sudo Rscript -e "install.packages(c('glmnet', 'intervals', 'adaptMCMC', 'SLOPE'), repos='http://cloud.r-project.org')"
- sudo make install
- cd ..
- python -c "from statsmodels.api import PHReg"
- travis_install $INSTALL_TYPE
# command to run tests, e.g. python setup.py test
script:
- pip install nose
# No figure windows for mpl; quote to hide : from travis-ci yaml parsing
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
pip install -r doc-requirements.txt -c constraints.txt;
else
pip install -r doc-requirements.txt;
fi
# Change into an innocuous directory and find tests from installation
- mkdir for_testing
- cd for_testing
- 'echo "backend : agg" > matplotlibrc'
# Doctests only on platforms that have compatible fp output
- if [ `uname` == "Darwin" ] ||
[ "${TRAVIS_PYTHON_VERSION:0:1}" == "3" ]; then
DOCTEST_ARGS="--with-doctest";
fi
- if [ "${COVERAGE}" == "1" ]; then
cp ../.coveragerc .;
COVER_ARGS="--with-coverage --cover-package selection";
fi
- |
if [ "$RUN_R_TESTS" ]; then
nosetests -v ../selection/algorithms/tests/test_compareR.py
else
env USE_SMALL_SAMPLES=1 USE_TEST_SEED=1 nosetests $DOCTEST_ARGS --verbose $COVER_ARGS selection
fi
after_success:
- if [ "${COVERAGE}" == "1" ]; then coveralls; fi