39 lines
1.0 KiB
Makefile
39 lines
1.0 KiB
Makefile
|
define unimplemented
|
||
|
@echo "ERROR: Unimplemented!" && echo -1.
|
||
|
endef
|
||
|
|
||
|
define test_mod_check
|
||
|
. ./venv/bin/activate && coverage run -m pytest
|
||
|
. ./venv/bin/activate && coverage report -m
|
||
|
. ./venv/bin/activate && coverage html
|
||
|
endef
|
||
|
|
||
|
default: ## Run app
|
||
|
. ./venv/bin/activate && python -m check
|
||
|
|
||
|
coverage: ## Generate test coverage report
|
||
|
$(call test_mod_check)
|
||
|
|
||
|
doc: ## Generates documentation
|
||
|
$(call unimplemented)
|
||
|
|
||
|
docker: ## Build Docker image from source
|
||
|
$(call unimplemented)
|
||
|
|
||
|
env: ## Install all dependencies
|
||
|
@-virtualenv venv
|
||
|
. ./venv/bin/activate && pip install -r requirements.txt
|
||
|
# . ./venv/bin/activate && ./integration/ci.sh init
|
||
|
|
||
|
freeze: ## Freeze python dependencies
|
||
|
@. ./venv/bin/activate && pip freeze > requirements.txt
|
||
|
|
||
|
help: ## Prints help for targets with comments
|
||
|
@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||
|
|
||
|
lint: ## Run linter
|
||
|
@./venv/bin/black check/
|
||
|
|
||
|
test: ## Run tests
|
||
|
. venv/bin/activate && pytest
|