refactor: move server/ to tools/server/
This commit is contained in:
@@ -7,8 +7,8 @@ import pytest
|
||||
import pytest_asyncio
|
||||
from httpx import ASGITransport, AsyncClient
|
||||
|
||||
from ai_mouse.server import create_app
|
||||
from ai_mouse.server.deps import get_data_dir
|
||||
from tools.server import create_app
|
||||
from tools.server.deps import get_data_dir
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -87,7 +87,7 @@ class TestCollect:
|
||||
async def test_collect_trace_increments_count(self, client, tmp_path, monkeypatch):
|
||||
"""Test that posting a trace increments the collected count."""
|
||||
# Monkeypatch data dir to use tmp
|
||||
import ai_mouse.server.deps as deps
|
||||
import tools.server.deps as deps
|
||||
monkeypatch.setattr(deps, "_DATA_DIR", tmp_path)
|
||||
|
||||
# Start collection
|
||||
@@ -124,7 +124,7 @@ class TestVerify:
|
||||
@pytest.mark.asyncio
|
||||
async def test_verify_returns_paths(self, client, model_dir, monkeypatch):
|
||||
"""Test trajectory generation endpoint."""
|
||||
import ai_mouse.server.routes_verify as rv
|
||||
import tools.server.routes_verify as rv
|
||||
# We can't easily monkeypatch the model dir used inside the route
|
||||
# but we can test the endpoint is accessible
|
||||
resp = await client.post(
|
||||
|
||||
@@ -77,7 +77,7 @@ async def _train_sse_generator(req: TrainRequest) -> AsyncGenerator[str, None]:
|
||||
queue.put_nowait(msg)
|
||||
|
||||
async def run_training_async() -> None:
|
||||
from ai_mouse.trainer import train
|
||||
from tools.trainer import train
|
||||
|
||||
traces_path, models_dir, pretrained_dir = _paths()
|
||||
data_path = Path(req.data_path) if req.data_path else traces_path
|
||||
Reference in New Issue
Block a user