forked from phelipetls/reportforce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (32 loc) · 887 Bytes
/
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
SHELL=/bin/bash
PACKAGE = reportforce
TEST_DIR = tests
test:
python3 -m unittest discover -vfs $(TEST_DIR)
publish:
python3 setup.py sdist bdist_wheel
twine upload --skip-existing dist/*
rm -rf build dist .egg $(PACKAGE).egg-info
publish-test:
python3 setup.py sdist bdist_wheel
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
rm -rf build dist .egg $(PACKAGE).egg-info
lint:
flake8 $(PACKAGE)
COVERAGE = coverage run --source $(PACKAGE)/ -m unittest discover -s $(TEST_DIR)
cov:
$(COVERAGE)
coverage report
coverage erase
htmlcov:
$(COVERAGE)
coverage html
coverage erase
firefox htmlcov/index.html
fix:
nvim -q <(flake8 --exclude=venv* .)
PROFILE_SCRIPT = profiler.py
PROFILE_OUTPUT = profile.txt
profile:
python3 -m cProfile -o $(PROFILE_OUTPUT) -s cumtime $(PROFILE_SCRIPT)
.PHONY: test publish lint cov fix htmlcov profile