-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
144 lines (129 loc) · 4.49 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
language: python
python:
- "3.5"
#- "2.7"
os:
- linux
# Default environment is Ubuntu 12.04.5 LTS "precise"
# which is pretty old.
# "trusty" is Ubuntu 14.04.5 LTS
dist: trusty
# use the newer container-based infrastructure
#sudo: false
sudo: required
# python versions to test against...
# - osx
compiler:
- g++
cache:
directories:
#- $HOME/astrometry.net
#- $HOME/tractor
#- $HOME/dust
# Additonal apt-get installs
addons:
apt:
packages:
- graphviz
- texlive-latex-extra
- dvipng
- libnetpbm10
- libnetpbm10-dev
- netpbm
- wcslib-dev
- libz-dev
- libcfitsio3
- libcfitsio3-dev
- swig
- gsl-bin
- libgsl0-dev
- libboost-all-dev
- gfortran
- liblapack-dev
- libfftw3-dev
- curl
- python-tk
- libcairo2-dev
- libpng12-dev
- libjpeg-dev
- zlib1g-dev
- libbz2-dev
install:
- export WCSLIB_INC="-I/usr/include/wcslib"
- export WCSLIB_LIB="-lwcs"
#- pip install -r requirements.txt
- export python_exe=`which python`
- echo python_exe=$python_exe
- which pip
- pip install Sphinx
- pip install numpy
- pip install scipy
- pip install matplotlib
- pip install cython
- pip install numpydoc
- pip install six
- pip install astropy
- pip install --no-deps git+https://github.com/astropy/photutils.git
- pip install h5py
- pip install pandas
- pip install psycopg2
- pip install scikit-image
- pip install scikit-learn
- pip install nose future pyyaml
- pip install -U pytest
- pip install pytest-cov coveralls
- pip install --no-deps --upgrade git+https://github.com/esheldon/fitsio.git#egg=fitsio
#- pip install -v --no-deps --upgrade git+https://github.com/dstndstn/tractor.git
before_script:
- pwd
- export LEGACYZPTS_DIR=$(pwd)
- export MYCODE=$HOME/mycode
- sudo rm -rf $HOME/astrometry.net
- if [ ! -d "$HOME/astrometry.net" ]; then (cd $HOME && curl -SL https://github.com/dstndstn/astrometry.net/releases/download/0.72/astrometry.net-0.72.tar.gz -o astrometry.net.tar.gz && tar -xzf astrometry.net.tar.gz && mv astrometry.net-0.72 astrometry.net); fi
- (cd $HOME/astrometry.net && make install INSTALL_DIR=$MYCODE/astrometry)
- export PYTHONPATH=$MYCODE/astrometry/lib/python:$PYTHONPATH
- export PATH=$MYCODE/astrometry/lib/python/astrometry/util:$PATH
- export PATH=$MYCODE/astrometry/lib/python/astrometry/blind:$PATH
- cd $HOME && python -c "import astrometry; print(astrometry.__file__)"
- sudo rm -rf $HOME/tractor
- if [ ! -d "$HOME/tractor" ]; then (cd $HOME && curl -SL https://github.com/dstndstn/tractor/archive/dr5.2.tar.gz -o tractor.tar.gz && tar -xzf tractor.tar.gz && mv tractor-dr5.2 tractor); fi
- cd $HOME/tractor
- make
- python setup.py install --prefix=$MYCODE/tractor
- find $MYCODE/tractor
- python -c "import sys; print('$MYCODE/tractor/lib/python%i.%i/site-packages' % sys.version_info[:2])"
- export PYTHONPATH=$(python -c "import sys; print('$MYCODE/tractor/lib/python%i.%i/site-packages' % sys.version_info[:2])"):${PYTHONPATH}
- cd $HOME && python -c "import tractor; print(tractor.__file__)"
- mkdir -p $HOME/dust/maps
- (cd $HOME/dust/maps && wget -c http://portal.nersc.gov/project/cosmo/temp/dstn/travis-ci/maps/SFD_dust_4096_ngp.fits)
- (cd $HOME/dust/maps && wget -c http://portal.nersc.gov/project/cosmo/temp/dstn/travis-ci/maps/SFD_dust_4096_sgp.fits)
- export DUST_DIR=$HOME/dust
- cd $HOME && git clone https://github.com/legacysurvey/legacypipe.git
#- cd legacypipe && git checkout f4fc46ea0b
- export PYTHONPATH=$HOME/legacypipe/py:$PYTHONPATH
- cd $HOME && git clone https://github.com/legacysurvey/theValidator.git
- export PYTHONPATH=$HOME/theValidator:$PYTHONPATH
# - cd $HOME && git clone https://github.com/legacysurvey/legacyzpts.git
#- export PYTHONPATH=$HOME/legacyzpts/py:$PYTHONPATH
- export PYTHONPATH=${PYTHONPATH}:${LEGACYZPTS_DIR}/py:.
- echo PYTHONPATH is $PYTHONPATH
script:
- pwd
- cd $LEGACYZPTS_DIR
- export GAIA_CAT_DIR=$(pwd)/tests/testdata/chunks-gaia-dr2-astrom
- export GAIA_CAT_VER=2
- echo $GAIA_CAT_DIR
- pwd
- find .
- pytest -v tests/test_run.py::test_main
- pytest -v tests/test_against_surveyccds.py::test_main
- pytest -v tests/test_against_idl.py::test_main
- coverage run --source py/legacyzpts tests/test_run.py
- find .
after_success:
- coverage report
- coveralls
cache:
directories:
- $HOME/legacyzpts/tests/testdata
- $HOME/build/legacysurvey/legacyzpts/tests/testdata