feat(cli): add title override for col-axis charts#245
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe CLI and REST conversion paths accept an optional chart title, propagate it into core column-axis processing, apply it to single-chart statistics, and warn or reject unsupported configurations. API schemas, tests, and CSV documentation cover the new behavior. ChangesChart title override
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant CLIorREST
participant ApplyColAxis
participant Dataset
Client->>CLIorREST: Provide title and column-axis options
CLIorREST->>ApplyColAxis: Pass title with grouped data
ApplyColAxis->>Dataset: Set expanded stat types
ApplyColAxis-->>CLIorREST: Return transformed data or warning/error
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
f2439e9 to
39854ab
Compare
|
Hi @fahimfaisaal can code rabbit enable again for review ? Thanks |
|
@coderabbitai please review again |
|
✅ Action performedFull review finished. |
fahimfaisaal
left a comment
There was a problem hiding this comment.
@hfl0506 We need to change the API layer as well.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/core/core.go`:
- Around line 222-224: Update the mode validation around IsSelectAxis and
IsMultiStat in the relevant configuration logic so multi-stat inputs with
--col-axis are rejected via the existing ignored-option warning/error and their
existing stat types remain unchanged; adjust the predicate accordingly. Add a
regression test covering --title combined with --col-axis in multi-stat mode,
verifying the warning/error and preserved stat types.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: b1eef9e7-1abe-4480-9dc8-770184c7e643
📒 Files selected for processing (7)
api/openapi.yamlapi/openapi_test.gocmd/cli/pipeline.gocmd/serve_contract.gocmd/serve_test.gopkg/core/core.gopkg/core/core_test.go
Hi @fahimfaisaal I changed API layer accordingly. please take a look when you have a chance. Thanks |
|
@hfl0506 We missed the action update. need to add new title prop at action.yml, could you create another PR for this missing part? thanks |
Yes. I can create another MR for the action change |
Related Issue
Closes #237
Changes
Added --title (no shorthand) for group + --col-axis
charts.
Keeps -n as the dataset/page name; --title sets
expanded stats[].type.
Successful col-axis output stays one chart; JSON
emits the custom stat type.
Without --title, behavior is unchanged: empty type
falls back to -n.
Unsupported uses warn once and do not alter existing
types.
Multi-stat --select … (Title) behavior remains
unchanged.
Added pipeline/flag tests and concurrency example
documentation.
Test Result
# before test initial task init task lint:cli task test:cliCase 1
Case 2
Case 3
Case 4
Summary by CodeRabbit
--titleCLI option to control chart titles for eligible column-axis outputs.titleand structuredgrouping.colAxis, including updated conversion examples.titleflows through conversion correctly, including “applies” vs “ignored” warnings, and improved column-axis validation/behavior.concurrency.csvexample to document separate page and chart titles.titleandcolAxisbehavior and validation paths.