feat(826-2): M01 기계 = 한 대 한 파일 · M01 저장 길 줄이기
- 기계.json 한 파일 → 폴더 기계/(EQ 키마다 파일 + _머리.json · 차례 = 키 차례) · 옮긴 빌더 build_기계폴더_826_2 (655 대 머리 · 줄 · 차례 대조 뒤 옛 파일 지움) - 읽기 도우미 master_machine_files — cm.load · Store_Cache · Store.read 가 옛 「기계.json」 한 표 꼴로 지어 줌(API · 화면 · 색인 그대로) · 쓰기 = 바뀐 대 파일만 - 기계.json 직접 열던 곳 도우미로: M02_San_Basis_Index · M02_Logic_Standard 지문 · build_용도 · master_keys.adopt · _틀 · _갱신절차 - 저장 몸 M01_MasterData_Store_Save — 전 = 기억 · 후 = 고친 파일만 얕은 사본 · 틀은 고친 줄만 · 조합 · 일위대가 문서는 로직 줄이 빠질 때만 · 재료 찾기 기억 이어받음 · 저장 뒤 쓴 파일만 기억에 갈아 끼움 - 마스터 사본 시험 22 개 = 기계 폴더도 복사 · 821_2 · 815_2 글 대조 = 대 파일 하나 대조(옛 한 파일 글 대조 낡음) - 새 시험 test_826_2 — 폴더 = 한 표 · 한 대 한 파일 · 새 · 지움 · 409 · 옛 길과 같은 오류 스무 견본 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
from decimal import Decimal
|
||||
@@ -33,6 +32,7 @@ import master_basis as mbs # noqa: E402
|
||||
import master_combo as mcb # noqa: E402
|
||||
import master_formula as mf # noqa: E402
|
||||
import master_keys as mk # noqa: E402
|
||||
import master_machine_files as mmf # noqa: E402
|
||||
|
||||
# (2) 본문은 따로 모듈 — 부르는 쪽은 `cm.check_body` · `cm.DIVISIONS` 그대로
|
||||
from check_master_body import DIVISIONS, check_body # noqa: E402, F401
|
||||
@@ -164,14 +164,10 @@ def _detail(name: str) -> str:
|
||||
def load(names: list[str] | None = None, folder: Path = MASTER) -> dict[str, dict]:
|
||||
"""첫 층 JSON 모두(밑줄 파일 빼고) — 수는 Decimal. `folder` = 마스터 폴더(M01 시험은 사본)."""
|
||||
out = {}
|
||||
for path in sorted(Path(folder).glob("*.json")):
|
||||
if path.name.startswith("_") or (
|
||||
names and path.name not in names and path.stem not in names
|
||||
):
|
||||
for name in mmf.names(folder): # 기계는 폴더(826-2) — 옛 한 파일 꼴 「기계.json」 으로 읽음
|
||||
if name.startswith("_") or (names and name not in names and Path(name).stem not in names):
|
||||
continue
|
||||
out[path.name] = json.loads(
|
||||
path.read_text(encoding="utf-8"), parse_float=Decimal, parse_int=Decimal
|
||||
)
|
||||
out[name] = mmf.read(folder, name)
|
||||
return out
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user