from web.app import create_app
from web.services.feature_service import FeatureService
import sys
import os

# Ensure project root is in path
sys.path.append(os.getcwd())

app = create_app()

with app.app_context():
    print("Starting Feature Rebuild...")
    count = FeatureService.rebuild_all_features()
    print(f"Rebuild Complete. Processed {count} players.")
