A-SW Hub / Repositories
Local Gitea · READ ONLY
← 저장소 Repositories
REPOSITORY

ontariotech/path-optimization Private

[참조 MVP] 농작업 경로 최적화 A-SW — 작업 구간을 최근접 휴리스틱으로 재정렬해 공차 이동거리를 줄입니다.

https://git.agrithing.ai/ontariotech/path-optimization.git
7 commits
COMMIT DETAIL

feat: adopt python SERVICE SDV reference implementation

A-SW Reference Factory <[email protected]> · 2026. 8. 2. 오후 9:32:26
31e9d331140aa48c3bdd6864b1c98ea103fa7423
1 changed files +4 −1 parent 9a8e645
modified tools/quality_scan.py +4−1 View file
@@ -9,6 +9,9 @@ from pathlib import Path
9 9
10 10 ROOT = Path(__file__).resolve().parents[1]
11 11 SCHEMA = "asw.quality-result/v1"
12 + BRANCH_NODES = (ast.If, ast.For, ast.AsyncFor, ast.While, ast.Try, ast.BoolOp)
13 + if hasattr(ast, "Match"):
14 + BRANCH_NODES += (ast.Match,)
12 15
13 16
14 17 def write_result(path: str, payload: dict) -> None:
@@ -38,7 +41,7 @@ def static_analysis() -> dict:
38 41 for node in ast.walk(tree):
39 42 if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
40 43 functions += 1
41 complexity = 1 + sum(isinstance(item, (ast.If, ast.For, ast.AsyncFor, ast.While, ast.Try, ast.BoolOp, ast.Match)) for item in ast.walk(node))
44 + complexity = 1 + sum(isinstance(item, BRANCH_NODES) for item in ast.walk(node))
42 45 maximum_complexity = max(maximum_complexity, complexity)
43 46 if complexity > 12:
44 47 issues.append({"rule": "PY-COMPLEXITY", "severity": "MEDIUM", "path": relative, "line": node.lineno, "message": f"{node.name} complexity {complexity} exceeds warning threshold 12"})