From fdbf5086737093d8e05f95f5cefb1abf2c073933 Mon Sep 17 00:00:00 2001 From: yusyus Date: Wed, 14 Jan 2026 23:48:54 +0300 Subject: [PATCH] feat: Filter out test-examples configs from API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- api/config_analyzer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/config_analyzer.py b/api/config_analyzer.py index dd186a9..644ade7 100644 --- a/api/config_analyzer.py +++ b/api/config_analyzer.py @@ -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