refactor(06-02): update CLI and test imports to kb_workflow.pipeline
- Remove sys.path manipulation from kb_workflow.py - Update CLI imports to use kb_workflow.pipeline prefix - Update all test file imports and patch paths Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,9 +13,9 @@ from datetime import datetime
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch, MagicMock
|
||||
|
||||
from kb_pipeline.processors.archive import ArchiveProcessor
|
||||
from kb_pipeline.schemas import ArchiveInput, ArchiveOutput
|
||||
from kb_pipeline.state import WorkflowStateManager
|
||||
from kb_workflow.pipeline.processors.archive import ArchiveProcessor
|
||||
from kb_workflow.pipeline.schemas import ArchiveInput, ArchiveOutput
|
||||
from kb_workflow.pipeline.state import WorkflowStateManager
|
||||
|
||||
|
||||
# =============================================================================
|
||||
@@ -63,7 +63,7 @@ class TestArchiveProcessorCopyToPlatformDir:
|
||||
mock_settings = MagicMock()
|
||||
mock_settings.archive_path = str(archive_test_env["archive_dir"])
|
||||
|
||||
with patch('kb_pipeline.processors.archive.get_settings') as mock_get_settings:
|
||||
with patch('kb_workflow.pipeline.processors.archive.get_settings') as mock_get_settings:
|
||||
mock_get_settings.return_value = mock_settings
|
||||
|
||||
processor = ArchiveProcessor()
|
||||
@@ -95,7 +95,7 @@ class TestArchiveProcessorFilenameFormat:
|
||||
mock_settings = MagicMock()
|
||||
mock_settings.archive_path = str(archive_test_env["archive_dir"])
|
||||
|
||||
with patch('kb_pipeline.processors.archive.get_settings') as mock_get_settings:
|
||||
with patch('kb_workflow.pipeline.processors.archive.get_settings') as mock_get_settings:
|
||||
mock_get_settings.return_value = mock_settings
|
||||
|
||||
processor = ArchiveProcessor()
|
||||
@@ -138,7 +138,7 @@ class TestArchiveProcessorSkipsCompleted:
|
||||
state.mark_step_completed("archive")
|
||||
archive_test_env["state_manager"].save(state)
|
||||
|
||||
with patch('kb_pipeline.processors.archive.get_settings') as mock_get_settings:
|
||||
with patch('kb_workflow.pipeline.processors.archive.get_settings') as mock_get_settings:
|
||||
mock_get_settings.return_value = mock_settings
|
||||
|
||||
processor = ArchiveProcessor(state_manager=archive_test_env["state_manager"])
|
||||
@@ -171,7 +171,7 @@ class TestArchiveProcessorDetectsExisting:
|
||||
existing = platform_dir / "20260101_BV1test_analysis.md"
|
||||
existing.write_text("Old content")
|
||||
|
||||
with patch('kb_pipeline.processors.archive.get_settings') as mock_get_settings:
|
||||
with patch('kb_workflow.pipeline.processors.archive.get_settings') as mock_get_settings:
|
||||
mock_get_settings.return_value = mock_settings
|
||||
|
||||
processor = ArchiveProcessor()
|
||||
@@ -201,7 +201,7 @@ class TestArchiveProcessorHandlesMissingFile:
|
||||
mock_settings = MagicMock()
|
||||
mock_settings.archive_path = str(archive_test_env["archive_dir"])
|
||||
|
||||
with patch('kb_pipeline.processors.archive.get_settings') as mock_get_settings:
|
||||
with patch('kb_workflow.pipeline.processors.archive.get_settings') as mock_get_settings:
|
||||
mock_get_settings.return_value = mock_settings
|
||||
|
||||
processor = ArchiveProcessor()
|
||||
|
||||
Reference in New Issue
Block a user