Skip to content

Refactor holoviews backend: unify tap logic, time HoloMaps, and filter usage#754

Open
blooop wants to merge 3 commits intomainfrom
claude/refactor-holoviews-backend
Open

Refactor holoviews backend: unify tap logic, time HoloMaps, and filter usage#754
blooop wants to merge 3 commits intomainfrom
claude/refactor-holoviews-backend

Conversation

@blooop
Copy link
Copy Markdown
Owner

@blooop blooop commented Mar 6, 2026

Summary

  • Extract duplicated PointerXY tap/hover handler from LineResult and HeatmapResult into _build_tap_plot() on the HoloviewResult base class
  • Extract duplicated over_time HoloMap iteration loop into _build_time_holomap() on the base class
  • Unify ScatterResult to use self.filter() instead of PlotFilter directly and add result_var parameter for consistency
  • Remove dead commented-out code (ScatterResult, LineResult, HeatmapResult)
  • Remove redundant to_heatmap_single() that bypassed the filter pipeline
  • Fix layout_plots() bug that called plot_callback twice per result var
  • Collapse redundant to_plot/to_X delegation: to_X is the implementation, to_plot is a thin alias
  • Net reduction of ~226 lines with no behavioral changes

Based on PR #750.

Test plan

  • All 435 tests pass (4 skipped)
  • Formatting clean (ruff format)
  • Linting clean (ruff check + pylint)
  • 89% code coverage maintained

🤖 Generated with Claude Code

…r usage

- Extract duplicated PointerXY tap/hover handler from LineResult and
  HeatmapResult into _build_tap_plot() on the HoloviewResult base class
- Extract duplicated over_time HoloMap iteration loop into
  _build_time_holomap() on the base class
- Unify ScatterResult to use self.filter() instead of PlotFilter directly
  and add result_var parameter for consistency
- Remove dead commented-out code (ScatterResult, LineResult, HeatmapResult)
- Remove redundant to_heatmap_single() that bypassed the filter pipeline
- Fix layout_plots() bug that called plot_callback twice per result var
- Collapse redundant to_plot/to_X delegation: to_X is the implementation,
  to_plot is a thin alias (preserves MRO safety with BenchResult)
- Net reduction of ~226 lines with no behavioral changes
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @blooop, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

Resolve conflicts keeping main's evolved holoviews helpers
(_build_curve_overlay, _build_time_holomap with subsampling/aggregation,
_mean_over_time, widget_location support) while layering on the PR's
improvements:

- Extract duplicated PointerXY tap handler into _build_tap_plot() on
  the HoloviewResult base class
- Simplify to_plot() wrappers to thin **kwargs passthroughs
- Replace to_heatmap_container_tap_ds / to_line_tap_ds with
  _to_heatmap_tap_ds / _to_line_tap_ds using _build_tap_plot
- Refactor ScatterResult to use self.filter() instead of PlotFilter
- Remove to_heatmap_single (bypassed the filter pipeline)
- Remove dead commented-out code in ScatterResult
- Fix layout_plots() calling plot_callback twice per result var
- Remove tests for deleted to_heatmap_single method
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

Performance Report for 904d5b9

Metric Value
Total tests 1204
Total time 105.31s
Mean 0.0875s
Median 0.0020s
Top 10 slowest tests
Test Time (s)
test.test_bench_examples.TestBenchExamples::test_example_meta 21.045
test.test_over_time_save_perf::test_save_faster_without_aggregated_tab 5.116
test.test_hash_persistent.TestCrossProcessDeterminism::test_hash_stable_across_two_processes[ResultBool] 3.832
test.test_over_time_repeats.TestMaxSliderPoints::test_default_subsampling_caps_at_max 3.124
test.test_generated_examples::test_generated_example[cartesian_animation/example_cartesian_animation.py] 3.043
test.test_generated_examples::test_generated_example[result_types/result_image/example_result_image_to_video.py] 2.802
test.test_bencher.TestBencher::test_combinations_over_time 1.423
test.test_optuna_result.TestOptunaResult::test_collect_optuna_plots_with_repeats 1.053
test.test_over_time_repeats.TestCurveResultOverTime::test_curve_over_time_no_repeats 1.048
test.test_bencher.TestBencher::test_bench_cfg_hash 0.943

Full report

Updated by Performance Tracking workflow

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

Performance Report for dee478c

Metric Value
Total tests 1204
Total time 103.99s
Mean 0.0864s
Median 0.0020s
Top 10 slowest tests
Test Time (s)
test.test_bench_examples.TestBenchExamples::test_example_meta 20.884
test.test_over_time_save_perf::test_save_faster_without_aggregated_tab 5.031
test.test_hash_persistent.TestCrossProcessDeterminism::test_hash_stable_across_two_processes[ResultBool] 3.814
test.test_over_time_repeats.TestMaxSliderPoints::test_default_subsampling_caps_at_max 3.081
test.test_generated_examples::test_generated_example[cartesian_animation/example_cartesian_animation.py] 3.047
test.test_generated_examples::test_generated_example[result_types/result_image/example_result_image_to_video.py] 2.802
test.test_bencher.TestBencher::test_combinations_over_time 1.404
test.test_optuna_result.TestOptunaResult::test_collect_optuna_plots_with_repeats 1.040
test.test_over_time_repeats.TestCurveResultOverTime::test_curve_over_time_no_repeats 1.020
test.test_over_time_repeats.TestMaxSliderPoints::test_no_subsampling_when_below_default_max 0.925

Full report

Updated by Performance Tracking workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant