[feature] deg改进为规则引擎#228
Closed
fatsheep2 wants to merge 25 commits into
Closed
Conversation
|
To use Codex here, create a Codex account and connect to github. |
Contributor
Author
|
@gaocegege @Triple-Z @deb-sig/generator-dev need review 我测试了一下没有什么问题,主要是新增的通用provider,config init从模板仓库下拉对应provider的个人规则骨架,deg template list可以看模板仓库内所有可用的provider,修改后使用deg import --rules <个人规则文件>.yaml ...(和原来参数差不多,beancount/ledget,选择账本,输出文件) 这样的好处就是可以尽量用通用规则去描述不同provider的规则,对于review来说减轻很多压力,同时也避免了原来的各家方言的情况,也比较有利于社区参与deg的贡献 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
本 PR 增加运行时模板规则引擎和外部 provider template registry 支持,并将主库中的 provider 模板迁移到独立的
deg-provider-template仓库维护。主要变化包括:
未关联 issue。
Motivation and Context
此前 provider 专用导入逻辑、模板数据和主库耦合较重。模板更新需要修改 DEG 主库,也容易出现主库和模板仓库两份模板不一致的问题。
新的结构中,DEG 主库只负责解释器、运行时规则引擎、CLI 和 registry 加载能力;
deg-provider-template负责维护 provider 模板、starter rules、样例账单、expected 输出和模板回归测试。Dependencies
本 PR 需要配合模板仓库 PR:
deg-provider-template@codex/runtime-template-sync建议先合并本 DEG runtime PR,再合并模板仓库 PR。模板仓库 CI 默认从 DEG
main安装并运行全量模板验证。Type of change
How has this been tested?
go test ./...