feat: Filter out test-examples configs from API
Exclude configs in official/test-examples/ directory from API responses.
The test-examples directory contains 13 demo/test configs that are useful
for developers but should not appear in the production config gallery:
- ansible_unified.json
- django_unified.json
- example_pdf.json
- fastapi_unified.json
- fastapi_unified_test.json
- godot_github.json
- godot_unified.json
- httpx_comprehensive.json
- python-tutorial-test.json
- react_github.json
- react_unified.json
- template-example.json
- vue_unified.json
Changes:
- Added check in config_analyzer.py to skip files in test-examples/
- Production API will now return only 14 official configs
- Test configs remain in repo for developer reference
Result: Clean config gallery with only production-ready configs
Testing:
$ python3 -c "from config_analyzer import ConfigAnalyzer; from pathlib import Path; print(len(ConfigAnalyzer(Path('configs_repo/official')).analyze_all_configs()))"
14 # ✅ Previously 27 (included test-examples)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,10 @@ class ConfigAnalyzer:
|
||||
|
||||
# Find all JSON files recursively in configs directory and subdirectories
|
||||
for config_file in sorted(self.config_dir.rglob("*.json")):
|
||||
# Skip test/example configs in test-examples directory
|
||||
if "test-examples" in config_file.parts:
|
||||
continue
|
||||
|
||||
try:
|
||||
metadata = self.analyze_config(config_file)
|
||||
if metadata: # Skip invalid configs
|
||||
|
||||
Reference in New Issue
Block a user