Skip to content

feat(paired-t-test): migrate paired_ttest chart to v1 chart data API - #41721

Merged
rusackas merged 2 commits into
remove-legacy-viz-pipelinefrom
legacy-viz-t2-paired-ttest
Jul 3, 2026
Merged

feat(paired-t-test): migrate paired_ttest chart to v1 chart data API#41721
rusackas merged 2 commits into
remove-legacy-viz-pipelinefrom
legacy-viz-t2-paired-ttest

Conversation

@rusackas

@rusackas rusackas commented Jul 3, 2026

Copy link
Copy Markdown
Member

SUMMARY

Tier 2 of #41714 (targets remove-legacy-viz-pipeline): migrate the Paired t-test Table (paired_ttest) off explore_json onto /api/v1/chart/data.

  • New buildQuery.ts mirroring the legacy PairedTTestViz.query_obj: timeseries query (is_timeseries: true) grouped by the group columns, sort metric appended to the select list, orderby under order_desc, residual order_by_cols ignored.
  • The pandas pivot_table reshape from get_data is ported to a transformData helper: one series per (metric, group tuple), {x, y} points on the union of timestamps with missing combinations padded with null, group order matching the sorted pandas pivot columns, All group when ungrouped.
  • useLegacyApi: true removed (and the "Legacy" tag dropped).
  • No DB migration: viz_type unchanged; legacy granularity_sqla/time_range handled by extractExtras (covered by test).

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

No visual change — same renderer, same data shape, different endpoint.

TESTING INSTRUCTIONS

  • npm run test -- plugins/legacy-plugin-chart-paired-t-test — 7 Jest tests (timeseries query shape, sort-metric append, orderby ownership, null padding, multi-metric/multi-group nesting, timestamp ordering, All group).
  • Manual: open a saved Paired t-test Table; network tab shows POST /api/v1/chart/data; p-values/lift values identical.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
  • Introduces new feature or API
  • Removes existing feature or API

🤖 Generated with Claude Code

Adds a buildQuery mirroring the legacy PairedTTestViz.query_obj (a
timeseries query grouped by the group columns, sort metric appended
with ordering under order_desc) and ports the pandas pivot_table
reshape from the backend get_data into a transformData helper: one
series per (metric, group tuple) with missing timestamps padded with
null. Legacy pre-shaped payloads pass through untouched.

No DB migration needed: viz_type is unchanged and legacy
granularity_sqla/time_range form data flows through extractExtras.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dosubot dosubot Bot added api Related to the REST API viz:charts Namespace | Anything related to viz types labels Jul 3, 2026
@github-actions github-actions Bot added plugins and removed api Related to the REST API viz:charts Namespace | Anything related to viz types labels Jul 3, 2026
@bito-code-review

bito-code-review Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Bito Automatic Review Skipped - Branch Excluded

Bito didn't auto-review because the source or target branch is excluded from automatic reviews.
No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
You can change the branch exclusion settings here, or contact your Bito workspace admin at evan@preset.io.

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.52459% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.63%. Comparing base (c6242a6) to head (4583851).
⚠️ Report is 5 commits behind head on remove-legacy-viz-pipeline.

Files with missing lines Patch % Lines
...y-plugin-chart-paired-t-test/src/transformProps.ts 0.00% 5 Missing ⚠️
...ins/legacy-plugin-chart-paired-t-test/src/index.ts 0.00% 1 Missing ⚠️
...cy-plugin-chart-paired-t-test/src/transformData.ts 97.56% 1 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##           remove-legacy-viz-pipeline   #41721      +/-   ##
==============================================================
+ Coverage                       64.62%   64.63%   +0.01%     
==============================================================
  Files                            2684     2686       +2     
  Lines                          148431   148491      +60     
  Branches                        34249    34264      +15     
==============================================================
+ Hits                            95930    95984      +54     
- Misses                          50739    50745       +6     
  Partials                         1762     1762              
Flag Coverage Δ
javascript 69.41% <88.52%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

JSON-key string sorting misordered numeric groups (10 before 2), which
changes row order and the default control group. Tuples now compare
element-wise with numeric awareness, matching the pandas pivot column
ordering.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rusackas
rusackas merged commit 24d5bad into remove-legacy-viz-pipeline Jul 3, 2026
57 checks passed
@rusackas
rusackas deleted the legacy-viz-t2-paired-ttest branch July 3, 2026 05:46
rusackas added a commit that referenced this pull request Jul 7, 2026
rusackas added a commit that referenced this pull request Jul 7, 2026
rusackas added a commit that referenced this pull request Jul 8, 2026
rusackas added a commit that referenced this pull request Jul 10, 2026
rusackas added a commit that referenced this pull request Jul 13, 2026
rusackas added a commit that referenced this pull request Jul 14, 2026
rusackas added a commit that referenced this pull request Jul 15, 2026
rusackas added a commit that referenced this pull request Jul 15, 2026
rusackas added a commit that referenced this pull request Jul 16, 2026
rusackas added a commit that referenced this pull request Jul 17, 2026
rusackas added a commit that referenced this pull request Jul 20, 2026
rusackas added a commit that referenced this pull request Jul 20, 2026
rusackas added a commit that referenced this pull request Jul 20, 2026
rusackas added a commit that referenced this pull request Jul 21, 2026
rusackas added a commit that referenced this pull request Jul 21, 2026
rusackas added a commit that referenced this pull request Jul 23, 2026
rusackas added a commit that referenced this pull request Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants