blob: 1c42ac71e6bce3a7142f6f26796bd7ea7eb71cb0 (
plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
.PHONY: install run debug clean lint lint-strict
MAIN = src/main.py
VENV_DIR = .venv
PYTHON = python3
VENV_PYTHON = $(VENV_DIR)/bin/python3
VENV_PIP = $(VENV_DIR)/bin/pip
install: env
$(VENV_PYTHON) -m pip install -r requirements.txt
env:
$(PYTHON) -m venv $(VENV_DIR)
run:
@if [ ! -d "$(VENV_DIR)" ]; then \
echo "Error: Virtual environment not found. Run 'make install' first." >&2; \
exit 1; \
fi
$(VENV_PYTHON) $(MAIN) $(MAP)
debug:
$(PYTHON) -m pdb $(MAIN) $(MAP)
clean:
rm -fr $(VENV_DIR)
rm -fr .mypy_cache
rm -fr __pycache__
lint:
flake8 .
mypy . \
--warn-return-any \
--warn-unused-ignores \
--ignore-missing-imports \
--disallow-untyped-defs \
--check-untyped-defs
lint-strict:
flake8 .
mypy . --strict
tags:
ctags src/*py
|