Skip to content

Instantly share code, notes, and snippets.

@jstutters
Last active October 3, 2021 07:53
Show Gist options
  • Save jstutters/06491fac12d1e726b3cc5869b673e7ee to your computer and use it in GitHub Desktop.
Save jstutters/06491fac12d1e726b3cc5869b673e7ee to your computer and use it in GitHub Desktop.
Makefile for testing and linting python projects
PROJECT:= name
.PHONY: check test codestyle docstyle lint pip
check: test codestyle docstyle lint
test:
py.test --cov=$(PROJECT) tests
codestyle:
pycodestyle $(PROJECT)
docstyle:
pydocstyle $(PROJECT)
lint:
pylint $(PROJECT)
pip: requirements.txt dev-requirements.txt
pip-sync requirements.txt dev-requirements.txt
requirements.txt: requirements.in
pip-compile requirements.in
dev-requirements.txt: dev-requirements.in requirements.txt
pip-compile dev-requirements.in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment