-
Notifications
You must be signed in to change notification settings - Fork 48
/
Makefile
executable file
·71 lines (56 loc) · 1.52 KB
/
Makefile
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
PYTHON ?= python
PYTEST ?= py.test --pyargs
DATADIR=$(HOME)/modl_data
# Compilation...
in: inplace
inplace:
$(PYTHON) setup.py build_ext -i
install:
$(PYTHON) setup.py install
clean:
rm -f `find modl -name "*.so"`
rm -f `find modl -name "*.pyx" | sed s/.pyx/.html/g`
rm -f `find modl -name "*.pyx" | sed s/.pyx/.c/g`
rm -f `find modl -name "*.pyx" | sed s/.pyx/.cpp/g`
rm -rf htmlcov
rm -rf build
rm -rf coverage .coverage
rm -rf .cache
rm -rf modl.egg-info
rm -rf dist
# Tests
#
test:
cd /tmp
$(PYTEST) modl
test-coverage:
rm -rf coverage .coverage
rm -rf dist
rm -f `find modl -name "*.so"`
$(PYTHON) setup.py build_ext -i -D CYTHON_TRACE -D CYTHON_TRACE_NOGIL
py.test modl --cov=modl --cov-config=.coveragerc
# Data
#
datadir:
mkdir -p $(DATADIR)
download-images: datadir
./misc/download.sh http://www.amensch.fr/data/images.tar.bz2
tar xvfj images.tar.bz2
mv -f images $(DATADIR)
rm images.tar.bz2
download-movielens: datadir download-movielens100k download-movielens1m download-movielens10m
download-movielens100k: datadir
./misc/download.sh https://www.amensch.fr/data/movielens100k.zip
unzip movielens100k.zip
mv -f movielens100k $(DATADIR)
rm movielens100k.zip
download-movielens1m: datadir
./misc/download.sh https://www.amensch.fr/data/movielens1m.zip
unzip movielens1m.zip
mv -f movielens1m $(DATADIR)
rm movielens1m.zip
download-movielens10m: datadir
./misc/download.sh https://www.amensch.fr/data/movielens10m.zip
unzip movielens10m.zip
mv -f movielens10m $(DATADIR)
rm movielens10m.zip