28 lines
1.0 KiB
Makefile
28 lines
1.0 KiB
Makefile
BIN := $(CURDIR)/.venv/bin
|
||
|
||
.PHONY: help venv install lint test check golden-update
|
||
|
||
help: ## Список целей
|
||
@grep -E '^[a-z-]+:.*##' $(MAKEFILE_LIST) | sed 's/:.*##/ —/'
|
||
|
||
venv: ## Создать .venv, установить локальную библиотеку и зависимости (с dev)
|
||
uv venv --python 3.11 --allow-existing .venv
|
||
uv pip install --python "$(BIN)/python" . -r requirements-dev.txt
|
||
|
||
install: ## Установить или переустановить библиотеку из репозитория в .venv
|
||
uv venv --python 3.11 --allow-existing .venv
|
||
uv pip install --python "$(BIN)/python" --reinstall-package pylib-ai-arm-statements .
|
||
|
||
lint: ## ruff check, ruff format --check, mypy
|
||
$(BIN)/ruff check .
|
||
$(BIN)/ruff format --check .
|
||
$(BIN)/mypy pylib_ai_arm_statements
|
||
|
||
test: ## pytest
|
||
$(BIN)/pytest
|
||
|
||
check: lint test ## lint + test
|
||
|
||
golden-update: ## Обновить эталоны golden-теста (задача 20)
|
||
GOLDEN_UPDATE=1 $(BIN)/pytest tests/test_golden.py
|