.PHONY: all format lint test tests test_watch integration_tests docker_tests help extended_tests

# Default target executed when no arguments are given to make.
all: help

# Define a variable for the test file path.
TEST_FILE ?= tests/unit/

test:
	uv run --group tests pytest $(TEST_FILE)

tests:
	uv run --group tests pytest $(TEST_FILE)

test_watch:
	uv run --group tests ptw --ignore ./tests/integration . -- ./tests/unit

extended_tests:
	uv run --group tests pytest --only-extended ./tests/unit

integration_tests:
	uv run --group tests pytest tests/integration


# Linting & Formatting

install:
	uv sync --group dev --group quality --group tests
	uv run --group dev pre-commit install

check:
	uv run --group dev pre-commit run --all-files


# Documentation

html:
	make.bat html

help:
	@echo '===================='
	@echo '-- DOCUMENTATION ---'
	@echo '--------------------'
	@echo 'install                      - install dependencies'
	@echo 'format                       - run code formatters'
	@echo 'test                         - run unit tests'
	@echo 'tests                        - run unit tests'
	@echo 'test TEST_FILE=<test_file>   - run all tests in file'
	@echo 'test_watch                   - run unit tests in watch mode'
	@echo 'extended_tests               - run extended tests'
	@echo 'integration_tests            - run integration tests'
