@@ -19,40 +19,36 @@ export HELP
19
19
20
20
.PHONY : run install deploy update format lint clean help
21
21
22
-
23
22
all help :
24
23
@echo " $$ HELP"
25
24
26
-
27
25
env : $(VIRTUAL_ENV )
28
26
29
-
30
27
$(VIRTUAL_ENV ) :
31
28
if [ ! -d $( VIRTUAL_ENV) ]; then \
32
29
echo " Creating Python virtual env in \` ${VIRTUAL_ENV} \` " ; \
33
30
python3 -m venv $(VIRTUAL_ENV ) ; \
34
31
fi
35
32
33
+ .PHONY : dev
34
+ dev : env
35
+ $(LOCAL_PYTHON ) -m main --reload
36
36
37
37
.PHONY : run
38
38
run : env
39
- uwsgi --http 127.0.0.1:8081 --master --module wsgi:app --processes 4 --threads 2
40
-
39
+ $(LOCAL_PYTHON ) -m main
41
40
42
41
.PHONY : install
43
42
install : env
44
43
$(LOCAL_PYTHON ) -m pip install --upgrade pip setuptools wheel && \
45
- $(LOCAL_PYTHON ) -m pip install --no-cache-dir uwsgi && \
46
44
$(LOCAL_PYTHON ) -m pip install -r requirements.txt && \
47
45
echo Installed dependencies in \` ${VIRTUAL_ENV} \` ;
48
46
49
-
50
47
.PHONY : deploy
51
48
deploy :
52
- make install
49
+ make install && \
53
50
make run
54
51
55
-
56
52
.PHONY : test
57
53
test : env
58
54
$(LOCAL_PYTHON ) -m \
@@ -61,21 +57,18 @@ test: env
61
57
coverage html --title=' Coverage Report' -d .reports && \
62
58
open .reports/index.html
63
59
64
-
65
60
.PHONY : update
66
61
update : env
67
62
$(LOCAL_PYTHON ) -m pip install --upgrade pip setuptools wheel && \
68
63
poetry update && \
69
64
poetry export -f requirements.txt --output requirements.txt --without-hashes && \
70
65
echo Installed dependencies in \` ${VIRTUAL_ENV} \` ;
71
66
72
-
73
67
.PHONY : format
74
68
format : env
75
- $(LOCAL_PYTHON ) -m isort --multi-line=3 .
69
+ $(LOCAL_PYTHON ) -m isort --multi-line=3 . && \
76
70
$(LOCAL_PYTHON ) -m black .
77
71
78
-
79
72
.PHONY : lint
80
73
lint : env
81
74
$(LOCAL_PYTHON ) -m flake8 . --count \
@@ -84,22 +77,15 @@ lint: env
84
77
--show-source \
85
78
--statistics
86
79
87
-
88
80
.PHONY : clean
89
81
clean :
90
82
find . -name ' poetry.lock' -delete && \
91
83
find . -name ' .coverage' -delete && \
92
- find . -name ' *.pyc' -delete \
93
- find . -name ' __pycache__' -delete \
94
- find . -name ' poetry.lock' -delete \
95
- find . -name ' *.log' -delete \
96
- find . -name ' .DS_Store' -delete \
84
+ find . -name ' .Pipfile.lock' -delete && \
97
85
find . -wholename ' **/*.pyc' -delete && \
98
- find . -wholename ' *.html' -delete && \
99
86
find . -type d -wholename ' __pycache__' -exec rm -rf {} + && \
100
- find . -type d -wholename ' .venv' -exec rm -rf {} + && \
87
+ find . -type d -wholename ' ./. venv' -exec rm -rf {} + && \
101
88
find . -type d -wholename ' .pytest_cache' -exec rm -rf {} + && \
102
89
find . -type d -wholename ' **/.pytest_cache' -exec rm -rf {} + && \
103
- find . -type d -wholename ' ./logs/*' -exec rm -rf {} + && \
104
- find . -type d -wholename ' ./.reports/*' -exec rm -rf {} + && \
105
- find . -type d -wholename ' **/.webassets-cache' -exec rm -rf {} +
90
+ find . -type d -wholename ' ./logs/*.log' -exec rm -rf {} + && \
91
+ find . -type d -wholename ' ./.reports/*' -exec rm -rf {} +
0 commit comments