-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
62 lines (54 loc) · 1.67 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
language: python
os:
- linux
env:
- FLAKE8=
- FLAKE8=yes
python:
- "3.6"
matrix:
allow_failures:
- python: "3.6"
env: FLAKE8=yes
sudo: false
install:
- pip install numpy==1.14
- pip install nltk==3.2.5
- pip install scikit-learn==0.19.0
- pip install pandas==0.22.0
- pip install scipy==1.0.0
- pip install tensorflow==1.5
- pip install h5py==2.7.1
- pip install keras==2.1.4
- pip install shapely==1.6.4.post2
- pip install pytest==6.2.2
- pip install pytest-cov==2.11.1
- pip install requests==2.18.4
- pip install google-cloud-language==1.3.0
- |
if [[ $FLAKE8 ]]; then
pip install flake8
else
python -c "import nltk; nltk.download('punkt'); nltk.download('wordnet')"
python -c "import requests;\
r = requests.get('https://data.cityofchicago.org/api/geospatial/cauq-8yn6?method=export&format=GeoJSON');\
f = open('Boundaries - Community Areas (current).geojson', 'w');\
f.write(r.text)"
mv "Boundaries - Community Areas (current).geojson" lib/tagnews/data/
wget http://nlp.stanford.edu/data/glove.6B.zip --no-check-certificate
python -c "import zipfile; myzip = zipfile.ZipFile('glove.6B.zip'); myzip.extract('glove.6B.50d.txt')"
mv glove.6B.50d.txt lib/tagnews/data/
rm glove.6B.zip
mv lib/tagnews/data/ci-data/*.csv lib/tagnews/data/
fi
before_script:
- cd lib
script:
- |
if [[ $FLAKE8 ]]; then
flake8 --ignore=E261,E226,E402,W503
else
python -m tagnews.crimetype.models.binary_stemmed_logistic.save_model
python -m tagnews.geoloc.models.lstm.save_model 2
python -m pytest --cov-report term-missing --cov=tagnews
fi