-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (35 loc) · 1.02 KB
/
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
.PHONY: all run clean
# Simple makefile to help with repetitive Python tasks
# Targets are:
# - venv : build a venv in ./.venv
# - test : run the unit test suite
# - coverage : run the unit tests and generate a minimal coverage report
# - htmlcov : run the unit tests and generate a full report in htmlcov/
VENV = .venv
PYTHON = $(VENV)/bin/python3
PIP = $(VENV)/bin/pip
all: venv
run: venv
$(PYTHON) -m netbot.netbot debug sync-off
venv: $(VENV)/bin/activate
$(VENV)/bin/activate: requirements.txt
python3.11 -m venv $(VENV)
$(PIP) install --upgrade pip
$(PIP) install -r requirements.txt
test: $(VENV)/bin/activate
$(PYTHON) -m tests
coverage: $(VENV)/bin/activate
$(PYTHON) -m coverage run -m tests
$(PYTHON) -m coverage report
htmlcov: $(VENV)/bin/activate
$(PYTHON) -m coverage run -m tests
$(PYTHON) -m coverage html
lint: $(VENV)/bin/activate
$(PYTHON) -m pylint */*.py
clean:
rm -rf __pycache__
rm -rf $(VENV)
rm -rf htmlcov
rm -f discord.log
rm -f dpytest_*.dat
find . -type f -name ‘*.pyc’ -delete