This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
78 lines (62 loc) · 3.14 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
72
73
74
75
76
77
78
CDIR := $(shell pwd)
export CDIR
.PHONY: test clean
.install-test-deps: requirements-test.txt
pip install -U -r requirements-test.txt
touch .install-test-deps
flake8: .install-test-deps
flake8 datarobot_batch_scoring tests
.install: $(shell find datarobot_batch_scoring -type f)
pip install -e .
touch .install
checkrst:
# Helps to find RST syntax errors, ensures that PyPI renders project
# page properly.
python setup.py check --restructuredtext
test: clean .install .install-test-deps flake8
# test that we can make the HTML for pypi. 1(info) might be too strict
rst2html.py --report=1 --exit-status=1 README.rst > /dev/null
py.test -v tests/
cov cover coverage: .install .install-test-deps flake8
py.test -v --cov=datarobot_batch_scoring \
--cov-report=term --cov-report=html tests/
@echo "open file://`pwd`/htmlcov/index.html"
coverage-map: .install .install-test-deps
coverage report -m
pyinstaller: clean
# On Linux use "make pyinstaller_dockerized"
./offline_install_scripts/build_pyinstaller.sh
.install-docker-compose: clean
pip install -r requirements-docker-compose.txt -q
pyinstaller_dockerized: .install-docker-compose
docker-compose run --rm centos5pyinstaller \
/batch-scoring/offline_install_scripts/build_pyinstaller_dockerized.sh
offlinebundle:
# On Linux use "make offlinebundle_dockerized"
./offline_install_scripts/build_offlinebundle.sh
offlinebundle_dockerized:
docker run -i --rm -v ${CDIR}:/batch-scoring python:3.5 \
/batch-scoring/offline_install_scripts/build_offlinebundle_dockerized.sh
build_release_dockerized: clean pyinstaller_dockerized offlinebundle_dockerized
test_offlinebundle_dockerized:
docker run -i --net=none --rm -v ${CDIR}:/batch-scoring centos:7 /batch-scoring/offline_install_scripts/test_offlinebundle_dockerized.sh
test_pyinstaller_dockerized:
docker run -i --net=none --rm -v ${CDIR}:/batch-scoring centos:7 /batch-scoring/offline_install_scripts/test_pyinstaller_dockerized.sh
docker run -i --net=none --rm -v ${CDIR}:/batch-scoring centos:5 /batch-scoring/offline_install_scripts/test_pyinstaller_dockerized.sh
docker run -i --net=none --rm -v ${CDIR}:/batch-scoring centos:7 /batch-scoring/offline_install_scripts/test_pyinstaller_dockerized.sh
docker run -i --net=none --rm -v ${CDIR}:/batch-scoring ubuntu:12.04 /batch-scoring/offline_install_scripts/test_pyinstaller_dockerized.sh
docker run -i --net=none --rm -v ${CDIR}:/batch-scoring ubuntu:16.04 /batch-scoring/offline_install_scripts/test_pyinstaller_dockerized.sh
docker run -i --net=none --rm -v ${CDIR}:/batch-scoring pritunl/archlinux:latest /batch-scoring/offline_install_scripts/test_pyinstaller_dockerized.sh
docker run -i --net=none --rm -v ${CDIR}:/batch-scoring gentoo/stage3-amd64 /batch-scoring/offline_install_scripts/test_pyinstaller_dockerized.sh
clean:
@rm -rf .install
@rm -rf .install-test-deps
@rm -rf .build_release_dockerized
@rm -rf .install-docker-compose
@rm -rf datarobot_batch_scoring.egg-info build/* dist/*
@rm -rf htmlcov
@rm -rf .coverage
@rm -rf .cache
@rm -f batch_scoring.spec batch_scoring_sse.spec batch_scoring_deployment_aware.spec
@rm -f *.shelve.*
@find . -name __pycache__ | xargs rm -rf