skill-seekers 2.7.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. skill_seekers/__init__.py +22 -0
  2. skill_seekers/cli/__init__.py +39 -0
  3. skill_seekers/cli/adaptors/__init__.py +120 -0
  4. skill_seekers/cli/adaptors/base.py +221 -0
  5. skill_seekers/cli/adaptors/claude.py +485 -0
  6. skill_seekers/cli/adaptors/gemini.py +453 -0
  7. skill_seekers/cli/adaptors/markdown.py +269 -0
  8. skill_seekers/cli/adaptors/openai.py +503 -0
  9. skill_seekers/cli/ai_enhancer.py +310 -0
  10. skill_seekers/cli/api_reference_builder.py +373 -0
  11. skill_seekers/cli/architectural_pattern_detector.py +525 -0
  12. skill_seekers/cli/code_analyzer.py +1462 -0
  13. skill_seekers/cli/codebase_scraper.py +1225 -0
  14. skill_seekers/cli/config_command.py +563 -0
  15. skill_seekers/cli/config_enhancer.py +431 -0
  16. skill_seekers/cli/config_extractor.py +871 -0
  17. skill_seekers/cli/config_manager.py +452 -0
  18. skill_seekers/cli/config_validator.py +394 -0
  19. skill_seekers/cli/conflict_detector.py +528 -0
  20. skill_seekers/cli/constants.py +72 -0
  21. skill_seekers/cli/dependency_analyzer.py +757 -0
  22. skill_seekers/cli/doc_scraper.py +2332 -0
  23. skill_seekers/cli/enhance_skill.py +488 -0
  24. skill_seekers/cli/enhance_skill_local.py +1096 -0
  25. skill_seekers/cli/enhance_status.py +194 -0
  26. skill_seekers/cli/estimate_pages.py +433 -0
  27. skill_seekers/cli/generate_router.py +1209 -0
  28. skill_seekers/cli/github_fetcher.py +534 -0
  29. skill_seekers/cli/github_scraper.py +1466 -0
  30. skill_seekers/cli/guide_enhancer.py +723 -0
  31. skill_seekers/cli/how_to_guide_builder.py +1267 -0
  32. skill_seekers/cli/install_agent.py +461 -0
  33. skill_seekers/cli/install_skill.py +178 -0
  34. skill_seekers/cli/language_detector.py +614 -0
  35. skill_seekers/cli/llms_txt_detector.py +60 -0
  36. skill_seekers/cli/llms_txt_downloader.py +104 -0
  37. skill_seekers/cli/llms_txt_parser.py +150 -0
  38. skill_seekers/cli/main.py +558 -0
  39. skill_seekers/cli/markdown_cleaner.py +132 -0
  40. skill_seekers/cli/merge_sources.py +806 -0
  41. skill_seekers/cli/package_multi.py +77 -0
  42. skill_seekers/cli/package_skill.py +241 -0
  43. skill_seekers/cli/pattern_recognizer.py +1825 -0
  44. skill_seekers/cli/pdf_extractor_poc.py +1166 -0
  45. skill_seekers/cli/pdf_scraper.py +617 -0
  46. skill_seekers/cli/quality_checker.py +519 -0
  47. skill_seekers/cli/rate_limit_handler.py +438 -0
  48. skill_seekers/cli/resume_command.py +160 -0
  49. skill_seekers/cli/run_tests.py +230 -0
  50. skill_seekers/cli/setup_wizard.py +93 -0
  51. skill_seekers/cli/split_config.py +390 -0
  52. skill_seekers/cli/swift_patterns.py +560 -0
  53. skill_seekers/cli/test_example_extractor.py +1081 -0
  54. skill_seekers/cli/test_unified_simple.py +179 -0
  55. skill_seekers/cli/unified_codebase_analyzer.py +572 -0
  56. skill_seekers/cli/unified_scraper.py +932 -0
  57. skill_seekers/cli/unified_skill_builder.py +1605 -0
  58. skill_seekers/cli/upload_skill.py +162 -0
  59. skill_seekers/cli/utils.py +432 -0
  60. skill_seekers/mcp/__init__.py +33 -0
  61. skill_seekers/mcp/agent_detector.py +316 -0
  62. skill_seekers/mcp/git_repo.py +273 -0
  63. skill_seekers/mcp/server.py +231 -0
  64. skill_seekers/mcp/server_fastmcp.py +1249 -0
  65. skill_seekers/mcp/server_legacy.py +2302 -0
  66. skill_seekers/mcp/source_manager.py +285 -0
  67. skill_seekers/mcp/tools/__init__.py +115 -0
  68. skill_seekers/mcp/tools/config_tools.py +251 -0
  69. skill_seekers/mcp/tools/packaging_tools.py +826 -0
  70. skill_seekers/mcp/tools/scraping_tools.py +842 -0
  71. skill_seekers/mcp/tools/source_tools.py +828 -0
  72. skill_seekers/mcp/tools/splitting_tools.py +212 -0
  73. skill_seekers/py.typed +0 -0
  74. skill_seekers-2.7.3.dist-info/METADATA +2027 -0
  75. skill_seekers-2.7.3.dist-info/RECORD +79 -0
  76. skill_seekers-2.7.3.dist-info/WHEEL +5 -0
  77. skill_seekers-2.7.3.dist-info/entry_points.txt +19 -0
  78. skill_seekers-2.7.3.dist-info/licenses/LICENSE +21 -0
  79. skill_seekers-2.7.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,179 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Simple Integration Tests for Unified Multi-Source Scraper
