.PHONY: run_streamlit_locally fmt lint push_to_dev test_connection
.DEFAULT_GOAL := help

help:
	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

run_streamlit_locally: ## Run Streamlit app locally
	uv run streamlit run main.py

fmt: ## Run code formatters
	uv run ruff check --fix
	uv run ruff format

lint: ## Run code linters
	uv run mypy
	uv run ruff check
	uv run ruff format --check

deploy_to_dev: ## Deploy Streamlit to your own Snowflake schema
	uv run snow streamlit deploy --replace --connection=email_draft_poc

test_connection: ## Test connection
	uv run snow connection test --connection=test_deployment
