refactor build parameter of hgraph tests#997
Conversation
|
Important Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services. |
Reviewer's GuideThis PR replaces the long argument list for building HGraph test parameters with a dedicated HGraphBuildParam struct, updates the GenerateHGraphBuildParametersString interface and implementation to use this struct, and refactors all test call sites accordingly. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @inabao - I've reviewed your changes - here's some feedback:
- The new HGraphBuildParam struct currently relies on a free function to serialize itself—consider moving GenerateHGraphBuildParametersString into a member like toString() to encapsulate serialization and simplify the API.
- There’s a lot of repetitive build_param setup in the tests; adding helper functions or chainable builder methods (e.g. withSupportRemove(), withGraphType()) would DRY up the boilerplate and make individual tests more concise.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new HGraphBuildParam struct currently relies on a free function to serialize itself—consider moving GenerateHGraphBuildParametersString into a member like toString() to encapsulate serialization and simplify the API.
- There’s a lot of repetitive build_param setup in the tests; adding helper functions or chainable builder methods (e.g. withSupportRemove(), withGraphType()) would DRY up the boilerplate and make individual tests more concise.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
1eeafa3 to
7be57dd
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #997 +/- ##
==========================================
- Coverage 91.83% 91.67% -0.17%
==========================================
Files 294 294
Lines 17069 17069
==========================================
- Hits 15676 15648 -28
- Misses 1393 1421 +28
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
Important Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services. |
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com>
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com> Signed-off-by: LHT129 <tianlan.lht@antgroup.com>
Signed-off-by: jinjiabao.jjb <jinjiabao.jjb@antgroup.com> Signed-off-by: Sia Sheerland <x1075956441x@163.com> Signed-off-by: Sia Sheerland <x1075956441x@163.com>
Summary by Sourcery
Refactor HGraph tests to consolidate build parameters into a struct, simplify function signatures, and update all test invocations accordingly.
Enhancements: