34 lines
936 B
Makefile
34 lines
936 B
Makefile
PIP := pip
|
|
POETRY := poetry
|
|
PYTHON := python
|
|
RUFF := ruff
|
|
MYPY := mypy
|
|
|
|
.PHONY: setup-pip setup-poetry setup-full full-lint
|
|
|
|
# Установить через pip
|
|
setup-pip:
|
|
@echo "Installing Python tools via pip..."
|
|
$(PIP) install --upgrade pip
|
|
$(PIP) install mypy ruff cv --upgrade
|
|
|
|
# Установить через poetry
|
|
setup-poetry:
|
|
@echo "Installing Python tools via poetry..."
|
|
$(POETRY) install
|
|
$(POETRY) add --group dev mypy ruff cv
|
|
|
|
# Установить pip, poetry и все зависимости
|
|
setup-full:
|
|
@echo "Installing pip, poetry and Python tools..."
|
|
$(PIP) install --upgrade pip
|
|
$(PIP) install poetry mypy ruff cv --upgrade
|
|
$(POETRY) install
|
|
|
|
# Провести все проверки по коду
|
|
full-lint:
|
|
@echo "Running ruff check and fix..."
|
|
$(RUFF) check . --fix
|
|
@echo "Running mypy..."
|
|
$(POETRY) run $(MYPY) . --config-file ./pyproject.toml --no-incremental
|
|
@echo "All checks completed!"
|