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,32 +21,31 @@ test: # run tests and print a coverage report
1721 pipenv run coverage run --source=lambdas -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# # ---- Code quality and safety commands ---- ##
2428
25- # linting commands
26- lint : black mypy ruff safety
29+ lint : black mypy ruff safety # run linters
2730
28- black :
31+ black : # run 'black' linter and print a preview of suggested changes
2932 pipenv run black --check --diff .
3033
31- mypy :
34+ mypy : # run 'mypy' linter
3235 pipenv run mypy .
3336
34- ruff :
37+ ruff : # run 'ruff' linter and print a preview of errors
3538 pipenv run ruff check .
3639
37- safety :
40+ safety : # check for security vulnerabilities and verify Pipfile.lock is up-to-date
3841 pipenv check
3942 pipenv verify
4043
41- # apply changes to resolve any linting errors
42- lint-apply : black-apply ruff-apply
44+ lint-apply : # apply changes with 'black' and resolve 'fixable errors' with 'ruff'
45+ black-apply ruff-apply
4346
44- black-apply :
47+ black-apply : # apply changes with 'black'
4548 pipenv run black .
4649
47- ruff-apply :
48- pipenv run ruff check --fix .
50+ ruff-apply : # resolve 'fixable errors' with 'ruff'
51+ pipenv run ruff check --fix .
0 commit comments