File size: 1,579 Bytes
6d6b8af
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
50
51
52
53
54
55
56
57
58
59
60
61
62
"""

Script to verify arviz static files are properly bundled

"""
import os
import sys
from pathlib import Path

def find_static_dir():
    """Find the arviz static directory."""
    possible_paths = [
        Path('dist/test_codette_exe'),
        Path('dist/_internal/arviz/static'),
        Path('dist/arviz/static'),
        Path('.venv/Lib/site-packages/arviz/static')
    ]
    
    for path in possible_paths:
        if path.exists():
            print(f"Found directory: {path}")
            return path
            
    print("Could not find arviz static directory")
    print("Checked paths:")
    for path in possible_paths:
        print(f"  - {path}")
    return None

def verify_static_files(static_dir):
    """Verify required static files exist."""
    required_files = [
        'html/icons-svg-inline.html'  # This is the main required file for arviz
    ]
    
    missing = []
    for file in required_files:
        file_path = static_dir / file
        if not file_path.exists():
            missing.append(file)
            
    if missing:
        print("\nMissing files:")
        for file in missing:
            print(f"  - {file}")
        return False
        
    print("\nAll required files found!")
    return True

def main():
    print("=== Verifying arviz static files ===")
    
    static_dir = find_static_dir()
    if not static_dir:
        return 1
        
    if verify_static_files(static_dir):
        return 0
    return 1

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