fix: Resolve all CI failures (ruff linting + MCP test failures)
Fixed 7 ruff linting errors: - SIM102: Simplified nested if statements in rag_chunker.py - SIM113: Use enumerate() in streaming_ingest.py - ARG001: Prefix unused signal handler args with underscore - SIM105: Replace try-except-pass with contextlib.suppress (3 instances) Fixed 7 MCP server test failures: - Updated generate_config_tool to output unified format (not legacy) - Updated test_validate_valid_config to use unified format - Renamed test_submit_config_accepts_legacy_format to test_submit_config_rejects_legacy_format (tests rejection, not acceptance) - Updated all submit_config tests to use unified format: - test_submit_config_requires_token - test_submit_config_from_file_path - test_submit_config_detects_category - test_submit_config_validates_name_format - test_submit_config_validates_url_format Added v3.0.0 release planning documents: - RELEASE_EXECUTIVE_SUMMARY_v3.0.0.md (one-page overview) - RELEASE_PLAN_v3.0.0.md (complete 4-week campaign) - RELEASE_CONTENT_CHECKLIST_v3.0.0.md (content creation guide) All tests should now pass. Ready for v3.0.0 release. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -352,9 +352,8 @@ class RAGChunker:
|
||||
|
||||
# Add chunk if it meets minimum size requirement
|
||||
# (unless the entire text is smaller than target size)
|
||||
if chunk_text.strip():
|
||||
if len(text) <= target_size_chars or len(chunk_text) >= min_size_chars:
|
||||
chunks.append(chunk_text)
|
||||
if chunk_text.strip() and (len(text) <= target_size_chars or len(chunk_text) >= min_size_chars):
|
||||
chunks.append(chunk_text)
|
||||
|
||||
# Move to next chunk with overlap
|
||||
if j < len(boundaries) - 1:
|
||||
|
||||
@@ -239,9 +239,7 @@ class StreamingIngester:
|
||||
}
|
||||
|
||||
# Chunk document and yield chunks
|
||||
chunk_count = 0
|
||||
for chunk_text, chunk_meta in self.chunk_document(content, metadata):
|
||||
chunk_count += 1
|
||||
for chunk_count, (chunk_text, chunk_meta) in enumerate(self.chunk_document(content, metadata), start=1):
|
||||
self.progress.total_chunks += 1
|
||||
|
||||
# Convert chunk metadata to dict
|
||||
|
||||
@@ -13,7 +13,7 @@ from pathlib import Path
|
||||
from ..sync import SyncMonitor
|
||||
|
||||
|
||||
def handle_signal(signum, frame):
|
||||
def handle_signal(_signum, _frame):
|
||||
"""Handle interrupt signals."""
|
||||
print("\n🛑 Stopping sync monitor...")
|
||||
sys.exit(0)
|
||||
|
||||
@@ -65,16 +65,19 @@ async def generate_config(args: dict) -> list[TextContent]:
|
||||
else:
|
||||
limit_msg = str(max_pages)
|
||||
|
||||
# Create config
|
||||
# Create config (unified format)
|
||||
config = {
|
||||
"name": name,
|
||||
"description": description,
|
||||
"base_url": url,
|
||||
"selectors": {"main_content": "article", "title": "h1", "code_blocks": "pre code"},
|
||||
"url_patterns": {"include": [], "exclude": []},
|
||||
"categories": {},
|
||||
"rate_limit": rate_limit,
|
||||
"max_pages": max_pages,
|
||||
"sources": [{
|
||||
"type": "documentation",
|
||||
"base_url": url,
|
||||
"selectors": {"main_content": "article", "title": "h1", "code_blocks": "pre code"},
|
||||
"url_patterns": {"include": [], "exclude": []},
|
||||
"categories": {},
|
||||
"rate_limit": rate_limit,
|
||||
"max_pages": max_pages,
|
||||
}],
|
||||
}
|
||||
|
||||
# Save to configs directory
|
||||
|
||||
Reference in New Issue
Block a user