Migration from Docker to Standalone Python Server (#73)
* Migration from docker to standalone server Migration handling Fixed tests Use simpler in-memory storage Support for concurrent logging to disk Simplified direct connections to localhost * Migration from docker / redis to standalone script Updated tests Updated run script Fixed requirements Use dotenv Ask if user would like to install MCP in Claude Desktop once Updated docs * More cleanup and references to docker removed * Cleanup * Comments * Fixed tests * Fix GitHub Actions workflow for standalone Python architecture - Install requirements-dev.txt for pytest and testing dependencies - Remove Docker setup from simulation tests (now standalone) - Simplify linting job to use requirements-dev.txt - Update simulation tests to run directly without Docker Fixes unit test failures in CI due to missing pytest dependency. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Remove simulation tests from GitHub Actions - Removed simulation-tests job that makes real API calls - Keep only unit tests (mocked, no API costs) and linting - Simulation tests should be run manually with real API keys - Reduces CI costs and complexity GitHub Actions now only runs: - Unit tests (569 tests, all mocked) - Code quality checks (ruff, black) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Fixed tests * Fixed tests --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
9d72545ecd
commit
4151c3c3a5
@@ -121,10 +121,10 @@ def helper_function():
|
||||
assert any(str(Path(f).resolve()) == expected_resolved for f in captured_files)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@patch("utils.conversation_memory.get_redis_client")
|
||||
@patch("utils.conversation_memory.get_storage")
|
||||
@patch("providers.ModelProviderRegistry.get_provider_for_model")
|
||||
async def test_conversation_continuation_with_directory_files(
|
||||
self, mock_get_provider, mock_redis, tool, temp_directory_with_files
|
||||
self, mock_get_provider, mock_storage, tool, temp_directory_with_files
|
||||
):
|
||||
"""Test that conversation continuation works correctly with directory expansion"""
|
||||
# Setup mock Redis client with in-memory storage
|
||||
@@ -140,7 +140,7 @@ def helper_function():
|
||||
|
||||
mock_client.get.side_effect = mock_get
|
||||
mock_client.setex.side_effect = mock_setex
|
||||
mock_redis.return_value = mock_client
|
||||
mock_storage.return_value = mock_client
|
||||
|
||||
# Setup mock provider
|
||||
mock_provider = create_mock_provider()
|
||||
@@ -196,8 +196,8 @@ def helper_function():
|
||||
# This test shows the fix is working - conversation continuation properly filters out
|
||||
# already-embedded files. The exact length depends on whether any new files are found.
|
||||
|
||||
@patch("utils.conversation_memory.get_redis_client")
|
||||
def test_get_conversation_embedded_files_with_expanded_files(self, mock_redis, tool, temp_directory_with_files):
|
||||
@patch("utils.conversation_memory.get_storage")
|
||||
def test_get_conversation_embedded_files_with_expanded_files(self, mock_storage, tool, temp_directory_with_files):
|
||||
"""Test that get_conversation_embedded_files returns expanded files"""
|
||||
# Setup mock Redis client with in-memory storage
|
||||
mock_client = Mock()
|
||||
@@ -212,7 +212,7 @@ def helper_function():
|
||||
|
||||
mock_client.get.side_effect = mock_get
|
||||
mock_client.setex.side_effect = mock_setex
|
||||
mock_redis.return_value = mock_client
|
||||
mock_storage.return_value = mock_client
|
||||
|
||||
directory = temp_directory_with_files["directory"]
|
||||
expected_files = temp_directory_with_files["files"]
|
||||
@@ -237,8 +237,8 @@ def helper_function():
|
||||
assert set(embedded_files) == set(expected_files)
|
||||
assert directory not in embedded_files
|
||||
|
||||
@patch("utils.conversation_memory.get_redis_client")
|
||||
def test_file_filtering_with_mixed_files_and_directories(self, mock_redis, tool, temp_directory_with_files):
|
||||
@patch("utils.conversation_memory.get_storage")
|
||||
def test_file_filtering_with_mixed_files_and_directories(self, mock_storage, tool, temp_directory_with_files):
|
||||
"""Test file filtering when request contains both individual files and directories"""
|
||||
# Setup mock Redis client with in-memory storage
|
||||
mock_client = Mock()
|
||||
@@ -253,7 +253,7 @@ def helper_function():
|
||||
|
||||
mock_client.get.side_effect = mock_get
|
||||
mock_client.setex.side_effect = mock_setex
|
||||
mock_redis.return_value = mock_client
|
||||
mock_storage.return_value = mock_client
|
||||
|
||||
directory = temp_directory_with_files["directory"]
|
||||
python_file = temp_directory_with_files["python_file"]
|
||||
|
||||
Reference in New Issue
Block a user