Created
August 7, 2019 12:33
-
-
Save trickeydan/0bace38b00ba8488b5aa1f178b1f3f33 to your computer and use it in GitHub Desktop.
Python Poetry Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: all clean lint type test test-cov | |
CMD:=poetry run | |
PYMODULE:=j5 | |
TESTS:=tests | |
EXTRACODE:=tests_hw | |
all: type test lint | |
lint: | |
$(CMD) flake8 $(PYMODULE) $(TESTS) $(EXTRACODE) | |
type: | |
$(CMD) mypy $(PYMODULE) $(TESTS) $(EXTRACODE) | |
test: | |
$(CMD) pytest --cov=$(PYMODULE) $(TESTS) | |
test-cov: | |
$(CMD) pytest --cov=$(PYMODULE) $(TESTS) --cov-report html | |
isort: | |
$(CMD) isort --recursive $(PYMODULE) $(TESTS) $(EXTRACODE) | |
clean: | |
git clean -Xdf # Delete all files in .gitignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment