-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
41 lines (29 loc) · 925 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
.PHONY: all clean format format-check lint type test test-cov
CMD:=
PYMODULE:=helpdesk
MANAGEPY:=$(CMD) ./$(PYMODULE)/manage.py
APPS:=helpdesk accounts display teams tickets
SPHINX_ARGS:=docs/ docs/_build -nWE
all: type test format lint
format:
find $(PYMODULE) -name "*.html" | xargs $(CMD) djhtml
$(CMD) ruff format $(PYMODULE)
format-check:
find $(PYMODULE) -name "*.html" | xargs $(CMD) djhtml --check
$(CMD) ruff format --check $(PYMODULE)
lint:
$(CMD) ruff check $(PYMODULE)
lint-fix:
$(CMD) ruff check --fix $(PYMODULE)
check:
$(MANAGEPY) check
dev:
$(MANAGEPY) runserver
type:
cd helpdesk && mypy $(APPS)
test: | $(PYMODULE)
cd helpdesk && DJANGO_SETTINGS_MODULE=helpdesk.settings pytest --cov=. $(APPS) $(PYMODULE)
test-cov:
cd helpdesk && DJANGO_SETTINGS_MODULE=helpdesk.settings pytest --cov=. $(APPS) $(PYMODULE) --cov-report html
clean:
git clean -Xdf # Delete all files in .gitignore