positron icon indicating copy to clipboard operation
positron copied to clipboard

Fix hvplot chunk-execution display

Open nstrayer opened this issue 7 months ago • 1 comments

Addresses #5991.

@:plots @:notebooks

Fixes hvplot plots failing to render when executed as a block in Positron's console. The issue occurred because HoloViews detected block execution as a "repeat execution" and instructed Panel to skip loading dependencies (https://github.com/holoviz/holoviews/blob/main/holoviews/ipython/init.py#L147), but Positron's fresh webviews need all dependencies loaded every time. Added an e2e test to ensure block execution continues to work correctly.

Release Notes

New Features

  • N/A

Bug Fixes

  • Fixed hvplot plots not displaying when code is executed as a block in the console

QA Notes

Run the following code as a block (select all lines and execute). The scatter plot should display correctly.

import hvplot.pandas
import pandas as pd
hvplot.extension('plotly')
pd.DataFrame(dict(x=[1,2,3], y=[4,5,6])).hvplot.scatter(x="x", y="y")

Previously, this would fail with no plot output. Now it should display an interactive scatter plot.

nstrayer avatar May 27 '25 21:05 nstrayer

E2E Tests 🚀 This PR will run tests tagged with: @:critical @:plots @:notebooks

readme  valid tags

github-actions[bot] avatar May 27 '25 21:05 github-actions[bot]