#!/usr/bin/env python3 """ Pre-deployment checklist for HF Space """ import os import sys from pathlib import Path def check_deployment_ready(): """Check if everything is ready for HF deployment""" print("šŸ” Pre-deployment checklist:\n") checks = [] # Check files exist required_files = [ "app.py", "run_evaluation.py", "requirements.txt", ".env.example", "run_hf_space.py", "official_config.yaml" ] for file in required_files: if Path(file).exists(): checks.append((f"āœ… {file} exists", True)) else: checks.append((f"āŒ {file} missing", False)) # Check API directories if Path("apis").is_dir() and list(Path("apis").glob("*.py")): checks.append(("āœ… APIs directory configured", True)) else: checks.append(("āŒ APIs directory missing or empty", False)) # Check benchmarks directory if Path("benchmarks").is_dir() and Path("benchmarks/gpqa_benchmark.py").exists(): checks.append(("āœ… GPQA benchmark implementation found", True)) else: checks.append(("āŒ GPQA benchmark missing", False)) # Check for sensitive data if Path(".env").exists(): checks.append(("āš ļø .env file exists - make sure it's in .gitignore!", None)) # Print results for check, status in checks: print(check) all_good = all(status is not False for _, status in checks) if all_good: print("\nāœ… Ready for deployment!") print("\nNext steps:") print("1. Set GROK_API_KEY and HF_TOKEN in HF Space secrets") print("2. Make sure you have GPQA dataset access") print("3. Push to Hugging Face") else: print("\nāŒ Issues found - please fix before deploying") return all_good if __name__ == "__main__": check_deployment_ready()