1
1
SHELL =/bin/bash
2
2
DATETIME: =$(shell date -u +% Y% m% dT% H% M% SZ)
3
3
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
+
4
8
# # ---- Dependency commands ---- ##
5
9
6
- install : # install dependencies
10
+ install : # install Python dependencies
7
11
pipenv install --dev
8
12
pipenv run pre-commit install
9
13
10
- update : install # update all Python dependencies
14
+ update : install # update Python dependencies
11
15
pipenv clean
12
16
pipenv update --dev
13
17
@@ -17,32 +21,31 @@ test: # run tests and print a coverage report
17
21
pipenv run coverage run --source=lambdas -m pytest -vv
18
22
pipenv run coverage report -m
19
23
20
- coveralls : test
24
+ coveralls : test # write coverage data to an LCOV report
21
25
pipenv run coverage lcov -o ./coverage/lcov.info
22
26
23
27
# # ---- Code quality and safety commands ---- ##
24
28
25
- # linting commands
26
- lint : black mypy ruff safety
29
+ lint : black mypy ruff safety # run linters
27
30
28
- black :
31
+ black : # run 'black' linter and print a preview of suggested changes
29
32
pipenv run black --check --diff .
30
33
31
- mypy :
34
+ mypy : # run 'mypy' linter
32
35
pipenv run mypy .
33
36
34
- ruff :
37
+ ruff : # run 'ruff' linter and print a preview of errors
35
38
pipenv run ruff check .
36
39
37
- safety :
40
+ safety : # check for security vulnerabilities and verify Pipfile.lock is up-to-date
38
41
pipenv check
39
42
pipenv verify
40
43
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
43
46
44
- black-apply :
47
+ black-apply : # apply changes with 'black'
45
48
pipenv run black .
46
49
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