forked from selective-inference/Python-software
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
144 lines (140 loc) · 4.23 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
- 3.6
notifications:
email: false
addons:
apt:
packages:
- libblas-dev
- liblapack-dev
env:
global:
# Maximal dependencies
- DEPENDS="cython numpy scipy matplotlib pandas"
matrix:
include:
- python: 3.5
env:
- RUN_R_TESTS=1
- DEPENDS="cython numpy scipy statsmodels pandas"
- python: 2.7
env:
- RUN_R_TESTS=1
- DEPENDS="cython numpy scipy statsmodels pandas"
# Testing without matplotlib
- python: 3.5
env:
- DEPENDS="cython numpy scipy pandas"
# Setup.py install
- python: 3.5
env:
- INSTALL_TYPE=setup
- python: 2.7
env:
# Sdist install should collect all dependencies
- INSTALL_TYPE=sdist
- DEPENDS="cython numpy scipy pandas"
- python: 2.7
env:
# Wheel install should collect all dependencies
- INSTALL_TYPE=wheel
- DEPENDS="cython numpy scipy pandas"
- python: 2.7
env:
- INSTALL_TYPE=requirements
- DEPENDS=
# Testing without matplotlib
- python: 3.5
env:
- DEPENDS="cython numpy scipy pandas"
# Documentation doctests
- python: 3.5
env:
- DOC_DOC_TEST=1
# Setup.py install
- python: 3.5
env:
# Sdist install should collect all dependencies
- INSTALL_TYPE=sdist
- DEPENDS="cython numpy scipy pandas"
- python: 3.5
env:
# Wheel install should collect all dependencies
- INSTALL_TYPE=wheel
- DEPENDS="cython numpy scipy pandas"
- python: 3.5
env:
- INSTALL_TYPE=requirements
- DEPENDS=
before_install:
- source travis-tools/utils.sh
- travis_before_install
- 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
# would like to have this stably installed by pip but without DEPENDS it fails
- git clone https://github.com/jonathan-taylor/regreg.git
- cd regreg
- pip install -e .
- cd ..
install:
# Install selectinf
- if [ "$RUN_R_TESTS" ]; then
sudo apt-get install -y r-base r-base-dev r-cran-devtools r-cran-rcpp;
pip install rpy2 statsmodels -c constraints.txt ;
sudo Rscript -e "install.packages(c('devtools', 'intervals', 'adaptMCMC', 'SLOPE'), repos='http://cloud.r-project.org')";
sudo Rscript -e "require(devtools); install_version('glmnet', version='2.0-18', repos='http://cloud.r-project.org')";
sudo Rscript -e "install.packages('knockoff', repos='http://cloud.r-project.org')";
git clone https://github.com/jonathan-taylor/R-selective.git;
cd R-selective;
git submodule init;
git submodule update;
sudo make install;
cd ..;
fi ;
- git submodule init
- git submodule update
- 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
- pip install -r requirements.txt -c constraints.txt; # older rpy2
# Change into an innocuous directory and find tests from installation
- 'echo "backend : agg" > matplotlibrc'
- |
if [ "$DOC_BUILD" ]; then
pip install -r doc-requirements.txt;
cd doc;
jupytext --sync source/*/*.ipynb;
sudo apt-get install pandoc;
make html;
fi
#
# # Build the htmlwithout the API documentation, for the doctests
#
# fi
# Doctests only on platforms that have compatible fp output
- mkdir for_testing
- cd for_testing
- 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 selectinf";
fi
- |
if [ "$RUN_R_TESTS" ]; then
nosetests -v ../selectinf/algorithms/tests/test_compareR.py
else
env USE_SMALL_SAMPLES=1 USE_TEST_SEED=1 nosetests $DOCTEST_ARGS --verbose $COVER_ARGS selectinf
fi
after_success:
- if [ "${COVERAGE}" == "1" ]; then coveralls; fi