aiogram/Makefile

54 lines
1.2 KiB
Makefile
Raw Normal View History

2019-11-15 12:17:57 +02:00
.DEFAULT_GOAL := help
python := python3.7
.PHONY: help
help:
@echo "======================================================================================="
@echo " aiogram build tools "
@echo "======================================================================================="
2019-11-15 12:44:24 +02:00
@echo "Environment:"
2019-11-15 12:17:57 +02:00
@echo " install: Install development dependencies"
2019-11-15 12:44:24 +02:00
@echo ""
@echo "Code quality:"
2019-11-15 12:17:57 +02:00
@echo " isort: Run isort tool"
@echo " black: Run black tool"
@echo " flake8: Run flake8 tool"
@echo " mypy: Run mypy tool"
@echo " lint: Run isort, black, flake8 and mypy tools"
@echo ""
2019-11-15 12:44:24 +02:00
@echo "Tests:"
@echo " test: Run tests"
@echo ""
@echo ""
2019-11-15 12:17:57 +02:00
@echo ""
.PHONY: install
install:
$(python) -m pip install --user -U poetry
poetry install
2017-10-22 18:36:13 +03:00
2019-11-15 12:17:57 +02:00
.PHONY: isort
isort:
poetry run isort -rc aiogram tests
2017-11-15 18:51:29 +02:00
2019-11-15 12:17:57 +02:00
.PHONY: black
black:
poetry run black aiogram tests
2017-12-01 01:59:15 +02:00
2019-11-15 12:17:57 +02:00
.PHONY: flake8
flake8:
poetry run flake8 aiogram tests
2017-12-01 02:14:49 +02:00
2019-11-15 12:17:57 +02:00
.PHONY: mypy
mypy:
poetry run mypy aiogram tests
2017-12-01 02:28:25 +02:00
2019-11-15 12:17:57 +02:00
.PHONY: lint
lint: isort black flake8 mypy
2019-11-15 12:44:24 +02:00
.PHONY: test
test:
poetry run pytest --cov=aiogram --cov-config .coveragerc tests/ -sq