4
+
5
+ Focuses on real-world usage patterns rather than unit tests.
6
+ """
7
+
8
+ import json
9
+ import os
10
+ import sys
11
+ import tempfile
12
+ from pathlib import Path
13
+
14
+ # Add CLI to path
15
+ sys.path.insert(0, str(Path(__file__).parent))
16
+
17
+ from .config_validator import validate_config
18
+
19
+
20
+ def test_validate_existing_unified_configs():
21
+ """Test that all existing unified configs are valid"""
22
+ configs_dir = Path(__file__).parent.parent / "configs"
23
+
24
+ unified_configs = [
25
+ "godot_unified.json",
26
+ "react_unified.json",
27
+ "django_unified.json",
28
+ "fastapi_unified.json",
29
+ ]
30
+
31
+ for config_name in unified_configs:
32
+ config_path = configs_dir / config_name
33
+ if config_path.exists():
34
+ print(f"\n✓ Validating {config_name}...")
35
+ validator = validate_config(str(config_path))
36
+ assert validator.is_unified, f"{config_name} should be unified format"
37
+ assert validator.needs_api_merge(), f"{config_name} should need API merging"
38
+ print(f" Sources: {len(validator.config['sources'])}")
39
+ print(f" Merge mode: {validator.config.get('merge_mode')}")
40
+
41
+
42
+ def test_backward_compatibility():
43
+ """Test that legacy configs still work"""
44
+ configs_dir = Path(__file__).parent.parent / "configs"
45
+
46
+ legacy_configs = ["react.json", "godot.json", "django.json"]
47
+
48
+ for config_name in legacy_configs:
49
+ config_path = configs_dir / config_name
50
+ if config_path.exists():
51
+ print(f"\n✓ Validating legacy {config_name}...")
52
+ validator = validate_config(str(config_path))
53
+ assert not validator.is_unified, f"{config_name} should be legacy format"
54
+ print(" Format: Legacy")
55
+
56
+
57
+ def test_create_temp_unified_config():
58
+ """Test creating a unified config from scratch"""
59
+ config = {
60
+ "name": "test_unified",
61
+ "description": "Test unified config",
62
+ "merge_mode": "rule-based",
63
+ "sources": [
64
+ {
65
+ "type": "documentation",
66
+ "base_url": "https://example.com/docs",
67
+ "extract_api": True,
68
+ "max_pages": 50,
69
+ },
70
+ {
71
+ "type": "github",
72
+ "repo": "test/repo",
73
+ "include_code": True,
74
+ "code_analysis_depth": "surface",
75
+ },
76
+ ],
77
+ }
78
+
79
+ with tempfile.NamedTemporaryFile(mode="w", suffix=".json", delete=False) as f:
80
+ json.dump(config, f)
81
+ config_path = f.name
82
+
83
+ try:
84
+ print("\n✓ Validating temp unified config...")
85
+ validator = validate_config(config_path)
86
+ assert validator.is_unified
87
+ assert validator.needs_api_merge()
88
+ assert len(validator.config["sources"]) == 2
89
+ print(" ✓ Config is valid unified format")
90
+ print(f" Sources: {len(validator.config['sources'])}")
91
+ finally:
92
+ os.unlink(config_path)
93
+
94
+
95
+ def test_mixed_source_types():
96
+ """Test config with documentation, GitHub, and PDF sources"""
97
+ config = {
98
+ "name": "test_mixed",
99
+ "description": "Test mixed sources",
100
+ "merge_mode": "rule-based",
101
+ "sources": [
102
+ {"type": "documentation", "base_url": "https://example.com"},
103
+ {"type": "github", "repo": "test/repo"},
104
+ {"type": "pdf", "path": "/path/to/manual.pdf"},
105
+ ],
106
+ }
107
+
108
+ with tempfile.NamedTemporaryFile(mode="w", suffix=".json", delete=False) as f:
109
+ json.dump(config, f)
110
+ config_path = f.name
111
+
112
+ try:
113
+ print("\n✓ Validating mixed source types...")
114
+ validator = validate_config(config_path)
115
+ assert validator.is_unified
116
+ assert len(validator.config["sources"]) == 3
117
+
118
+ # Check each source type
119
+ source_types = [s["type"] for s in validator.config["sources"]]
120
+ assert "documentation" in source_types
121
+ assert "github" in source_types
122
+ assert "pdf" in source_types
123
+ print(" ✓ All 3 source types validated")
124
+ finally:
125
+ os.unlink(config_path)
126
+
127
+
128
+ def test_config_validation_errors():
129
+ """Test that invalid configs are rejected"""
130
+ # Invalid source type
131
+ config = {
132
+ "name": "test",
133
+ "description": "Test",
134
+ "sources": [{"type": "invalid_type", "url": "https://example.com"}],
135
+ }
136
+
137
+ with tempfile.NamedTemporaryFile(mode="w", suffix=".json", delete=False) as f:
138
+ json.dump(config, f)
139
+ config_path = f.name
140
+
141
+ try:
142
+ print("\n✓ Testing invalid source type...")
143
+ try:
144
+ # validate_config() calls .validate() automatically
145
+ _validator = validate_config(config_path)
146
+ raise AssertionError("Should have raised error for invalid source type")
147
+ except ValueError as e:
148
+ assert "Invalid" in str(e) or "invalid" in str(e)
149
+ print(" ✓ Invalid source type correctly rejected")
150
+ finally:
151
+ os.unlink(config_path)
152
+
153
+
154
+ # Run tests
155
+ if __name__ == "__main__":
156
+ print("=" * 60)
157
+ print("Running Unified Scraper Integration Tests")
158
+ print("=" * 60)
159
+
160
+ try:
161
+ test_validate_existing_unified_configs()
162
+ test_backward_compatibility()
163
+ test_create_temp_unified_config()
164
+ test_mixed_source_types()
165
+ test_config_validation_errors()
166
+
167
+ print("\n" + "=" * 60)
168
+ print("✅ All integration tests passed!")
169
+ print("=" * 60)
170
+
171
+ except AssertionError as e:
172
+ print(f"\n❌ Test failed: {e}")
173
+ sys.exit(1)
174
+ except Exception as e:
175
+ print(f"\n❌ Unexpected error: {e}")
176
+ import traceback
177
+
178
+ traceback.print_exc()
179
+ sys.exit(1)