Skip to main content
Glama

Project Synapse

step_by_step_test.pyโ€ข2.68 kB
#!/usr/bin/env python3 """ Minimal test to isolate the regex error source. """ import asyncio import sys from pathlib import Path # Add src to path for imports sys.path.insert(0, str(Path(__file__).parent / 'src')) async def test_step_by_step(): """Test each component step by step to isolate the error.""" print("๐Ÿ” Testing each component step by step...") try: # Test 1: Import semantic integrator print("Step 1: Importing semantic integrator...") from synapse_mcp.data_pipeline.semantic_integrator import SemanticIntegrator print("โœ… Import successful") # Test 2: Create instance print("Step 2: Creating instance...") integrator = SemanticIntegrator() print("โœ… Instance created") # Test 3: Initialize (without Montague parser) print("Step 3: Initializing without parser...") await integrator.initialize() print("โœ… Initialization successful") # Test 4: Test basic text processing only print("Step 4: Testing basic text processing...") result = await integrator._basic_text_processing("Hello world", "test", {}) print("โœ… Basic text processing successful") print(f" Sentences: {len(result['sentences'])}") # Test 5: Test cleaning function directly print("Step 5: Testing cleaning function...") cleaned = await integrator._clean_text("Hello 'smart quotes' test") print(f"โœ… Text cleaning successful: '{cleaned}'") # Test 6: Test full processing without Montague print("Step 6: Testing full processing without semantic analysis...") full_result = await integrator.process_text_with_semantics("Simple test", "test", {}) print("โœ… Full processing successful") print(f" Entities: {len(full_result['entities'])}") print(f" Facts: {len(full_result['facts'])}") return True except Exception as e: print(f"โŒ Error at current step: {e}") import traceback traceback.print_exc() return False async def main(): """Run the step-by-step test.""" print("๐Ÿง  Project Synapse - Step-by-Step Debug") print("=" * 50) success = await test_step_by_step() if success: print("\nโœ… All steps completed successfully!") print("The error must be in the knowledge graph connection or MCP layer.") else: print("\nโŒ Error found in semantic processing layer.") return 0 if success else 1 if __name__ == "__main__": exit_code = asyncio.run(main()) sys.exit(exit_code)

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/angrysky56/project-synapse-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server