Update Makefile and mkdocs.yml

This commit is contained in:
jrootjunior 2019-11-18 14:57:11 +02:00
parent fb210f3dd7
commit b4a94d8441
2 changed files with 34 additions and 8 deletions

View file

@ -10,25 +10,34 @@ help:
@echo " aiogram build tools " @echo " aiogram build tools "
@echo "=======================================================================================" @echo "======================================================================================="
@echo "Environment:" @echo "Environment:"
@echo " help: Show this message"
@echo " install: Install development dependencies" @echo " install: Install development dependencies"
@echo " clean: Delete temporary files"
@echo "" @echo ""
@echo "Code quality:" @echo "Code quality:"
@echo " isort: Run isort tool" @echo " isort: Run isort tool"
@echo " black: Run black tool" @echo " black: Run black tool"
@echo " flake8: Run flake8 tool" @echo " flake8: Run flake8 tool"
@echo " flake8-report: Run flake8 with HTML reporting"
@echo " mypy: Run mypy tool" @echo " mypy: Run mypy tool"
@echo " mypy-report: Run mypy tool with HTML reporting"
@echo " lint: Run isort, black, flake8 and mypy tools" @echo " lint: Run isort, black, flake8 and mypy tools"
@echo "" @echo ""
@echo "Tests:" @echo "Tests:"
@echo " test: Run tests" @echo " test: Run tests"
@echo " build-testcov: Build coverage as HTML" @echo " test-coverage: Run tests with HTML reporting (results + coverage)"
@echo "" @echo ""
@echo "Documentation:" @echo "Documentation:"
@echo " docs: Build docs" @echo " docs: Build docs"
@echo " docs-serve: Serve docs for local development" @echo " docs-serve: Serve docs for local development"
@echo " docs-prepare-reports: Move all HTML reports to docs dir"
@echo "" @echo ""
@echo "Project"
@echo " build: Run tests build package and docs"
@echo "" @echo ""
# ================================================================================================= # =================================================================================================
# Environment # Environment
# ================================================================================================= # =================================================================================================
@ -65,28 +74,36 @@ black:
.PHONY: flake8 .PHONY: flake8
flake8: flake8:
$(py) flake8 aiogram test
.PHONY: flake8-report
flake8-report:
mkdir -p reports/flake8 mkdir -p reports/flake8
$(py) flake8 --format=html --htmldir=reports/flake8 aiogram test $(py) flake8 --format=html --htmldir=reports/flake8 aiogram test
.PHONY: mypy .PHONY: mypy
mypy: mypy:
$(py) mypy aiogram tests
.PHONY: mypy-report
mypy-report:
$(py) mypy aiogram tests --html-report reports/typechecking $(py) mypy aiogram tests --html-report reports/typechecking
.PHONY: lint .PHONY: lint
lint: isort black flake8 mypy lint: isort black flake8 mypy
# ================================================================================================= # =================================================================================================
# Tests # Tests
# ================================================================================================= # =================================================================================================
.PHONY: test .PHONY: test
test: test:
$(py) pytest --cov=aiogram --cov-config .coveragerc
.PHONY: test-coverage
test-coverage:
mkdir -p reports/tests/ mkdir -p reports/tests/
$(py) pytest --cov=aiogram --cov-config .coveragerc --html=reports/tests/index.html 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 $(py) coverage html -d reports/coverage
# ================================================================================================= # =================================================================================================
@ -103,7 +120,16 @@ docs-serve:
.PHONY: docs-copy-reports .PHONY: docs-copy-reports
docs-copy-reports: docs-copy-reports:
cp -r reports site mv reports site/
# =================================================================================================
# Project
# =================================================================================================
.PHONY: build .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

View file

@ -1,7 +1,7 @@
site_name: aiogram site_name: aiogram
site_description: 'Documentations of aiogram framework' site_description: 'Documentations of aiogram framework'
site_author: 'Alex Root Junior' site_author: 'Alex Root Junior'
site_url: 'https://illemius.xyz' site_url: 'https://aiogram.2038.io'
repo_name: 'aiogram/aiogram' repo_name: 'aiogram/aiogram'
repo_url: 'https://github.com/aiogram/aiogram' repo_url: 'https://github.com/aiogram/aiogram'