Skip to content

Instantly share code, notes, and snippets.

@trickeydan
Created August 7, 2019 12:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trickeydan/0bace38b00ba8488b5aa1f178b1f3f33 to your computer and use it in GitHub Desktop.
Save trickeydan/0bace38b00ba8488b5aa1f178b1f3f33 to your computer and use it in GitHub Desktop.
Python Poetry Makefile
.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