forked from arthurmensch/modl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·70 lines (55 loc) · 1.57 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
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:
$(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
$(PYTEST) --pyargs --cov=modl 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 http://www.mblondel.org/data/movielens100k.tar.bz2
tar xvfj movielens100k.tar.bz2
mv -f movielens100k $(DATADIR)
rm movielens100k.tar.bz2
download-movielens1m: datadir
./misc/download.sh http://www.mblondel.org/data/movielens1m.tar.bz2
tar xvfj movielens1m.tar.bz2
mv -f movielens1m $(DATADIR)
rm movielens1m.tar.bz2
download-movielens10m: datadir
./misc/download.sh http://www.mblondel.org/data/movielens10m.tar.bz2
tar xvfj movielens10m.tar.bz2
mv -f movielens10m $(DATADIR)
rm movielens10m.tar.bz2