From b4a94d84413e3786bd944b11061089ff1515c213 Mon Sep 17 00:00:00 2001 From: jrootjunior Date: Mon, 18 Nov 2019 14:57:11 +0200 Subject: [PATCH] Update Makefile and mkdocs.yml --- Makefile | 40 +++++++++++++++++++++++++++++++++------- mkdocs.yml | 2 +- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index b69aa504..fbc485fe 100644 --- a/Makefile +++ b/Makefile @@ -10,25 +10,34 @@ help: @echo " aiogram build tools " @echo "=======================================================================================" @echo "Environment:" + @echo " help: Show this message" @echo " install: Install development dependencies" + @echo " clean: Delete temporary files" @echo "" @echo "Code quality:" @echo " isort: Run isort tool" @echo " black: Run black tool" @echo " flake8: Run flake8 tool" + @echo " flake8-report: Run flake8 with HTML reporting" @echo " mypy: Run mypy tool" + @echo " mypy-report: Run mypy tool with HTML reporting" @echo " lint: Run isort, black, flake8 and mypy tools" @echo "" @echo "Tests:" @echo " test: Run tests" - @echo " build-testcov: Build coverage as HTML" + @echo " test-coverage: Run tests with HTML reporting (results + coverage)" @echo "" @echo "Documentation:" @echo " docs: Build docs" @echo " docs-serve: Serve docs for local development" + @echo " docs-prepare-reports: Move all HTML reports to docs dir" @echo "" + @echo "Project" + @echo " build: Run tests build package and docs" @echo "" + + # ================================================================================================= # Environment # ================================================================================================= @@ -65,28 +74,36 @@ black: .PHONY: flake8 flake8: + $(py) flake8 aiogram test + +.PHONY: flake8-report +flake8-report: mkdir -p reports/flake8 $(py) flake8 --format=html --htmldir=reports/flake8 aiogram test .PHONY: mypy mypy: + $(py) mypy aiogram tests + +.PHONY: mypy-report +mypy-report: $(py) mypy aiogram tests --html-report reports/typechecking .PHONY: lint lint: isort black flake8 mypy - # ================================================================================================= # Tests # ================================================================================================= .PHONY: test test: + $(py) pytest --cov=aiogram --cov-config .coveragerc + +.PHONY: test-coverage +test-coverage: mkdir -p reports/tests/ $(py) pytest --cov=aiogram --cov-config .coveragerc --html=reports/tests/index.html tests/ - -.PHONY: build-testcov -build-testcov: $(py) coverage html -d reports/coverage # ================================================================================================= @@ -103,7 +120,16 @@ docs-serve: .PHONY: docs-copy-reports docs-copy-reports: - cp -r reports site + mv reports site/ + + +# ================================================================================================= +# Project +# ================================================================================================= .PHONY: build -build: tests build-testcov flake8 mypy docs docs-copy-reports +build: clean tests test-coverage flake8-report mypy-report docs docs-copy-reports + mkdir -p site/simple + poetry build + mv dist site/simple/aiogram + diff --git a/mkdocs.yml b/mkdocs.yml index ef8ea9a2..d6639371 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,7 +1,7 @@ site_name: aiogram site_description: 'Documentations of aiogram framework' site_author: 'Alex Root Junior' -site_url: 'https://illemius.xyz' +site_url: 'https://aiogram.2038.io' repo_name: 'aiogram/aiogram' repo_url: 'https://github.com/aiogram/aiogram'