mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Update Makefile and mkdocs.yml
This commit is contained in:
parent
fb210f3dd7
commit
b4a94d8441
2 changed files with 34 additions and 8 deletions
40
Makefile
40
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue