-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (24 loc) · 1 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
.DEFAULT_GOAL := help
.PHONY: help
help: ## Show help for commands.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
flake: ## Run style guide checks.
flake8 .
black: ## Run code formatting.
black .
black-diff: ## Create diff of code formatting and display on stdout without modifying files.
black --check --diff .
coverage: ## Display code coverage results.
coverage xml
coverage report -m --skip-covered
isort: ## Sort import definitions.
isort -rc .
isort-diff: ## Create diff of import sorting and display on stdout without modifying files.
isort -rc . --diff --check-only
pylint: ## Check that project satifies a coding standard.
pylint music_shuffler
mypy: ## Run type checking.
find . -name '*.py' | xargs mypy --ignore-missing-imports
format: isort black ## Run code formatting and import sorting.
test: black-diff isort-diff flake mypy ## Run tests on the project.
coverage run --source=. -m pytest . -v