Makefile 753 B

123456789101112131415161718192021222324252627
  1. _python_pkg = account_statement
  2. .PHONY: setup setup-dev test lint tox reformat help
  3. setup: ## Create Pipenv virtual environment and install dependencies.
  4. pipenv --three --site-packages
  5. pipenv install
  6. setup-dev: ## Install development dependencies
  7. pipenv install --dev
  8. test: ## Run unit tests
  9. pipenv run python -m unittest
  10. lint: ## Run linting
  11. pipenv run flake8 $(_python_pkg)
  12. pipenv run mypy $(_python_pkg) --ignore-missing-imports
  13. pipenv run isort -c -rc $(_python_pkg)
  14. tox: ## Run tox
  15. tox
  16. reformat: ## Reformat Python code using Black
  17. black -l 79 --skip-string-normalization $(_python_pkg)
  18. help:
  19. @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}'