forked from chicago-justice-project/article-tagging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (53 loc) · 1.53 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
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.13
- pip install nltk
- pip install scikit-learn==0.19.0
- pip install pandas
- pip install scipy
- pip install tensorflow>=1.4
- pip install h5py
- pip install keras
- pip install shapely
- pip install pytest
- pip install pytest-cov
- pip install requests
- |
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
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