28 lines
1016 B
Makefile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 arm_statements
test: ## pytest
$(BIN)/pytest
check: lint test ## lint + test
golden-update: ## Обновить эталоны golden-теста (задача 20)
GOLDEN_UPDATE=1 $(BIN)/pytest tests/test_golden.py