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,33 +21,32 @@ test: # run tests and print a coverage report
17
21
pipenv run coverage run --source=my_app -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
24
28
# # ---- Code quality and safety commands ---- ##
25
29
26
- # linting commands
27
- lint : black mypy ruff safety
30
+ lint : black mypy ruff safety # run linters
28
31
29
- black :
32
+ black : # run 'black' linter and print a preview of suggested changes
30
33
pipenv run black --check --diff .
31
34
32
- mypy :
35
+ mypy : # run 'mypy' linter
33
36
pipenv run mypy .
34
37
35
- ruff :
38
+ ruff : # run 'ruff' linter and print a preview of errors
36
39
pipenv run ruff check .
37
40
38
- safety :
41
+ safety : # check for security vulnerabilities and verify Pipfile.lock is up-to-date
39
42
pipenv check
40
43
pipenv verify
41
44
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
44
47
45
- black-apply :
48
+ black-apply : # apply changes with 'black'
46
49
pipenv run black .
47
50
48
- ruff-apply :
51
+ ruff-apply : # resolve 'fixable errors' with 'ruff'
49
52
pipenv run ruff check --fix .
0 commit comments