feat(src): Resolve imports and create sloppy.py entry point
This commit is contained in:
@@ -12,16 +12,8 @@
|
|||||||
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Directory Restructuring & Migration' (Protocol in workflow.md)
|
- [ ] Task: Conductor - User Manual Verification 'Phase 2: Directory Restructuring & Migration' (Protocol in workflow.md)
|
||||||
|
|
||||||
## Phase 3: Entry Point & Import Resolution
|
## Phase 3: Entry Point & Import Resolution
|
||||||
- [ ] Task: Create `sloppy.py` Entry Point
|
- [x] Task: Create `sloppy.py` Entry Point
|
||||||
- [ ] WHERE: Project root (`sloppy.py`)
|
- [x] Task: Resolve Absolute and Relative Imports
|
||||||
- [ ] WHAT: Create the script to act as the primary launch point. It should import `App` from `src.gui_2` and pass CLI args.
|
|
||||||
- [ ] HOW: Write a standard Python script wrapper.
|
|
||||||
- [ ] SAFETY: Ensure it correctly propagates `sys.argv`.
|
|
||||||
- [ ] Task: Resolve Absolute and Relative Imports
|
|
||||||
- [ ] WHERE: `src/*.py`, `tests/*.py`, `simulation/*.py`
|
|
||||||
- [ ] WHAT: Update import statements. E.g., `import gui_2` becomes `from src import gui_2` or adjust `sys.path.append` in tests.
|
|
||||||
- [ ] HOW: Surgical string replacements. Ensure `pytest` can still find fixtures and test modules.
|
|
||||||
- [ ] SAFETY: Run `uv run pytest` to aggressively check for `ModuleNotFoundError`s.
|
|
||||||
- [ ] Task: Conductor - User Manual Verification 'Phase 3: Entry Point & Import Resolution' (Protocol in workflow.md)
|
- [ ] Task: Conductor - User Manual Verification 'Phase 3: Entry Point & Import Resolution' (Protocol in workflow.md)
|
||||||
|
|
||||||
## Phase 4: Final Validation & Documentation
|
## Phase 4: Final Validation & Documentation
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import asyncio
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# Add project root to sys.path
|
# Add project root and src/ to sys.path
|
||||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||||
|
sys.path.insert(0, project_root)
|
||||||
|
sys.path.insert(0, os.path.join(project_root, "src"))
|
||||||
|
|
||||||
import mcp_client
|
import mcp_client
|
||||||
import shell_runner
|
import shell_runner
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ import io
|
|||||||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
||||||
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
|
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
|
||||||
|
|
||||||
# Add project root to sys.path
|
# Add project root and src/ to sys.path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||||
|
sys.path.append(project_root)
|
||||||
|
sys.path.append(os.path.join(project_root, "src"))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import mcp_client
|
import mcp_client
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ import json
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# Add project root to sys.path
|
# Add project root and src/ to sys.path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||||
|
sys.path.append(project_root)
|
||||||
|
sys.path.append(os.path.join(project_root, "src"))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import mcp_client
|
import mcp_client
|
||||||
|
|||||||
20
scripts/update_paths.py
Normal file
20
scripts/update_paths.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import os
|
||||||
|
import glob
|
||||||
|
|
||||||
|
pattern = 'sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))'
|
||||||
|
replacement = pattern + '\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))'
|
||||||
|
|
||||||
|
# Files to update
|
||||||
|
files = glob.glob("tests/*.py") + glob.glob("simulation/*.py") + glob.glob("scripts/*.py")
|
||||||
|
|
||||||
|
for file_path in files:
|
||||||
|
if not os.path.isfile(file_path):
|
||||||
|
continue
|
||||||
|
with open(file_path, 'r', encoding='utf-8') as f:
|
||||||
|
content = f.read()
|
||||||
|
if pattern in content and replacement not in content:
|
||||||
|
print(f"Updating {file_path}")
|
||||||
|
new_content = content.replace(pattern, replacement)
|
||||||
|
with open(file_path, 'w', encoding='utf-8') as f:
|
||||||
|
f.write(new_content)
|
||||||
@@ -4,6 +4,7 @@ import time
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
from simulation.user_agent import UserSimAgent
|
from simulation.user_agent import UserSimAgent
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ from typing import Any, Optional
|
|||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
from simulation.workflow_sim import WorkflowSimulator
|
from simulation.workflow_sim import WorkflowSimulator
|
||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root and src/ are in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||||
|
sys.path.append(project_root)
|
||||||
|
sys.path.append(os.path.join(project_root, "src"))
|
||||||
|
|
||||||
class BaseSimulation:
|
class BaseSimulation:
|
||||||
def __init__(self, client: ApiHookClient = None) -> None:
|
def __init__(self, client: ApiHookClient = None) -> None:
|
||||||
|
|||||||
12
sloppy.py
Normal file
12
sloppy.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Add src to sys.path so we can import from it easily
|
||||||
|
project_root = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
src_path = os.path.join(project_root, "src")
|
||||||
|
sys.path.insert(0, src_path)
|
||||||
|
|
||||||
|
from gui_2 import main
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -12,8 +12,9 @@ from pathlib import Path
|
|||||||
from typing import Generator, Any
|
from typing import Generator, Any
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
# Ensure project root is in path for imports
|
# Ensure project root and src/ are in path for imports
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
# Import the App class after patching if necessary, but here we just need the type hint
|
# Import the App class after patching if necessary, but here we just need the type hint
|
||||||
from gui_2 import App
|
from gui_2 import App
|
||||||
@@ -161,10 +162,10 @@ def app_instance() -> Generator[App, None, None]:
|
|||||||
@pytest.fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
def live_gui() -> Generator[tuple[subprocess.Popen, str], None, None]:
|
def live_gui() -> Generator[tuple[subprocess.Popen, str], None, None]:
|
||||||
"""
|
"""
|
||||||
Session-scoped fixture that starts gui_2.py with --enable-test-hooks.
|
Session-scoped fixture that starts sloppy.py with --enable-test-hooks.
|
||||||
Includes high-signal environment telemetry and workspace isolation.
|
Includes high-signal environment telemetry and workspace isolation.
|
||||||
"""
|
"""
|
||||||
gui_script = os.path.abspath("gui_2.py")
|
gui_script = os.path.abspath("sloppy.py")
|
||||||
diag = VerificationLogger("live_gui_startup", "live_gui_diag")
|
diag = VerificationLogger("live_gui_startup", "live_gui_diag")
|
||||||
diag.log_state("GUI Script", "N/A", "gui_2.py")
|
diag.log_state("GUI Script", "N/A", "gui_2.py")
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from unittest.mock import patch, MagicMock
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
import ai_client
|
import ai_client
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import ai_client
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from ai_client import set_agent_tools, _build_anthropic_tools
|
from ai_client import set_agent_tools, _build_anthropic_tools
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import os
|
|||||||
|
|
||||||
# Ensure project root is in path for imports
|
# Ensure project root is in path for imports
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from unittest.mock import patch
|
|||||||
|
|
||||||
# Ensure project root is in path for imports
|
# Ensure project root is in path for imports
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import os
|
|||||||
|
|
||||||
# Add project root to sys.path
|
# Add project root to sys.path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
# Import after path fix
|
# Import after path fix
|
||||||
from scripts.cli_tool_bridge import main
|
from scripts.cli_tool_bridge import main
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import os
|
|||||||
|
|
||||||
# Add project root to sys.path
|
# Add project root to sys.path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
# Import after path fix
|
# Import after path fix
|
||||||
from scripts.cli_tool_bridge import main
|
from scripts.cli_tool_bridge import main
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from typing import Any
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import sys
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
import ai_client
|
import ai_client
|
||||||
import project_manager
|
import project_manager
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import os
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
from simulation.sim_context import ContextSimulation
|
from simulation.sim_context import ContextSimulation
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import os
|
|||||||
|
|
||||||
# Ensure the project root is in sys.path to resolve imports correctly
|
# Ensure the project root is in sys.path to resolve imports correctly
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from gemini_cli_adapter import GeminiCliAdapter
|
from gemini_cli_adapter import GeminiCliAdapter
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from unittest.mock import MagicMock, patch
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
# Import the necessary functions from ai_client, including the reset helper
|
# Import the necessary functions from ai_client, including the reset helper
|
||||||
from ai_client import get_gemini_cache_stats, reset_session
|
from ai_client import get_gemini_cache_stats, reset_session
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import sys
|
|||||||
|
|
||||||
# Ensure project root is in path for imports
|
# Ensure project root is in path for imports
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
|
|
||||||
# Define a temporary file path for callback testing
|
# Define a temporary file path for callback testing
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import os
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from typing import Any
|
|||||||
|
|
||||||
# Ensure project root is in path for imports
|
# Ensure project root is in path for imports
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
|
|
||||||
def test_diagnostics_panel_initialization(app_instance: Any) -> None:
|
def test_diagnostics_panel_initialization(app_instance: Any) -> None:
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from gui_2 import App
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
def test_gui_updates_on_event(app_instance: App) -> None:
|
def test_gui_updates_on_event(app_instance: App) -> None:
|
||||||
app_instance.last_md = "mock_md"
|
app_instance.last_md = "mock_md"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import os
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import os
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from typing import Any
|
|||||||
|
|
||||||
# Ensure project root is in path for imports
|
# Ensure project root is in path for imports
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from gui_2 import App
|
from gui_2 import App
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ from pathlib import Path
|
|||||||
|
|
||||||
# Ensure project root is in path for imports
|
# Ensure project root is in path for imports
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
# Import necessary modules from the project
|
# Import necessary modules from the project
|
||||||
import aggregate
|
import aggregate
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from unittest.mock import patch
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import os
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from gui_2 import App
|
from gui_2 import App
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import os
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from unittest.mock import patch
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
import mcp_client
|
import mcp_client
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import time
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from performance_monitor import PerformanceMonitor
|
from performance_monitor import PerformanceMonitor
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import sys
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from simulation.sim_ai_settings import AISettingsSimulation
|
from simulation.sim_ai_settings import AISettingsSimulation
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import sys
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from simulation.sim_base import BaseSimulation
|
from simulation.sim_base import BaseSimulation
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import sys
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from simulation.sim_context import ContextSimulation
|
from simulation.sim_context import ContextSimulation
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import sys
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from simulation.sim_execution import ExecutionSimulation
|
from simulation.sim_execution import ExecutionSimulation
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import sys
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from simulation.sim_tools import ToolsSimulation
|
from simulation.sim_tools import ToolsSimulation
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ from types import SimpleNamespace
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
import ai_client
|
import ai_client
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import os
|
|||||||
|
|
||||||
# Ensure project root is in path for imports
|
# Ensure project root is in path for imports
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from simulation.user_agent import UserSimAgent
|
from simulation.user_agent import UserSimAgent
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import os
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import os
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import sys
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from api_hook_client import ApiHookClient
|
from api_hook_client import ApiHookClient
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from unittest.mock import MagicMock
|
|||||||
|
|
||||||
# Ensure project root is in path
|
# Ensure project root is in path
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
|
||||||
|
|
||||||
from simulation.workflow_sim import WorkflowSimulator
|
from simulation.workflow_sim import WorkflowSimulator
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user