From e4198fb1f2130122af879306b9151aded2be1182 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Tue, 26 May 2020 22:13:01 +0300 Subject: [PATCH] Revert .PHONY in Makefile --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Makefile b/Makefile index cf2e405c..a2902fb2 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ python := $(py) python reports_dir := reports +.PHONY: help help: @echo "=======================================================================================" @echo " aiogram build tools " @@ -44,10 +45,12 @@ help: # Environment # ================================================================================================= +.PHONY: install install: $(base_python) -m pip install --user -U poetry poetry install +.PHONY: clean clean: rm -rf `find . -name __pycache__` rm -f `find . -type f -name '*.py[co]' ` @@ -65,9 +68,11 @@ clean: # Code quality # ================================================================================================= +.PHONY: isort isort: $(py) isort -rc aiogram tests +.PHONY: black black: $(py) black aiogram tests @@ -78,29 +83,36 @@ flake8-report: mkdir -p $(reports_dir)/flake8 $(py) flake8 --format=html --htmldir=$(reports_dir)/flake8 aiogram test +.PHONY: mypy mypy: $(py) mypy aiogram +.PHONY: mypy-report mypy-report: $(py) mypy aiogram --html-report $(reports_dir)/typechecking +.PHONY: lint lint: isort black flake8 mypy # ================================================================================================= # Tests # ================================================================================================= +.PHONY: test test: $(py) pytest --cov=aiogram --cov-config .coveragerc tests/ +.PHONY: test-coverage test-coverage: mkdir -p $(reports_dir)/tests/ $(py) pytest --cov=aiogram --cov-config .coveragerc --html=$(reports_dir)/tests/index.html tests/ +.PHONY: test-coverage-report test-coverage-report: $(py) coverage html -d $(reports_dir)/coverage +.PHONY: test-coverage-view test-coverage-view: $(py) coverage html -d $(reports_dir)/coverage python -c "import webbrowser; webbrowser.open('file://$(shell pwd)/reports/coverage/index.html')" @@ -109,12 +121,15 @@ test-coverage-view: # Docs # ================================================================================================= +.PHONY: docs docs: $(py) mkdocs build +.PHONY: docs-serve docs-serve: $(py) mkdocs serve +.PHONY: docs-copy-reports docs-copy-reports: mv $(reports_dir)/* site/reports @@ -122,6 +137,7 @@ docs-copy-reports: # Project # ================================================================================================= +.PHONY: build build: clean flake8-report mypy-report test-coverage docs docs-copy-reports mkdir -p site/simple poetry build