-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·34 lines (26 loc) · 933 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
31
32
33
34
VENV = .venv
PIP = $(VENV)/bin/pip
PROJ = src
.PHONY: help clean ftm lint-flake8 lint-mypy
help:
@echo "Usage:"
@echo " make setup => create virtual environment and install dependencies"
@echo " make clean => remove .venv, __pycache__, .mypy_cache"
@echo " make run => run the program"
@echo " make fmt => format the project with black"
@echo " make lint-flake8 => lint the project with flake8"
@echo " make lint-mypy => lint the project with mypy"
setup: requirements.txt
python3 -m venv $(VENV)
$(PIP) install -r requirements.txt
clean:
rm -rf $(VENV)
rm -rf `find . -type d -name __pycache__ -or -name .mypy_cache`
run:
python3 src/main.py
fmt:
black --target-version py310 $(PROJ)
lint-flake8:
flake8 --max-line-length=88 $(PROJ)
lint-mypy:
mypy --follow-imports=silent --ignore-missing-imports --show-column-numbers --no-pretty --strict $(PROJ)