-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy path.travis.yml
85 lines (70 loc) · 3.9 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
# The open-worm-analysis-toolbox Travis-CI build configuration file
#
# The original template for this .travis.yml came from
# https://gist.github.com/dan-blanchard/7045057
language: python
python:
- 2.7
#Requires: https://stackoverflow.com/questions/39111886/python-3-4-64-bit-download
#Basically for conda you need to setup a virtual environment to support older python versions
#- 3.3
#- 3.4
- 3.5
- 3.6
notifications:
email: false
services:
- xvfb
before_install:
# Fix a matplotlib error
# http://ryanvarley.uk/solutions/2014/05/14/how-to-solve-travis-ci-matplotlib-tclerror-no-display/
- "export DISPLAY=:99.0"
- echo `date`
# Create a valid user_config.py file for open-worm-analysis-toolbox. OWAT
# needs this to execute its main __init__.py
- sudo /bin/cp $TRAVIS_BUILD_DIR/open_worm_analysis_toolbox/travis_config.txt $TRAVIS_BUILD_DIR/open_worm_analysis_toolbox/user_config.py
- pip install .
# Diagnostic: list all installed Python modules
- pydoc modules
install:
- pip install --upgrade pip
- pip install six
- pip install pep8
before_script:
- mkdir $TRAVIS_BUILD_DIR/example_data
- cd $TRAVIS_BUILD_DIR/example_data
# TODO: Presumably the initial address could be a variable
#- wget "https://googledrive.com/host/0B7to9gBdZEyGNWtWUElWVzVxc0E/example_contour_and_skeleton_info.mat" -O example_contour_and_skeleton_info.mat
#- wget "https://drive.google.com/uc?export=download&id=0B7to9gBdZEyGX2tFQ1JyRzdUYUE" -O example_video_feature_file.mat
#- wget "https://drive.google.com/uc?export=download&id=0B7to9gBdZEyGakg5U3loVUktRm8" -O example_video_norm_worm.mat
#From https://gist.github.com/iamtekeste/3cdfd0366ebfd2c0d805
- wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=0B7to9gBdZEyGakg5U3loVUktRm8' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=0B7to9gBdZEyGakg5U3loVUktRm8" -O example_video_norm_worm.mat && rm -rf /tmp/cookies.txt
- wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=0B7to9gBdZEyGX2tFQ1JyRzdUYUE' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=0B7to9gBdZEyGX2tFQ1JyRzdUYUE" -O example_video_feature_file.mat && rm -rf /tmp/cookies.txt
- wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=0B7to9gBdZEyGWVAzUlYwbk1ad0E' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=0B7to9gBdZEyGWVAzUlYwbk1ad0E" -O example_contour_and_skeleton_info.mat && rm -rf /tmp/cookies.txt
# TODO: Presumably we could run some command on the directory
# This may no longer be necessary, found other bugs ...
- ls -l
- chmod 777 example_contour_and_skeleton_info.mat
- chmod 777 example_video_feature_file.mat
- chmod 777 example_video_norm_worm.mat
- pwd
- ls -l
- echo `date`
# Run test
script:
# Run pep8 on all .py files in all subfolders
# We must ignore E402 module level import not at top of file
# because of use case sys.path.append('..'); import <module>
# - find . -name \*.py -exec pep8 --ignore=E402 {} +
# NOTE: To correct any errors in the above pep8 check, run the
# following to clear out about 80% of the issues automatically:
# # Get the latest version of the repo
# git pull
# # Run autopep8 on all .py files in all subfolders
# find . -name \*.py -exec autopep8 --recursive --aggressive --aggressive --in-place {} +
# # Push these changes to GitHub
# git commit -a -m "autopep8"
- echo `date`
- cd $TRAVIS_BUILD_DIR/tests
- pwd
- nosetests --nocapture