File size: 1,602 Bytes
06966eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env python3
"""Test script to verify project structure"""

import os
import sys

def check_file_exists(filepath, description):
    if os.path.exists(filepath):
        print(f"[OK] {description}: {filepath}")
        return True
    else:
        print(f"[MISSING] {description}: {filepath} NOT FOUND")
        return False

def main():
    print("Design Token Extractor - Project Structure Check")
    print("=" * 50)
    
    checks = [
        ("app.py", "Main application file"),
        ("requirements.txt", "Dependencies file"),
        ("README.md", "Documentation with HF config"),
        ("utils/__init__.py", "Utils module init"),
        ("utils/extractor.py", "Core extraction pipeline"),
        ("utils/token_generator.py", "Token code generator"),
        ("examples/", "Examples directory"),
        ("models/", "Models directory"),
        ("assets/", "Assets directory")
    ]
    
    all_good = True
    for filepath, description in checks:
        if not check_file_exists(filepath, description):
            all_good = False
    
    print("=" * 50)
    if all_good:
        print("[SUCCESS] All project files are in place!")
        print("\nTo deploy to Hugging Face Spaces:")
        print("1. Install Git LFS: git lfs install")
        print("2. Add remote: git remote add hf https://huggingface.co/spaces/YOUR_USERNAME/DesignTokenExtractor")
        print("3. Push to HF: git push hf main")
    else:
        print("[ERROR] Some files are missing. Please check the structure.")
    
    return 0 if all_good else 1

if __name__ == "__main__":
    sys.exit(main())