env:
	python3.11 -m venv env

pip_dev:
	env/bin/pip3.11 install --upgrade pip
	env/bin/pip3.11 install -r requirements.txt
	env/bin/pip3.11 install -r requirements-test.txt

## test - run unit tests and create report
.PHONY: test
test:
	py.test tests/ \
		--cov activity_detector/ \
		--cov-report xml:coverage.xml \
		--junitxml=pyunit.xml

## test_filename - test filename
.PHONY: test_filename
test_filename:
	py.test $$(find tests -name '*$(NAME)*' -type f -not -path "*__pycache__*")

## lint - check codestyle
.PHONY: lint
lint:
	flake8 activity_detector/ tests/

## check - run check suite
.PHONY: check
check: lint test

## clean_env - remove virtual environment
.PHONY: clean_env
clean_env:
	rm -rf env
