- Update default base_url in ConfigAnalyzer to api.skillseekersweb.com - Update website URL in API root endpoint - Update test_api.py to use custom domain - Prepare for custom domain deployment
41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
#!/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!")
|