@@ -3,27 +3,39 @@ VIRTUAL_ENVIRONMENT := $(CURDIR)/.venv
33LOCAL_PYTHON := $(VIRTUAL_ENVIRONMENT ) /bin/python3
44
55define HELP
6- Manage $(PROJECTNAME ) . Usage:
6+ Manage $(PROJECT_NAME ) . Usage:
77
88make run - Run $(PROJECT_NAME ) .
9- make install - Create virtual env, & install dependencies.
10- make update - Update pip dependencies via Poetry and output requirements.txt.
11- make format - Format code with Python's `Black` library.
12- make lint - Check code formatting with flake8.
9+ make install - Create virtual env, install dependencies, and run project.
10+ make deploy - Install and run script by running `make install` and `make run` in succession.
11+ make update - Update pip dependencies via Poetry and export output to requirements.txt.
12+ make format - Format code with Pythons `Black` library.
13+ make lint - Check code formatting with `flake8`.
1314make clean - Remove cached files and lock files.
15+
1416endef
1517export HELP
1618
17- .PHONY : run install update format lint clean help
19+
20+ .PHONY : run install deploy update format lint clean help
21+
22+ requirements : .requirements.txt
23+ env : ./.venv/bin/activate
1824
1925
20- env : .venv/bin/python3
26+ .requirements.txt : requirements.txt
27+ $(shell . .venv/bin/activate && pip install -r requirements.txt)
2128
2229
2330all help :
2431 @echo " $$ HELP"
2532
2633
34+ .PHONY : run
35+ run : env
36+ flask run
37+
38+
2739.PHONY : install
2840install :
2941 if [ ! -d " ./.venv" ]; then python3 -m venv $( VIRTUAL_ENVIRONMENT) ; fi
@@ -32,9 +44,10 @@ install:
3244 $(LOCAL_PYTHON ) -m pip install -r requirements.txt
3345
3446
35- .PHONY : run
36- run : env
37- $(shell . .venv/bin/activate && flask run)
47+ .PHONY : deploy
48+ deploy :
49+ make install
50+ make run
3851
3952
4053.PHONY : update
@@ -65,11 +78,12 @@ clean:
6578 find . -name ' *.pyc' -delete
6679 find . -name ' __pycache__' -delete
6780 find . -name ' poetry.lock' -delete
68- find . -name ' Pipefile.lock' -delete
6981 find . -name ' *.log' -delete
82+ find . -name ' .DS_Store' -delete
7083 find . -wholename ' logs/*.json' -delete
7184 find . -wholename ' .pytest_cache' -delete
7285 find . -wholename ' **/.pytest_cache' -delete
7386 find . -wholename ' ./logs/*.json' -delete
74- find . -wholename ' **/.webassets-cache/' -delete
75- find . -wholename ' ./logs' -delete
87+ find . -wholename ' ./logs' -delete
88+ find . -wholename ' *.html' -delete
89+ find . -wholename ' **/.webassets-cache' -delete
0 commit comments