-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
72 lines (58 loc) · 1.05 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.PHONY: all
all: lint/ruff lint
help:
@adt help-make
#
# Lint
#
.PHONY: lint/ruff lint udit
##
lint/ruff:
ruff check src
## Lint source code and check typing
lint:
ruff check src
# flake8 src
# lint-imports
# deptry src
vulture --min-confidence 80 src
mypy --show-error-codes src
pyright src
## Run security audit
audit:
pip-audit
safety check
#
# Rest
#
.PHONY: develop run run-gunicorn clean tidy format cleanup-code
## Setup the development environment
develop:
poetry install
flask vite install
## Run (dev) server
run:
honcho -f Procfile.dev start
## Run server under gunicorn
run-gunicorn:
gunicorn -b 127.0.0.1:5000 -w1 'app:app'
## Cleanup repository
clean:
adt clean
rm -rf .mypy_cache .pytest_cache .ruff_cache .import_linter_cache .hypothesis
rm -f log/*
rm -f geckodriver.log
rm -rf .grimp_cache
find . -name __pycache__ -print0 | xargs -0 rm -rf
rm -rf .tox .nox
## Cleanup harder
tidy: clean
rm -rf vite/dist
rm -rf vite/node_modules
## Format source code
format:
black src
isort src
.PHONY: build
build:
flask vite build