diff --git a/docs/raw/요구_1021/사용자요구_1021.md b/docs/raw/요구_1021/사용자요구_1021.md index 9f0676f3f..648224e76 100644 --- a/docs/raw/요구_1021/사용자요구_1021.md +++ b/docs/raw/요구_1021/사용자요구_1021.md @@ -42,3 +42,7 @@ 1. 2번 필요없음. 2. 4번 45개를 전체다 선택 가능하게 하려면? 어떻게 해야함? 일단 방법만 공유 + +## 요구 316 (10-21 · 사용자 · 추가 분석 요청) + +1. B05의 평면의 분석지형에서 수치지형도를 선택하면 화면제어가 느려지는 이유는? diff --git a/resources/tester/helper_verify_project.py b/resources/tester/helper_verify_project.py index 97c768b7d..7de794f27 100644 --- a/resources/tester/helper_verify_project.py +++ b/resources/tester/helper_verify_project.py @@ -53,3 +53,15 @@ def find_project(*rels: str) -> Path: and (project / "B06_Section" / "cross_sections").is_dir() ] return min(found, key=lambda project: _touched(project, rels), default=NONE) + + +def own_ports() -> tuple[str, str]: + """OWNERS.md 표에서 이 폴더 줄의 (API, vite) 주소 — 줄이 없으면 빈 글 둘(시험이 안 돎 · 508-1a).""" + owners = ROOT / "OWNERS.md" + for line in owners.read_text(encoding="utf-8-sig").splitlines() if owners.is_file() else []: + cells = [cell.strip().strip("`") for cell in line.strip().strip("|").split("|")] + if len(cells) >= 5 and Path(cells[2]).resolve() == ROOT.resolve(): + ports = re.findall(r"\d{4,5}", cells[4]) + if len(ports) == 2: + return f"http://localhost:{ports[0]}", f"http://localhost:{ports[1]}" + return "", "" diff --git a/resources/tester/test_225_drawer_shortcuts.py b/resources/tester/test_225_drawer_shortcuts.py index 30d355060..7265294b1 100644 --- a/resources/tester/test_225_drawer_shortcuts.py +++ b/resources/tester/test_225_drawer_shortcuts.py @@ -19,7 +19,9 @@ from pathlib import Path import pytest ROOT = Path(__file__).resolve().parents[2] -BASE = os.environ.get("AISLO_UI_BASE", "http://localhost:5177") # sub2 화면 서버(OWNERS 자기 줄) +from helper_verify_project import own_ports # noqa: E402 + +BASE = os.environ.get("AISLO_UI_BASE", own_ports()[1]) # 화면 서버 = OWNERS.md 이 폴더 줄 LAYOUT = ROOT / "ui_template" / "ui_template_workflow_layout.ts" NAV = ROOT / "A00_Common" / "m_settings_nav.ts" STEPS = ["파일입력", "전처리", "종단설계"] diff --git a/resources/tester/test_309_2_calc_sites_browser.py b/resources/tester/test_309_2_calc_sites_browser.py index 11f1eb950..804eee455 100644 --- a/resources/tester/test_309_2_calc_sites_browser.py +++ b/resources/tester/test_309_2_calc_sites_browser.py @@ -13,7 +13,6 @@ from __future__ import annotations import asyncio import json -import re import subprocess import urllib.request from pathlib import Path @@ -22,20 +21,9 @@ import pytest ROOT = Path(__file__).resolve().parents[2] +from helper_verify_project import own_ports # noqa: E402 -def _own_ports() -> list[str]: - """OWNERS.md 표에서 이 폴더 줄의 (API, vite) 포트(508-1a).""" - for line in (ROOT / "OWNERS.md").read_text(encoding="utf-8-sig").splitlines(): - cells = [cell.strip().strip("`") for cell in line.strip().strip("|").split("|")] - if len(cells) >= 5 and Path(cells[2]).resolve() == ROOT.resolve(): - return re.findall(r"\d{4,5}", cells[4]) - return [] - - -_PORTS = _own_ports() -API, BASE = ( - [f"http://localhost:{port}" for port in _PORTS] if len(_PORTS) == 2 else ["", ""] -) # 이 폴더 백엔드 · 그 백엔드를 프록시하는 vite +API, BASE = own_ports() # 이 폴더 백엔드 · 그 백엔드를 프록시하는 vite(OWNERS.md 이 폴더 줄) BOARD = ROOT / "resources" / "master_template" / "calc_sites.json" PROJECT = "cb15892a-5788-4a26-9316-20a15421f68b" # 검증_sub2(OWNERS.md) SHOTS = ROOT / "tmp" / "shots_504_2" diff --git a/resources/tester/test_349_0j_draft_vs_saved.py b/resources/tester/test_349_0j_draft_vs_saved.py index 5eea91ca9..d25d7fd66 100644 --- a/resources/tester/test_349_0j_draft_vs_saved.py +++ b/resources/tester/test_349_0j_draft_vs_saved.py @@ -87,6 +87,7 @@ def _server(ts: dict, sampler) -> list[dict]: "cut": design["cut_area_m2"], "fill": design["fill_area_m2"], "lineEnds": [line[0]["offset_m"], line[-1]["offset_m"]], + "unclosed": wide is not None, } ) return out @@ -172,9 +173,8 @@ def test_격자_없으면_넓힘_없음(r): def test_초안_상세_표본은_넓힌_표본(r): - widened = [ - s for s in r["wide"]["stations"] if s["lineEnds"] and max(map(abs, s["lineEnds"])) > 20.01 - ] + # 넓힘 표본 = 서버 `extend_unclosed` 가 표본을 낸 미교차 측점(지표면 끝에 막혀 못 넓혀도 · 508-1c) + widened = [s for s in r["server"] if s["unclosed"]] assert r["wide"]["shownWide"] == len(widened) # 349-0n — 서버도 넓힌 표본을 상세에 남김 assert r["plain"]["shownWide"] == 0 diff --git a/resources/tester/test_505_3_cross_card_screen.py b/resources/tester/test_505_3_cross_card_screen.py index ffb9530e4..34cd6abe4 100644 --- a/resources/tester/test_505_3_cross_card_screen.py +++ b/resources/tester/test_505_3_cross_card_screen.py @@ -19,7 +19,9 @@ import pytest ROOT = Path(__file__).resolve().parents[2] # 기본 = sub4 환경 · 다른 창은 AISLO_505_3_BASE · AISLO_505_3_PROJECT 로 바꿔 test_0 만 돌림(test_1 · 2 는 sub4 자료) -BASE = os.environ.get("AISLO_505_3_BASE", "http://localhost:5179") +from helper_verify_project import own_ports # noqa: E402 + +BASE = os.environ.get("AISLO_505_3_BASE", own_ports()[1]) # 화면 서버 = OWNERS.md 이 폴더 줄 PROJECT = os.environ.get("AISLO_505_3_PROJECT", "c725d747-50ae-46b0-87ce-4d4e56a53cf3") # 검증_sub4 SHOTS = ROOT / "tmp" / "shots_505_3" PIPE_M = 388 # 검증_sub4 배관 하나(관경 빈칸 · 19+8) diff --git a/resources/tester/test_505_4_refresh_blank_pipe.py b/resources/tester/test_505_4_refresh_blank_pipe.py index 7921a19da..7f44abdd0 100644 --- a/resources/tester/test_505_4_refresh_blank_pipe.py +++ b/resources/tester/test_505_4_refresh_blank_pipe.py @@ -14,7 +14,9 @@ from pathlib import Path import pytest ROOT = Path(__file__).resolve().parents[2] -BASE = "http://localhost:5179" +from helper_verify_project import own_ports # noqa: E402 + +BASE = own_ports()[1] # 화면 서버 = OWNERS.md 이 폴더 줄 PROJECT = "c725d747-50ae-46b0-87ce-4d4e56a53cf3" # 검증_sub4(OWNERS.md) LIST_URL = f"{BASE}/api/projects/{PROJECT}/route/structures" diff --git a/resources/tester/test_506_3_b07_browser.py b/resources/tester/test_506_3_b07_browser.py index 667c53788..c0c275adb 100644 --- a/resources/tester/test_506_3_b07_browser.py +++ b/resources/tester/test_506_3_b07_browser.py @@ -26,7 +26,9 @@ import pytest ROOT = Path(__file__).resolve().parents[2] sys.path.insert(0, str(ROOT)) -BASE = "http://localhost:5177" +from helper_verify_project import own_ports # noqa: E402 + +BASE = own_ports()[1] # 화면 서버 = OWNERS.md 이 폴더 줄 PROJECT = "cb15892a-5788-4a26-9316-20a15421f68b" # 검증_sub2(OWNERS.md) SHOTS = ROOT / "tmp" / "shots_506_3" COLS = ( diff --git a/resources/tester/test_app_settings.py b/resources/tester/test_app_settings.py index 1bc7f5011..a453f953a 100644 --- a/resources/tester/test_app_settings.py +++ b/resources/tester/test_app_settings.py @@ -18,7 +18,9 @@ import pytest HERE = os.path.dirname(__file__) ROOT = os.path.join(HERE, "..", "..") # 화면 서버(OWNERS 자기 줄) — 돌리는 창 포트로 바꿈 -BASE = os.environ.get("AISLO_UI_BASE", "http://localhost:5177") +from helper_verify_project import own_ports # noqa: E402 + +BASE = os.environ.get("AISLO_UI_BASE", own_ports()[1]) KEY = "aislo:pref:input-prefs" # 앱 스크립트보다 먼저 — 설정 키에 쓰는 횟수를 셈 diff --git a/resources/tester/test_cad_touch.py b/resources/tester/test_cad_touch.py index 386dd5ac1..65fcd318a 100644 --- a/resources/tester/test_cad_touch.py +++ b/resources/tester/test_cad_touch.py @@ -10,7 +10,9 @@ import urllib.request import pytest -URL = os.environ.get("CAD_TOUCH_URL", "http://localhost:5174/b07-cad/") +from helper_verify_project import own_ports # noqa: E402 + +URL = os.environ.get("CAD_TOUCH_URL", f"{own_ports()[1]}/b07-cad/") # OWNERS.md 이 폴더 줄 def _up() -> bool: diff --git a/resources/tester/test_device_audit.py b/resources/tester/test_device_audit.py index aaf6d0404..c5f3a2023 100644 --- a/resources/tester/test_device_audit.py +++ b/resources/tester/test_device_audit.py @@ -20,7 +20,9 @@ import pytest ROOT = Path(__file__).resolve().parents[2] # 다른 창 서버로 돌릴 때 — AISLO_UI_BASE · AISLO_UI_PROJECT(OWNERS 자기 줄) -BASE = os.environ.get("AISLO_UI_BASE", "http://localhost:5174") +from helper_verify_project import own_ports # noqa: E402 + +BASE = os.environ.get("AISLO_UI_BASE", own_ports()[1]) PROJECT_NAME = os.environ.get("AISLO_UI_PROJECT", "검증_sub1") PAGES = [ "a01-home", diff --git a/resources/tester/test_spreadsheet_touch.py b/resources/tester/test_spreadsheet_touch.py index f989f40bf..7c51e5620 100644 --- a/resources/tester/test_spreadsheet_touch.py +++ b/resources/tester/test_spreadsheet_touch.py @@ -10,7 +10,9 @@ import urllib.request import pytest -BASE = "http://localhost:5174" +from helper_verify_project import own_ports # noqa: E402 + +BASE = own_ports()[1] # 화면 서버 = OWNERS.md 이 폴더 줄 MOUNT = """ async () => { diff --git a/resources/tester/test_touch_bridge.py b/resources/tester/test_touch_bridge.py index d6c6b4f88..98a5bd50d 100644 --- a/resources/tester/test_touch_bridge.py +++ b/resources/tester/test_touch_bridge.py @@ -13,7 +13,9 @@ import urllib.request import pytest -BASE = os.environ.get("AISLO_UI_BASE", "http://localhost:5174") # 다른 창 서버 = 환경값 +from helper_verify_project import own_ports # noqa: E402 + +BASE = os.environ.get("AISLO_UI_BASE", own_ports()[1]) # 다른 창 서버 = 환경값 def _up() -> bool: