auto: 2026-10-21 17:23 (ESD_LAPTOP)
This commit is contained in:
@@ -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 "", ""
|
||||
|
||||
@@ -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 = ["파일입력", "전처리", "종단설계"]
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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 = (
|
||||
|
||||
@@ -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"
|
||||
|
||||
# 앱 스크립트보다 먼저 — 설정 키에 쓰는 횟수를 셈
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user