-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (34 loc) · 1.01 KB
/
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
help: ## Print this message
@awk 'BEGIN { FS = ":.*##"; print "Usage: make <target>\n\nTargets:" } \
/^[-_[:alpha:]]+:.?*##/ { printf " %-15s%s\n", $$1, $$2 }' $(MAKEFILE_LIST)
### Dependency commands ###
install: ## install Python dependencies and pre-commit hook
pipenv install --dev
pipenv run pre-commit install
update: install ## Update all Python dependencies
pipenv clean
pipenv update --dev
### Test commands ###
test: ## Run tests and print a coverage report
pipenv run coverage run --source=top_containers -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 .