-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (23 loc) · 825 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
clean: # Remove development artifacts
@printf "Deleting Python artifacts...\n"
@find . -type d -name "__pycache__" -exec rm -rf {} +
@find . -type d -name ".pytest_cache" -exec rm -rf {} +
@find . -name '*~' -exec rm -f {} +
@find . -name '*.pyc' -exec rm -f {} +
@find . -name '*.pyo' -exec rm -f {} +
@rm -rf dist .coverage htmlcov
lint: # Lint code
@isort --check .
@black --check .
@flake8
fix: # Fix linting
@isort .
@black .
test: # Run test suite and save coverage data
@coverage run
coverage: test # Run coverage report
@coverage report
covhtml: test # Run coverage and open HTML report
@coverage html --fail-under=0
@if command -v xdg-open > /dev/null; then xdg-open htmlcov/index.html; exit 1; fi # Linux
@if command -v open > /dev/null; then open htmlcov/index.html; exit 1; fi # MacOS