feat(#55): Ti 行业布局模板(四状态流程视图)+ layout_validator
纯标准库实现,对齐 PRD 5.5「⑤ 配置化驾驶舱」iAOP-cockpit-layout-v1: - cockpit.ti.yaml:海绵钛四状态工艺流程(氯化→精制→还原→蒸馏), process_view 主视图声明 stages 覆盖,trend/kpi_card bind 对齐 point_dict.default.csv 的 point_id(CLF-01/RF-01/E-01/ST-01)。 - layout_validator.py:LayoutValidator 校验 widget 类型合法、12 列网格 不越界、bind point_id 在点位字典内、四状态覆盖完整(order 单调/id 唯一); 零依赖 YAML 子集解析(复制 impurity-forecast _parse_yaml_subset)。 - tests:18 用例覆盖真实资产端到端、非法类型、网格越界/负坐标/零宽、 bind 漂移、缺 process_view、缺必需状态、order 非单调、stage 重复、 $schema 头、CSV 加载、空布局。 - _sanity_check.py:冒烟验证 9 widgets 全校验通过。
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""海绵钛驾驶舱布局资产 + 校验器包(Issue #55)。
|
||||
|
||||
对齐 PRD 5.5「⑤ 配置化驾驶舱」布局 JSON Schema(iAOP-cockpit-layout-v1):
|
||||
四状态工艺流程(氯化 → 精制 → 还原 → 蒸馏)。
|
||||
"""
|
||||
from .layout_validator import (
|
||||
LayoutError,
|
||||
LayoutIssue,
|
||||
LayoutReport,
|
||||
LayoutValidator,
|
||||
WidgetSpec,
|
||||
ALLOWED_WIDGET_TYPES,
|
||||
GRID_COLUMNS,
|
||||
REQUIRED_STAGES,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"LayoutError",
|
||||
"LayoutIssue",
|
||||
"LayoutReport",
|
||||
"LayoutValidator",
|
||||
"WidgetSpec",
|
||||
"ALLOWED_WIDGET_TYPES",
|
||||
"GRID_COLUMNS",
|
||||
"REQUIRED_STAGES",
|
||||
]
|
||||
Reference in New Issue
Block a user