forked from scikit-fingerprints/scikit-fingerprints
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (23 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
.PHONY: setup docs doctest test test-coverage help
.DEFAULT_GOAL := help
setup: ## Install development dependencies, pre-commit hooks and poetry plugin
# check if poetry is installed
poetry --version || (echo "Poetry is not installed. Please install it from https://python-poetry.org/docs/#installation" && exit 1)
poetry install --with dev,doc --sync
poetry self add poetry-plugin-export
poetry run pre-commit install
docs: ## Re-generate documentation
-rm -r docs/modules/generated
poetry run $(MAKE) -C docs clean html
doctest: docs ## Run documentation tests
poetry run $(MAKE) -C docs doctest
test: ## Run tests
poetry run black . --check --diff
poetry run isort . --check-only --profile black
poetry run pytest tests
test-coverage: ## Run tests and calculate test coverage
-mkdir .tmp_coverage_files
poetry run pytest --cov=skfp tests
-rm -rf .tmp_coverage_files
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'