@@ -4,25 +4,10 @@ SHELL = /usr/bin/env bash
44.PHONY : help
55.PHONY : clean clean-build clean-pyc clean-test
66.PHONY : lint test test-all test-coverage test-coverage-report-console test-coverage-report-html
7- .PHONY : dist install
8-
9- define PRINT_HELP_PYSCRIPT
10- import re, sys
11-
12- for line in sys.stdin:
13- match = re.match(r'^([a-zA-Z_-]+):.*?# # (.*)$$', line)
14- if match:
15- target, help = match.groups()
16- print("%-20s %s" % (target, help))
17- endef
18- export PRINT_HELP_PYSCRIPT
19-
7+ .PHONY : dist upload-release
208
219help :
22- @echo " Read README.md"
23- @echo " "
24- @echo " Makefile tasks:"
25- @python -c " $$ PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST )
10+ @grep ' ^[a-zA-Z]' $(MAKEFILE_LIST ) | sort | awk -F ' :.*?## ' ' NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
2611
2712clean : clean-build clean-pyc clean-test # # remove all build, test, lint, coverage and Python artifacts
2813
@@ -51,25 +36,26 @@ lint: ## run tools for code style analysis, static type check, etc
5136 flake8 --config=setup.cfg fd_gcp tests
5237 mypy --config-file setup.cfg fd_gcp
5338
54- test : # # run tests
39+ test : # # run tests quickly with the default Python
5540 python setup.py test
5641
5742test-all : # # run tests on every Python version with tox
58- @echo " TODO: configure tox"
43+ tox
5944
6045test-coverage : # # run tests and record test coverage
61- coverage run setup.py test
46+ coverage run --rcfile=setup.cfg setup.py test
6247
6348test-coverage-report-console : # # print test coverage summary
64- coverage report -m
49+ coverage report --rcfile=setup.cfg - m
6550
6651test-coverage-report-html : # # generate test coverage HTML report
67- coverage html
52+ coverage html --rcfile=setup.cfg
6853
6954dist : clean # # builds source and wheel package
7055 python setup.py sdist
7156 python setup.py bdist_wheel
57+ twine check dist/*
7258 ls -l dist
7359
74- install : clean # # install the package to the active Python's site- packages
75- python setup.py install
60+ upload-release : # # upload dist packages
61+ python -m twine upload ' dist/* '
0 commit comments