forked from RedHatInsights/dvo-extractor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (32 loc) · 1.71 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
.PHONY: default style code-style before_commit
default: tests
unit_tests: ## Run all unit tests defined in this project
export PATH=tools/:$$PATH;export PYTHONDONTWRITEBYTECODE=1;pytest -v -p no:cacheprovider
coverage: ## Calculate unit test code coverage for the whole repository
export PATH=tools/:$$PATH;export PYTHONDONTWRITEBYTECODE=1;pytest -v -p no:cacheprovider --cov dvo_extractor/ --cov-fail-under=70
coverage-report: ## Generate HTML pages with unit test code coverage report
export PATH=tools/:$$PATH;export PYTHONDONTWRITEBYTECODE=1;pytest -v -p no:cacheprovider --cov dvo_extractor/ --cov-report=html
style: code-style docs-style ## Perform all style checks
code-style: ## Check code style for all Python sources from this repository
python3 tools/run_pycodestyle.py
ruff: ## Run Ruff linter
ruff .
docs-style: ## Check documentation strings in all Python sources from this repository
pydocstyle .
shellcheck: ## Run shellcheck
./shellcheck.sh
before_commit: code-style update-scenarios ruff
type-checks: ## Perform type checks for all sources
MYPYPATH=features/: mypy --explicit-package-bases dvo_extractor
strict-type-checks: ## Strict type checks for all sources
MYPYPATH=features/: mypy --strict --explicit-package-bases dvo_extractor
missing-types: ## Find all missing types in Python sources
MYPYPATH=features/: mypy --explicit-package-bases --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs dvo_extractor
help: ## Show this help screen
@echo 'Usage: make <OPTIONS> ... <TARGETS>'
@echo ''
@echo 'Available targets are:'
@echo ''
@grep -E '^[ a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-35s\033[0m %s\n", $$1, $$2}'
@echo ''