refactor(backend)!: separate algorithm and data layers
Reorganize algorithm packages by business responsibility, move orchestration into services, and keep database access behind pooled repositories. Harden analysis API validation, remove unsafe legacy simulation endpoints, and add regression and architecture boundary coverage. BREAKING CHANGE: legacy algorithm module paths and obsolete simulation endpoints are removed.
This commit is contained in:
@@ -55,7 +55,7 @@ def test_optimize_returns_analysis_run(monkeypatch):
|
||||
captured = {}
|
||||
monkeypatch.setattr(
|
||||
endpoint,
|
||||
"pressure_sensor_placement_kmeans",
|
||||
"optimize_sensor_placement_by_kmeans",
|
||||
lambda **kwargs: captured.update(kwargs) or {"run_id": RUN_ID},
|
||||
)
|
||||
monkeypatch.setattr(endpoint, "get_sensor_placement_run", lambda *_: _run())
|
||||
@@ -74,7 +74,7 @@ def test_optimize_returns_analysis_run(monkeypatch):
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.json()["run_id"] == str(RUN_ID)
|
||||
assert captured["username"] == "alice"
|
||||
assert captured["created_by"] == "alice"
|
||||
|
||||
|
||||
def test_optimize_rejects_project_mismatch(monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user