-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
67 lines (52 loc) · 1.48 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
# ----------------------------------
# INSTALL & TEST
# ----------------------------------
install_requirements:
@pip install -r requirements.txt
check_code:
@flake8 scripts/* 5-star/*.py
black:
@black scripts/* 5-star/*.py
test:
@coverage run -m pytest tests/*.py
@coverage report -m --omit=$(VIRTUAL_ENV)/lib/python*
ftest:
@Write me
clean:
@rm -f */version.txt
@rm -f .coverage
@rm -fr */__pycache__ */*.pyc __pycache__
@rm -fr build dist
@rm -fr 5-star-*.dist-info
@rm -fr 5-star.egg-info
install:
@pip install . -U
all: clean install test black check_code
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 ''
# ----------------------------------
# UPLOAD PACKAGE TO PYPI
# ----------------------------------
build:
@python setup.py sdist bdist_wheel
pypi_test:
@twine upload -r testpypi dist/* -u lologibus2
pypi:
@twine upload dist/* -u lologibus2
# ----------------------------------
# RUN STREAMLIT
# ----------------------------------
run_streamlit:
streamlit run fivestar/five_star.py