first pass

This commit is contained in:
Abel Luck 2023-11-05 20:16:47 +01:00
parent 4691310e22
commit 5150e8ddd4
11 changed files with 2484 additions and 0 deletions

38
Makefile Normal file
View file

@ -0,0 +1,38 @@
POETRY ?= poetry run
SRC := tailscalesd
TESTS := tests
SHELL := $(shell which bash)
APP_VERSION := $(shell git rev-parse --short HEAD)
docker-build:
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile \
--build-arg=$(APP_VERSION) \
-t tailscalesd:latest \
.
freeze:
poetry export --format=requirements.txt > requirements.frozen.txt
fmt:
$(POETRY) black $(SRC)
$(POETRY) black $(TESTS)
$(POETRY) isort --profile black $(SRC)
$(POETRY) isort --profile black $(TESTS)
check:
$(MAKE) fmt
$(MAKE) lint
$(MAKE) types
$(MAKE) bandit
lint:
$(POETRY) flake8 $(SRC)
bandit:
$(POETRY) bandit -r $(SRC)
types:
$(POETRY) mypy $(SRC)
test:
$(POETRY) pytest $(TESTS)