test: all
	cd solo-tool-project/test && ../../.venv/bin/pytest *test.py

all: .venv .git/hooks/pre-commit

clean:
	rm -rf .venv

.git/hooks/pre-commit: pre-commit
	install -m 755 pre-commit .git/hooks/pre-commit

.venv: .venv/touchfile

.venv/touchfile: requirements.txt solo-tool-project/pyproject.toml cli-project/pyproject.toml gui-project/pyproject.toml
	rm -rf venv
	uv venv
	uv pip install -r requirements.txt
	touch .venv/touchfile

gui: .venv/touchfile
	./.venv/bin/python web-project/src/solo_tool_web.py

.PHONY: all test clean gui