forked from yusufkaraaslan/Skill_Seekers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_api.py
More file actions
43 lines (32 loc) · 1.12 KB
/
test_api.py
File metadata and controls
43 lines (32 loc) · 1.12 KB
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
#!/usr/bin/env python3
"""Quick test of the config analyzer"""
import sys
sys.path.insert(0, "api")
from pathlib import Path
from api.config_analyzer import ConfigAnalyzer
# Initialize analyzer
config_dir = Path("configs")
analyzer = ConfigAnalyzer(config_dir, base_url="https://api.skillseekersweb.com")
# Test analyzing all configs
print("Testing config analyzer...")
print("-" * 60)
configs = analyzer.analyze_all_configs()
print(f"\n✅ Found {len(configs)} configs")
# Show first 3 configs
print("\n📋 Sample Configs:")
for config in configs[:3]:
print(f"\n Name: {config['name']}")
print(f" Type: {config['type']}")
print(f" Category: {config['category']}")
print(f" Tags: {', '.join(config['tags'])}")
print(f" Source: {config['primary_source'][:50]}...")
print(f" File Size: {config['file_size']} bytes")
# Test category counts
print("\n\n📊 Categories:")
categories = {}
for config in configs:
cat = config["category"]
categories[cat] = categories.get(cat, 0) + 1
for cat, count in sorted(categories.items()):
print(f" {cat}: {count} configs")
print("\n✅ All tests passed!")