refactor(855-E 2-E4 ㉯-3 ⑤): 옛 수식 탭 무리 지움 — M01 Equation · Sangeun_Formula · master_equation 다섯

- git rm: M01_MasterData_Equation(서버 길 없음 · 제품 부름 0 · 시험만) · M02_Sangeun_Formula(_catch · _eng 파서 · 식 글 번역 — 부르는 곳 = M01 Equation 뿐) · scripts master_equation · _edit · _group · _view · _sign(서로 · 위 둘 · 시험만 부름)
- master_symbol: M02_San_ToDoc 이 쓰는 SUBMAX · lookup(+ rule · short) 만 남김 — 옛 수식 내보내기 기호 씌우기(apply · _walk · family_name · is_symbol · SYMBOL · FAMILY) 지움
- 남김: master_equation_link(M01 Doc 새 기호 연결 후보) · ui_template_equation*(새 줄 쌓기 eqText) · M02_Sangeun_Equation(옛 칸 수식고침 받으면 400 지킴 — 엔진 몸 아님 · 동작)
- 시험: test_796_1 · 799_1 · 800_5 · 801_3 git rm(옛 수식 나무 · 묶음 · 기호 모델만 봄) · 792_1 식 글 번역 · 상한 둘 지움(옛 SK 식 칸 막음 · 초기화 · 지문 그대로) · 800_2 = 새 기호 연결 후보만(로직 갈래 → 단가산출 갈래 · 옛 수식 탭 · 화면 소스 글자 시험 지움)
- 죽은 주석: Sangeun_Copy · Sangeun_Equation · master_doc_trace · master_equation_link
- 서버 길 469 → 469(길 없던 모듈) · typecheck 0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 15:23:01 +09:00
co-authored by Claude Opus 5.5
parent 548fc3d00a
commit 4c17c8ff13
18 changed files with 14 additions and 2414 deletions
-57
View File
@@ -1,57 +0,0 @@
"""M01 수식 탭 서버 몫(PLAN 796-1 · 요구 655 · 657) — 수식 나무 읽기 · 고침 미리 셈 · 저장.
모델 = `scripts/master_equation.py`(나무 · 변수 표) · `master_equation_edit.py`(고침 · 검사) ·
키보드 글 번역 · 상한 = M02 단가산출 식 칸과 한 벌(`M02_Sangeun_Formula` 불러 씀 · 고치지 않음) ·
셈 = 엔진 한 벌(③ 서버 단독 · 브라우저 값 받아 적지 않음) · 저장 = 기존 M01 `/save`(개정확인) ·
M02 사본(795-1)은 `edit_row` 를 사본 줄로 부름 · `export_row` 는 시험(796-1 · 800-2)의 수식 모델 바탕(옛 엔진 은퇴 때 같이).
"""
from __future__ import annotations
from typing import Any
from M01_MasterData import M01_MasterData_Store as store
_ERR = (store.cm.mf.FormulaError, ArithmeticError, KeyError, TypeError, ValueError)
import master_equation as meq # noqa: E402 — `store` 가 scripts 를 길에 둔 뒤
import master_equation_edit as me # noqa: E402
def _fx() -> Any:
from M02_MasterTemplete import M02_Sangeun_Formula as fx # M02 가 M01 을 부름 — 늦게
return fx
def words(text: str, row: dict) -> tuple[str, list[str]]:
"""층 번역 — 상한(길이 · 괄호) · `[노임 …]` · `[별칭]` → 엔진 식."""
fx = _fx()
if bad := fx.limits(text):
return text, bad
return fx.to_engine(text, row)
def _given(inputs: dict | None) -> dict:
return {k: store._dec(v) for k, v in (inputs or {}).items()}
def _typed(eq: dict, row: dict) -> dict:
"""줄마다 `입력글` = 키보드 한 줄 식(이름 꼴 · 변수 글) — 식 칸 처음 글."""
fx = _fx()
for line in eq.get("줄") or []:
if line.get("식"):
line["입력글"] = me.keyboard_of(fx.to_name(str(line["식"]), row), row)
return eq
def export_row(whole, row: dict, inputs: dict | None = None) -> dict:
"""로직 줄(정본 · 사본) → 수식 — 마스터에 그 줄을 얹어 셈."""
eq = meq.export(me.swap(whole, row), str(row.get("키")), _given(inputs))
return _typed(eq, row)
def edit_row(whole, row: dict, edits: list) -> tuple[dict, list[str]]:
"""고침 → (새 줄, 까닭) — 까닭 있으면 저장 안 됨(M01 · M02 사본 같은 함수)."""
new, why, _ = me.apply(whole, row, edits, words)
return new, why