.PHONY: docker_down docker_up clean dev_env

docker_down:
	docker compose down

docker_up:
	docker compose down
	docker compose up --build -d function

env:
	python3.11 -m venv env
	env/bin/python -m pip install -U pip setuptools wheel
	env/bin/python -m pip install -I -r requirements.txt

clean:
	if [ -f report.html ]; then rm -r report.html; fi
	rm -rf env .coverage .pytest_cache .cache coverage.xml pyunit.xml
	find . | grep -E '__pycache__|\.pyc|\.pyo$\' | xargs rm -rf

dev_env: env
	if [ ! -f env/bin/py.test ]; then env/bin/python -m pip install -q -r requirements.txt -r requirements-dev.txt; fi
