forked from aio-libs/aiokafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (53 loc) · 1.9 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
# Some simple testing tasks (sorry, UNIX only).
FLAGS=
SCALA_VERSION?=2.12
KAFKA_VERSION?=2.1.0
DOCKER_IMAGE=aiolibs/kafka:$(SCALA_VERSION)_$(KAFKA_VERSION)
DIFF_BRANCH=origin/master
setup:
pip install -r requirements-dev.txt
pip install -Ue .
flake:
extra=$$(python -c "import sys;sys.stdout.write('--exclude tests/test_pep492.py') if sys.version_info[:3] < (3, 5, 0) else sys.stdout.write('')"); \
flake8 aiokafka tests $$extra
test: flake
py.test -s --show-capture=no --docker-image $(DOCKER_IMAGE) $(FLAGS) tests
vtest: flake
py.test -s -v --log-level INFO --docker-image $(DOCKER_IMAGE) $(FLAGS) tests
cov cover coverage: flake
py.test -s --cov aiokafka --cov-report html --docker-image $(DOCKER_IMAGE) $(FLAGS) tests
@echo "open file://`pwd`/htmlcov/index.html"
ci-test-unit:
py.test -s --log-level DEBUG --cov aiokafka --cov-report html $(FLAGS) tests
ci-test-all:
py.test -s --log-level DEBUG --cov aiokafka --cov-report html --docker-image $(DOCKER_IMAGE) $(FLAGS) tests
coverage.xml: .coverage
coverage xml
diff-cov: coverage.xml
git fetch
diff-cover coverage.xml --html-report diff-cover.html --compare-branch=$(DIFF_BRANCH)
check-readme:
python setup.py check -rms
clean:
rm -rf `find . -name __pycache__`
rm -f `find . -type f -name '*.py[co]' `
rm -f `find . -type f -name '*~' `
rm -f `find . -type f -name '.*~' `
rm -f `find . -type f -name '@*' `
rm -f `find . -type f -name '#*#' `
rm -f `find . -type f -name '*.orig' `
rm -f `find . -type f -name '*.rej' `
rm -f .coverage
rm -rf htmlcov
rm -rf docs/_build/
rm -rf cover
rm -rf dist
rm -f aiokafka/record/_crecords/cutil.c
rm -f aiokafka/record/_crecords/default_records.c
rm -f aiokafka/record/_crecords/legacy_records.c
rm -f aiokafka/record/_crecords/memory_records.c
rm -f aiokafka/record/_crecords/*.html
doc:
make -C docs html
@echo "open file://`pwd`/docs/_build/html/index.html"
.PHONY: all flake test vtest cov clean doc