@@ -19,40 +19,36 @@ export HELP
1919
2020.PHONY : run install deploy update format lint clean help
2121
22- 2322all help :
2423 @echo " $$ HELP"
2524
26- 2725env : $(VIRTUAL_ENV )
2826
29- 3027$(VIRTUAL_ENV ) :
3128 if [ ! -d $( VIRTUAL_ENV) ]; then \
3229 echo " Creating Python virtual env in \` ${VIRTUAL_ENV} \` " ; \
3330 python3 -m venv $(VIRTUAL_ENV ) ; \
3431 fi
3532
33+ .PHONY : dev
34+ dev : env
35+ $(LOCAL_PYTHON ) -m main --reload
3636
3737.PHONY : run
3838run : env
39- uwsgi --http 127.0.0.1:8081 --master --module wsgi:app --processes 4 --threads 2
40- 39+ $(LOCAL_PYTHON ) -m main
4140
4241.PHONY : install
4342install : env
4443 $(LOCAL_PYTHON ) -m pip install --upgrade pip setuptools wheel && \
45- $(LOCAL_PYTHON ) -m pip install --no-cache-dir uwsgi && \
4644 $(LOCAL_PYTHON ) -m pip install -r requirements.txt && \
4745 echo Installed dependencies in \` ${VIRTUAL_ENV} \` ;
4846
49- 5047.PHONY : deploy
5148deploy :
52- make install
49+ make install&& \
5350 make run
5451
55- 5652.PHONY : test
5753test : env
5854 $(LOCAL_PYTHON ) -m \
@@ -61,21 +57,18 @@ test: env
6157 coverage html --title=' Coverage Report' -d .reports && \
6258 open .reports/index.html
6359
64- 6560.PHONY : update
6661update : env
6762 $(LOCAL_PYTHON ) -m pip install --upgrade pip setuptools wheel && \
6863 poetry update && \
6964 poetry export -f requirements.txt --output requirements.txt --without-hashes && \
7065 echo Installed dependencies in \` ${VIRTUAL_ENV} \` ;
7166
72- 7367.PHONY : format
7468format : env
75- $(LOCAL_PYTHON ) -m isort --multi-line=3 .
69+ $(LOCAL_PYTHON ) -m isort --multi-line=3 . && \
7670 $(LOCAL_PYTHON ) -m black .
7771
78- 7972.PHONY : lint
8073lint : env
8174 $(LOCAL_PYTHON ) -m flake8 . --count \
@@ -84,22 +77,15 @@ lint: env
8477 --show-source \
8578 --statistics
8679
87- 8880.PHONY : clean
8981clean :
9082 find . -name ' poetry.lock' -delete && \
9183 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 && \
9785 find . -wholename ' **/*.pyc' -delete && \
98- find . -wholename ' *.html' -delete && \
9986 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 {} + && \
10188 find . -type d -wholename ' .pytest_cache' -exec rm -rf {} + && \
10289 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