-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (35 loc) · 893 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
venv=.venv
python=$(venv)/bin/python
default: help
.PHONY: help
help:
@grep -E '^[a-zA-Z0-9 -]+:.*#' Makefile | sort | while read -r l; do printf "\033[1;32m$$(echo $$l | cut -f 1 -d':')\033[00m:$$(echo $$l | cut -f 2- -d'#')\n"; done
.PHONY: run
.SILENT: run
run: # Run the app
$(python) launcher.py
.PHONY: dev
.SILENT: dev
dev: # Run the app with coverage
$(python) -m coverage run --source=lattebot launcher.py
.PHONY: report
.SILENT: report
report: # See the coverage report
$(python) -m coverage report
.PHONY: lint
.SILENT: lint
lint: # Run the linter
mypy lattebot
ruff check lattebot
ruff format lattebot --check
.PHONY: format
.SILENT: format
format: # Format the code
ruff check lattebot --fix
ruff format lattebot
.PHONY: test
.SILENT: test
test: # Run the tests
$(python) -m pytest
# coverage run --source=lattebot -m pytest
# coverage report --show-missing