32 lines
831 B
Makefile
Executable File
32 lines
831 B
Makefile
Executable File
#!/usr/bin/make -f
|
|
include Makefile.msg
|
|
|
|
help:
|
|
$(call amsg,Available targets are:)
|
|
$(call amsg,)
|
|
$(call amsg,- install)
|
|
$(call amsg,- lint)
|
|
$(call amsg,- test)
|
|
|
|
install:
|
|
$(call bmsg,Installing poetry and dependencies.)
|
|
$(call qcmd,pip install -U poetry)
|
|
$(call qcmd,poetry install)
|
|
$(call qcmd,poetry run pre-commit install)
|
|
|
|
lint:
|
|
$(call bcmd,pre-commit,run,-poetry run pre-commit run --all-files)
|
|
|
|
test:
|
|
$(call qcmd,rm -rf htmlcov)
|
|
$(call bcmd,pytest,--cov, \
|
|
poetry run pytest --cov-report html $(O) $(SPECIFIC_TESTS))
|
|
$(call bmsg,HTML coverage is available under the following directory:)
|
|
$(call bmsg,file://$(realpath .)/htmlcov/index.html)
|
|
|
|
clean:
|
|
$(call rmsg,Cleaning build and cache directories.)
|
|
$(call qcmd,rm -rf build .coverage htmlcov .mypy_cache .pytest_cache)
|
|
|
|
.PHONY: help install lint test clean
|