#!/bin/bash
# Generate requirements.txt files from pyproject.toml
# Usage: ./scripts/generate_requirements.sh

set -e

cd "$(dirname "$0")/.."

echo "Generating requirements files from pyproject.toml..."

# Generate production requirements
echo "  → requirements.txt (production)"
uv pip compile pyproject.toml -o requirements.txt --no-deps

# Generate development requirements
echo "  → requirements-dev.txt (development)"
uv pip compile pyproject.toml -o requirements-dev.txt --group dev

# Generate test requirements
echo "  → requirements-test.txt (testing)"
uv pip compile pyproject.toml -o requirements-test.txt --group test

echo ""
echo "Requirements files generated successfully!"
echo ""
echo "Files created:"
echo "  - requirements.txt      (production dependencies)"
echo "  - requirements-dev.txt  (development dependencies)"
echo "  - requirements-test.txt (test dependencies)"
