Merged
fix word root check #745
Fimon12138Add on 1 day ago
fix word root check #745
Merged
Merged fromFimon12138/dataagentmainintodatagallery/dataagentmain
Fimon12138Collaborators
1 day ago
1 day ago


Pull Request has been successfully merged by luoyang42.
(Thank you for Fimon12138's contribution.)atomgit-bot
1 day ago Comments:
1 day ago Comments:
变更摘要
本 PR 修复词根校验中“单条词根必须是一个原子词”的约束:在 dataagent/plugins/de-agent/utils/word_root_validator.py 的 validate_word_roots 输入校验阶段新增下划线检测,若 english_name 含 _ 则直接抛出 ValueError,并同步更新该函数与 dataagent/plugins/de-agent/tools/word_roots.py 中同名工具 validate_word_roots 的文档说明,明确要求调用方先拆分完整标识符、为每个词根单独提供描述。
主要改动
- 新增下划线输入校验: 在
word_root_validator.py的validate_word_roots逐项校验逻辑中,于非空字符串检查之后新增"_" in english_name判断,命中时抛出ValueError,使含下划线的复合标识符无法通过校验。 - 错误提示引导拆分词根: 抛出的异常信息明确要求将标识符拆分为多个词根,并为每个词根提供描述,便于调用方定位并修正入参。
- 工具层文档契约收紧:
dataagent/plugins/de-agent/tools/word_roots.py中工具validate_word_roots的 docstring 由“每项可选chinese_description”改为“每项为一个原子词根、拒绝下划线、需先拆分并为每个词根提供描述”。 - 校验函数文档同步:
word_root_validator.py的核心函数 docstring 补充“单一原子english_name”与“下划线被拒绝”的说明,使接口文档与新增的运行时校验行为保持一致。


Incorrect?
atomgit-bot
1 day ago Comments:
1 day ago Comments:
atomgit-bot
1 day ago Comments:
1 day ago Comments:
1 day ago Added label: ci-pipeline-running
13 event messages are collapsed here。 See more
1 day ago Added label: ci-pipeline-running
DataGalleryBot
1 day ago Comments:
1 day ago Comments:
| Project Name | Build Result | Details |
|---|---|---|
| gitcode-gate-dataagent | ✅ SUCCESS | 1873 |
NOTE: You can comment /rebuild to retrigger the pipeline again.


1 day ago Approval passed
1 day ago Removed label: ci-pipeline-running
1 day ago Added label: ci-pipeline-passed
1 day ago Merged pull request, merge node SHA: 5a09daaf0eba1b66d994afe066dd8e7ec29b8996