.DEFAULT_GOAL := help


## help - this message
.PHONY: help
help: Makefile
	@echo "Run command:\n  make <target>\n"
	@echo $(MAKEFILE_LIST)
	@grep -E -h '^## .*' $(MAKEFILE_LIST) | sed -n 's/^## //p'


## test - run unit tests and create report
.PHONY: test
test:
	@echo "Running unit tests"
	pytest tests/unit \
		--cov src/ \
		--cov-report=term-missing

## fix_style - fix codestyle
.PHONY: fix_style
fix_style:
	@echo "Fixing codestyle"
	ruff format
	ruff check --fix

## check_style - check codestyle
.PHONY: check_style
check_style:
	@echo "Checking codestyle"
	ruff format --check
	ruff check

## check_types - check static typing
.PHONY: check_types
check_types:
	@echo "Checking static typing"
	mypy

## run_check_suite - run full check suite with style check and tests
.PHONY: run_check_suite
run_check_suite: check_style check_types test
