# ----------- docker ----------- #
start-db:
	docker compose -f docker-compose-postgres.yaml up -d

# ----------- caddy ----------- #
start: build
	caddy file-server --root dist/spa --listen :4000

# -----------golang ----------- #
build:
	goreleaser build --skip validate --snapshot --clean

release:
	bash -c "GITHUB_TOKEN=$(gh auth token) goreleaser release --skip validate --clean"

test:
	go test ./...

# ----------- mlflow ----------- #
start:
	uv run mlflow server --port 8080

# ----------- fastapi ----------- #
start:
	uv run uvicorn python_api_template.main:app --port 8080 --reload
test:
	uv run pytest tests/single.py
test-full:
	uv run pytest -n 8 tests/full.py
codecov:
	uv run pytest --cov=python_api_template tests/single.py

# ----------- streamlit ----------- #
start:
	uv run streamlit run article_summarizer/frontend.py --server.port 8501

# ----------- rust ----------- #
build:
	cargo build --release
run:
	./target/release/qa-api-rs
dev:
	systemfd --no-pid -s http::3000 -- cargo watch -x run

# ----------- flox ----------- #
shell:
	flox activate --start-services
