Skip to content

Commit ffeb3c6

Browse files
committed
add tests, requirements
1 parent bd9aeb6 commit ffeb3c6

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

.travis.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
language: python
2+
3+
env:
4+
- PYTHON=2.7
5+
- PYTHON=2.7
6+
- PYTHON=3.3
7+
- PYTHON=3.4
8+
9+
install:
10+
- conda update conda --yes
11+
- conda create -n testenv --yes pip python=$PYTHON
12+
- conda update conda --yes
13+
- source activate testenv
14+
- conda install --yes --file requirements.txt
15+
- python combat.py
16+
- python test.py
17+
18+
before_install:
19+
- sudo apt-get update -yq
20+
- sudo sh -c "echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections"
21+
- sudo apt-get install msttcorefonts -qq
22+
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
23+
- chmod +x miniconda.sh
24+
- ./miniconda.sh -b
25+
- export PATH=/home/travis/miniconda/bin:$PATH
26+
27+
before_script:
28+
- conda install --yes -c r r
29+
30+
script:
31+
- nosetests --with-doctest
32+
# Notebook tests are failing on old matplotlib
33+
# because the figures have every so slightly a
34+
# different size. Skip until I understand why.
35+
- if [ ${DEPS} == modern ] && [ ${PYTHON} != 3.4 ]; then
36+
python ipnbdoctest.py examples/*.ipynb;
37+
fi
38+

R-combat.R

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
source("http://bioconductor.org/biocLite.R")
2+
biocLite("sva")
13
library("sva")
24
options(stringsAsFactors=FALSE)
35

requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pandas
2+
patsy

test.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env python
2+
3+
import pandas as pd
4+
5+
p = pd.read_table('py-batch.txt', index_col=0)
6+
r = pd.read_table('r-batch.txt', index_col=0)
7+
8+
assert (p - r).max().max() < 1e-4

0 commit comments

Comments
 (0)