#!/bin/bash
# HADEX Dependencies Installation Script

echo "=========================================="
echo "HADEX - Installing Dependencies"
echo "=========================================="

# Update package list
echo "Updating package list..."
apt-get update

# Install system dependencies
echo "Installing system dependencies..."
apt-get install -y \
    python3-pip \
    python3-venv \
    git \
    build-essential \
    libopenblas-dev \
    liblapack-dev \
    libhdf5-dev \
    netcdf-bin \
    libnetcdf-dev \
    curl \
    wget \
    vim

# Install Python packages
echo "Installing Python packages..."
pip3 install --upgrade pip
pip3 install \
    numpy \
    scipy \
    pandas \
    matplotlib \
    jupyter \
    netCDF4 \
    h5py \
    pyyaml \
    click \
    rich \
    pytest \
    pytest-cov \
    black \
    isort \
    flake8

# Install optional ML packages
echo "Installing ML packages (optional)..."
pip3 install \
    tensorflow \
    torch \
    scikit-learn

# Create virtual environment
echo "Creating virtual environment..."
python3 -m venv ../hadex_env

echo "=========================================="
echo "Installation complete!"
echo "To activate: source ../hadex_env/bin/activate"
echo "=========================================="
