refactor(b09): 라우터 쪼개기 — 산출 조건 문(GET/PUT /estimation/factors)을 Router_Factors 로 · Router.py 842 → 537줄

- get_bill · _project_root_of · _build_for 는 Router.py 에 그대로(랩탑_메인 CostSheet import 그대로)
- 새 파일은 본 라우터의 _project_root_of·_build_for 를 부를 때마다 빌려 씀 — 시험이 본 라우터 것을 바꿔 끼움
- 검증: 시험 1666 통과 · 골든셋 초록 · 재시작 뒤 B09 문 열하나(factors·base-data·price-sources·basis-sheet·machine-expense·
  design-doc-index·bill·unit-prices·edits·cost-sheet·PUT factors) 전부 200

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016VBGFXB9AbJBwXP19z75Qq
This commit is contained in:
2026-09-14 03:24:53 +09:00
co-authored by Claude Opus 5
parent 6cfcafc2f4
commit b02c51db71
4 changed files with 339 additions and 307 deletions
+3 -2
View File
@@ -129,13 +129,14 @@ def test_칸을_저장했다_지웠다_할_수_있다(tmp_path, monkeypatch) ->
돌아갈 수 없다.
"""
from B09_Estimation import B09_Estimation_Router as router
from B09_Estimation import B09_Estimation_Router_Factors as factors
project_id = uuid4()
monkeypatch.setattr(router, "_project_root_of", _fake_root(str(tmp_path)))
def _put(value: str):
body = router.FactorChoiceBody(misc_material_percent=value)
got = asyncio.run(router.put_factor_choices(project_id, body))
body = factors.FactorChoiceBody(misc_material_percent=value)
got = asyncio.run(factors.put_factor_choices(project_id, body))
return got.status_code, json.loads(got.body.decode())
from common_util.common_util_project_settings import estimation_settings