feat: add node coverage and improve investigation presentation
Generic Container CI/CD / test-build-publish (push) Failing after 1m50s
Server CI/CD v2 / build-test-publish-and-deploy (push) Failing after 1m51s

This commit is contained in:
2026-11-02 15:23:34 +08:00
parent 05183aff93
commit f2cfce8192
25 changed files with 588 additions and 21 deletions
+3 -2
View File
@@ -35,6 +35,7 @@ INPUTS = {
"run_burst_detection": {"target_time": START, "sensor_nodes": ["1", "2", "3", "4", "5"]},
"run_burst_location": {"data_source": "simulation", "simulation_run_id": str(uuid4()), "burst_leakage": 0.02, "pressure_scada_ids": ["1"], "scada_burst_start": START, "scada_burst_end": END},
"analyze_valve_isolation": {"accident_element": ["540672"]},
"generate_node_coverage": {"groups": [{"group_id": "monitoring", "title": "监测节点分布", "node_ids": ["J1"]}]},
"run_leakage_identification": {"scada_start": START, "scada_end": END, "sensor_nodes": ["1"], "q_sum": 0.02, "start_time": 12, "dma_count": 1},
}
@@ -129,7 +130,7 @@ def test_missing_timescale_route_stops_online_simulation_before_model_changes(mo
calculate.assert_not_awaited()
@pytest.mark.parametrize("name", ["analyze_valve_isolation", "optimize_sensor_placement"])
@pytest.mark.parametrize("name", ["analyze_valve_isolation", "optimize_sensor_placement", "generate_node_coverage"])
def test_business_only_calculations_do_not_require_timescale(monkeypatch, routed_calculation_scope, name):
scope, _, events = routed_calculation_scope
@@ -192,7 +193,7 @@ def test_catalog_and_snapshots_accept_calculations_but_reject_model_owned_author
@pytest.mark.parametrize("name", INPUTS)
def test_calculation_permission_and_reader_boundary(monkeypatch, name):
permissions = {"burst.run", "simulation.run", "simulation.view", "scada.view", "optimization.run"}
permissions = {"burst.run", "simulation.run", "simulation.view", "scada.view", "optimization.run", "webgis.view"}
monkeypatch.setattr(query_service, "permissions_for_context", lambda _: permissions)
scope = SimpleNamespace(project=SimpleNamespace(project_role="member"))
binding = SimpleNamespace(tool_cap=list(TOOLS), purpose="task_execution", permission_cap=list(permissions), task_id=uuid4(), task_scope_cap=["scada_readings"])