feat(ontology): 本体 spec 与跨引用校验

- pydantic 模型覆盖 entities/links/actions/functions/rules/constraints
- 跨引用校验:link.from/to 实体存在、rule.via 链路连得通且终点与 to 一致
- YAML 1.2 口径 loader:on/off/yes/no 不再被当成布尔(否则 on: Line 解析成 {True: Line})
- of 支持标量类型或实体名;属性支持 accepted: boolean 简写
- 19 条测试,其中 test_readme_example_loads 直接解析 README 里的 YAML
- dev 组补 types-pyyaml,mypy strict 通过
This commit is contained in:
Donny committed 2026-11-05 02:36:25 +08:00
1 parent e0bea0c54f
commit cc0d80ba3a
4 files changed
+598

No files matched your search

+1
View File
@@ -25,6 +25,7 @@ dev = [
"testcontainers[postgres]>=4.8",
"ruff>=0.8",
"mypy>=1.13",
"types-pyyaml>=6.0.12",
]
[build-system]