.PHONY: format lint type_check run_unit_tests lint_and_test docker_lint_and_test

format:
	ruff check . --fix
	ruff format .
#ruff automatically targets only .py files

lint:
	ruff check .
	ruff format . --check --diff

type_check:
	poetry run mypy aws_testing_utils/ tests/

run_unit_tests:
	pytest

lint_and_test: lint type_check run_unit_tests

docker_lint_and_test:
	./lint_and_test.sh

docker_run_lint_and_test:
	@echo "Building the image for lint and unit test..."
	docker compose build lint-and-test
	@echo "Running lint and unit test in Docker..."
	docker compose up lint-and-test --exit-code-from lint-and-test
