Skip to content

[fel] add key scenario cases #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: 3.5.x
Choose a base branch
from

Conversation

loveTsong
Copy link
Contributor

@loveTsong loveTsong commented Jun 16, 2025

🔗 相关问题 / Related Issue

Issue 链接 / Issue Link: #167

  • 我已经创建了相关 Issue 并进行了讨论 / I have created and discussed the related issue
  • 这是一个微小的修改(如错别字),不需要 Issue / This is a trivial change (like typo fix) that doesn't need an issue

📋 变更类型 / Type of Change

  • 🐛 Bug 修复 / Bug fix (non-breaking change which fixes an issue)
  • ✨ 新功能 / New feature (non-breaking change which adds functionality)
  • 💥 破坏性变更 / Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 文档更新 / Documentation update
  • 🔧 重构 / Refactoring (no functional changes)
  • ⚡ 性能优化 / Performance improvement
  • 🧹 代码清理 / Code cleanup

📝 变更目的 / Purpose of the Change

增加关键示例用于突出核心特性

📋 主要变更 / Brief Changelog

  • 增加when then的条件分支用法。
  • 增加三个示例突出在流式处理、背压和并发的特性。

🧪 验证变更 / Verifying this Change

测试步骤 / Test Steps

  1. 运行示例
  2. 示例运行全部通过

测试覆盖 / Test Coverage

  • 我已经添加了单元测试 / I have added unit tests
  • 所有现有测试都通过 / All existing tests pass
  • 我已经进行了手动测试 / I have performed manual testing

📸 截图 / Screenshots

✅ 贡献者检查清单 / Contributor Checklist

请确保你的 Pull Request 符合以下要求 / Please ensure your Pull Request meets the following requirements:

基本要求 / Basic Requirements:

  • 确保有 GitHub Issue 对应这个变更(微小变更如错别字除外)/ Make sure there is a Github issue filed for the change (trivial changes like typos excluded)
  • 你的 Pull Request 只解决一个 Issue,没有包含其他不相关的变更 / Your PR addresses just this issue, without pulling in other changes - one PR resolves one issue
  • PR 中的每个 commit 都有有意义的主题行和描述 / Each commit in the PR has a meaningful subject line and body

代码质量 / Code Quality:

  • 我的代码遵循项目的代码规范 / My code follows the project's coding standards
  • 我已经进行了自我代码审查 / I have performed a self-review of my code
  • 我已经为复杂的代码添加了必要的注释 / I have commented my code, particularly in hard-to-understand areas

测试要求 / Testing Requirements:

  • 我已经编写了必要的单元测试来验证逻辑正确性 / I have written necessary unit-tests to verify the logic correction
  • 当存在跨模块依赖时,我尽量使用了 mock / I have used mocks when cross-module dependencies exist
  • 基础检查通过:mvn -B clean package -Dmaven.test.skip=true,elsa README 中的编译检查 / Basic checks pass
  • 单元测试通过:mvn clean install / Unit tests pass

文档和兼容性 / Documentation and Compatibility:

  • 我已经更新了相应的文档 / I have made corresponding changes to the documentation
  • 如果有破坏性变更,我已经在 PR 描述中详细说明 / If there are breaking changes, I have documented them in detail
  • 我已经考虑了向后兼容性 / I have considered backward compatibility

📋 附加信息 / Additional Notes


审查者注意事项 / Reviewer Notes:

@loveTsong loveTsong self-assigned this Jun 16, 2025
@loveTsong loveTsong added the in: fel Issues in FEL(FIT Expression for LLM) modules label Jun 16, 2025
@loveTsong loveTsong added this to Nova Jun 16, 2025
@loveTsong loveTsong added the in: waterflow Issues in Waterflow modules label Jun 16, 2025
@loveTsong loveTsong linked an issue Jun 16, 2025 that may be closed by this pull request
4 tasks
@loveTsong loveTsong linked an issue Jun 16, 2025 that may be closed by this pull request
4 tasks
@loveTsong loveTsong force-pushed the fel-improvement-key-examples branch from 84a3f9d to aef2f0b Compare June 16, 2025 14:47
@loveTsong loveTsong force-pushed the fel-improvement-key-examples branch from aef2f0b to 707cbf0 Compare June 16, 2025 14:56
@loveTsong loveTsong changed the base branch from main to 3.5.x June 17, 2025 01:16
@CodeCasterX CodeCasterX added the type: task A general task label Jun 17, 2025
@CodeCasterX CodeCasterX added this to the 3.5.0 milestone Jun 17, 2025

private final F flow;

public AiWhenHappen(WhenHappen<O, D, I, RF> matchHappen, F flow) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

发布的注释检查会检查public构造函数的注释

*/
public class AiFlowCaseTest {
private static final int SPEED = 1;
@Nested
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

测试嵌套类前需要空一行

.close();

@Test
void run() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

当前文件下的多个类似的方法,缺少对当前测试方法测试场景的描述

counter.incrementAndGet();
}).offer(Tip.fromArray("hi"));
result.await();
System.out.printf("time:%s, cost=%s\n", System.currentTimeMillis(), System.currentTimeMillis() - startTime);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

正式的测试过程中,不应该打印输出到控制台

@@ -160,6 +160,7 @@ public class To<I, O> extends IdGenerator implements Subscriber<I, O> {
*/
private Operators.Produce<FlowContext<I>, O> produce;

private volatile int maxConcurrency = MAX_CONCURRENCY;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

变量下面空一行

@CodeCasterX CodeCasterX force-pushed the 3.5.x branch 3 times, most recently from 49c246c to a2e727a Compare June 20, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: fel Issues in FEL(FIT Expression for LLM) modules in: waterflow Issues in Waterflow modules type: task A general task
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

FEL关键示例编写
2 participants