-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
57 lines (46 loc) · 1009 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Variables
VENV = venv
PYTHON = $(VENV)/bin/python
PIP = $(VENV)/bin/pip
TEST_DIR = tests
# Targets
all: install test
.PHONY: venv
venv:
python3 -m venv $(VENV)
.PHONY: install
install: venv
$(PIP) install --upgrade pip
$(PIP) install -r requirements.txt
.PHONY: test
test:
python3.11 -m pip install -r ./requirements-dev.txt
pytest -v
tox run
.PHONY: lint
lint:
$(PYTHON) -m flake8 .
.PHONY: format
format:
$(PYTHON) -m black .
.PHONY: check
check:
ruff check
tox run
.PHONY: security
security:
python3.11 -m pip install safety
python3.11 -m safety check --ignore=70612
clean:
rm -rf $(VENV)
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
.PHONY: help
help:
@echo "Makefile targets:"
@echo " venv - Create a virtual environment"
@echo " install - Install dependencies"
@echo " test - Run tests"
@echo " lint - Lint the code"
@echo " format - Format the code"
@echo " clean - Clean up the environment"