-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (36 loc) · 1 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
clean:
@rm -f */version.txt
@rm -f .coverage
@rm -fr */__pycache__
@rm -fr __pycache__
@rm -fr build
@rm -fr dist
@rm -fr my_first_project-*.dist-info
@rm -fr my_first_project.egg-info
@rm -fr */*.pyc
all: clean install test check_code
install:
@pip install . -U
install_requirements:
@pip install -r requirements.txt
check_code:
@flake8 scripts/* my_first_project/*.py
test:
@coverage run -m unittest tests/*.py
@coverage report -m --omit=$(VIRTUAL_ENV)/lib/python*
ftest:
@Write me
uninstal:
@python setup.py install --record files.txt
@cat files.txt | xargs rm -rf
@rm -f files.txt
count_lines:
@find ./ -name '*.py' -exec wc -l {} \; | sort -n| awk \
'{printf "%4s %s\n", $$1, $$2}{s+=$$0}END{print s}'
@echo ''
@find ./scripts -name '*-*' -exec wc -l {} \; | sort -n| awk \
'{printf "%4s %s\n", $$1, $$2}{s+=$$0}END{print s}'
@echo ''
@find ./tests -name '*.py' -exec wc -l {} \; | sort -n| awk \
'{printf "%4s %s\n", $$1, $$2}{s+=$$0}END{print s}'
@echo ''