11SHELL =/bin/bash
22DATETIME: =$(shell date -u +% Y% m% dT% H% M% SZ)
33
4+ help : # preview Makefile commands
5+ @awk ' BEGIN { FS = ":.*#"; print "Usage: make <target>\n\nTargets:" } \
6+ /^[-_[ :alpha:]]+:.?* # / { printf " %-15s%s\n", $$1, $$2 }' $(MAKEFILE_LIST)
7+
48# # ---- Dependency commands ---- ##
59
6- install : # install dependencies
10+ install : # install Python dependencies
711 pipenv install --dev
812 pipenv run pre-commit install
913
10- update : install # update all Python dependencies
14+ update : install # update Python dependencies
1115 pipenv clean
1216 pipenv update --dev
1317
@@ -17,33 +21,32 @@ test: # run tests and print a coverage report
1721 pipenv run coverage run --source=my_app -m pytest -vv
1822 pipenv run coverage report -m
1923
20- coveralls : test
24+ coveralls : test # write coverage data to an LCOV report
2125 pipenv run coverage lcov -o ./coverage/lcov.info
2226
2327
2428# # ---- Code quality and safety commands ---- ##
2529
26- # linting commands
27- lint : black mypy ruff safety
30+ lint : black mypy ruff safety # run linters
2831
29- black :
32+ black : # run 'black' linter and print a preview of suggested changes
3033 pipenv run black --check --diff .
3134
32- mypy :
35+ mypy : # run 'mypy' linter
3336 pipenv run mypy .
3437
35- ruff :
38+ ruff : # run 'ruff' linter and print a preview of errors
3639 pipenv run ruff check .
3740
38- safety :
41+ safety : # check for security vulnerabilities and verify Pipfile.lock is up-to-date
3942 pipenv check
4043 pipenv verify
4144
42- # apply changes to resolve any linting errors
43- lint-apply : black-apply ruff-apply
45+ lint-apply : # apply changes with 'black' and resolve 'fixable errors' with 'ruff'
46+ black-apply ruff-apply
4447
45- black-apply :
48+ black-apply : # apply changes with 'black'
4649 pipenv run black .
4750
48- ruff-apply :
51+ ruff-apply : # resolve 'fixable errors' with 'ruff'
4952 pipenv run ruff check --fix .
0 commit comments