forked from timewave-computer/auction-arbitrage-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (24 loc) · 871 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
PROTO_DIR = 'proto'
PROTO_SOURCES := $(shell find $(PROTO_DIR) -name '*.proto')
build/gen:
mkdir -p $@
.PHONY: proto
proto: build/gen $(PROTO_SOURCES)
protoc --proto_path=$(PROTO_DIR) --python_out=build/gen --mypy_out=build/gen --go-grpc_out=build/gen --mypy_grpc_out=build/gen $(PROTO_SOURCES)
.PHONY: test
test:
PYTHONPATH=src:build/gen python -m pytest tests
.PHONY: run
run:
PYTHONPATH=src:build/gen python main.py
.PHONY: lint
lint:
mypy src --install-types --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs --strict
mypy tests --install-types --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs --strict
mypy main.py --install-types --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs
ruff check src
ruff check tests
ruff check main.py
.PHONY: clean
clean:
rm -rf build/gen