forked from MITLibraries/python-cli-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (33 loc) · 905 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
SHELL=/bin/bash
DATETIME:=$(shell date -u +%Y%m%dT%H%M%SZ)
## ---- Dependency commands ---- ##
install: # install dependencies
pipenv install --dev
pipenv run pre-commit install
update: install # update all Python dependencies
pipenv clean
pipenv update --dev
## ---- Unit test commands ---- ##
test: # run tests and print a coverage report
pipenv run coverage run --source=my_app -m pytest -vv
pipenv run coverage report -m
coveralls: test
pipenv run coverage lcov -o ./coverage/lcov.info
## ---- Code quality and safety commands ---- ##
# linting commands
lint: black mypy ruff safety
black:
pipenv run black --check --diff .
mypy:
pipenv run mypy .
ruff:
pipenv run ruff check .
safety:
pipenv check
pipenv verify
# apply changes to resolve any linting errors
lint-apply: black-apply ruff-apply
black-apply:
pipenv run black .
ruff-apply:
pipenv run ruff check --fix .