chore(#16): skeleton репозитория — README, Makefile, линтеры, зависимости

This commit is contained in:
2026-10-21 23:28:50 +03:00
parent f7936fa882
commit 63c4fa930d
8 changed files with 240 additions and 38 deletions
+44
View File
@@ -0,0 +1,44 @@
PY ?= python3
VENV ?= .venv
BIN := $(VENV)/bin
IMAGE ?= awg-dash:dev
COMPOSE_DEV := deploy/docker-compose.dev.yml
.PHONY: help venv lint fmt test build dev-up dev-down dev-logs test-netns
help:
@grep -E '^[a-zA-Z_-]+:' $(MAKEFILE_LIST) | sed 's/:.*//' | sort -u
venv:
$(PY) -m venv $(VENV)
$(BIN)/pip install -U pip
$(BIN)/pip install -r requirements-dev.txt
lint:
$(BIN)/ruff check backend
$(BIN)/mypy backend
fmt:
$(BIN)/ruff format backend
$(BIN)/ruff check --fix backend
test:
$(BIN)/pytest
build:
@test -f deploy/Dockerfile || { echo 'deploy/Dockerfile ещё нет — задача #18'; exit 1; }
docker build -f deploy/Dockerfile -t $(IMAGE) .
dev-up:
@test -f $(COMPOSE_DEV) || { echo '$(COMPOSE_DEV) ещё нет — задача #21'; exit 1; }
docker compose -f $(COMPOSE_DEV) up -d --build
dev-down:
docker compose -f $(COMPOSE_DEV) down
dev-logs:
docker compose -f $(COMPOSE_DEV) logs -f --tail=100
test-netns:
@test -d tests/netns || { echo 'tests/netns ещё нет — задача #21'; exit 1; }
bash tests/netns/run.sh