forked from awesome-assistants/awesome-assistants
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (26 loc) · 819 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
#!make
# define the name of the virtual environment directory
VENV := .venv
CMD_PYTHON = ./$(VENV)/bin/python3
# default target, when make executed without arguments
all: venv run lint
$(VENV)/bin/activate: requirements.txt
python3 -m venv $(VENV)
./$(VENV)/bin/python3 -m pip install --upgrade pip
./$(VENV)/bin/pip3 install -r requirements.txt
# venv is a shortcut target
venv: $(VENV)/bin/activate
run:
$(CMD_PYTHON) main.py
test:
./$(VENV)/bin/pytest test.py
lint:
./$(VENV)/bin/black .
./$(VENV)/bin/yamllint .github/workflows/ci.yml
./$(VENV)/bin/yamllint .github/workflows/stale.yml
./$(VENV)/bin/yamllint assistants.yml -d "{extends: default, rules: {line-length: {max: 120}}}"
clean:
rm -rf $(VENV)
rm -rf .pytest_cache
find . -type f -name '*.pyc' -delete
.PHONY: all venv run lint clean