Skip to content

fix: hv.help() to work outside IPython/Jupyter - #6793

Open
AR21SM wants to merge 1 commit into
holoviz:mainfrom
AR21SM:fix/hv-help-non-ipython
Open

fix: hv.help() to work outside IPython/Jupyter#6793
AR21SM wants to merge 1 commit into
holoviz:mainfrom
AR21SM:fix/hv-help-non-ipython

Conversation

@AR21SM

@AR21SM AR21SM commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #6775 - hv.help() now provides visualization options (Style Options, Plot Options) when running in plain Python scripts, not just in Jupyter notebooks.

Before

image

After

image

Checklist

  • Pull request title follows the conventional format
  • Tests added and is passing
  • Added documentation

@AR21SM
AR21SM force-pushed the fix/hv-help-non-ipython branch from a5622c3 to dd22828 Compare February 4, 2026 18:04
@AR21SM

AR21SM commented Feb 4, 2026

Copy link
Copy Markdown
Contributor Author

Hi @MarcSkovMadsen, I'm unable to edit the PR title from my end. Could you please change "Fix:" to "fix:" (lowercase) to pass the semantic PR title check? Thanks!

@hoxbro hoxbro changed the title Fix: hv.help() to work outside IPython/Jupyter fix: hv.help() to work outside IPython/Jupyter Feb 4, 2026
@AR21SM

AR21SM commented Feb 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks@hoxbro :)

@codecov

codecov Bot commented Feb 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.21%. Comparing base (191aa3b) to head (dd22828).
⚠️ Report is 128 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6793   +/-   ##
=======================================
  Coverage   89.21%   89.21%           
=======================================
  Files         334      334           
  Lines       72362    72364    +2     
=======================================
+ Hits        64559    64561    +2     
  Misses       7803     7803           

☔ 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.

Comment on lines +747 to +748
from ..core.pprint import InfoPrinter
InfoPrinter.store = Store

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure why you have chosen to put it here

Placing it here will only make it work, after you have called hv.extension.

We also need to check whether this store will work on Windows cmd.exe (if you haven't already checked it).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The placement is intentional. hv.help() needs InfoPrinter.store to access Store.registry for Style/Plot options. This registry is only populated after hv.extension() loads a backend before that, there's nothing to show.

I've tested this on Windows cmd.exe and confirmed it works correctly.
Image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The placement is intentional.

I assumed this was the case 😄

... there's nothing to show.

I don't agree with that, there is not much to show but there is still something to show:

image

Can you take a look at how hard it would be to disable ANSI coloring if we are not in a TTY? In reality I don't think it would matter, but we

image

E.g. python -c 'import holoviews as hv; hv.core.pprint.InfoPrinter.store = hv.Store; hv.help(hv.Curve)' > example.txt will write the following:

�[1;32mParameters of 'Curve'
=====================
�[0m
�[1;31mParameters changed from their default values are marked in red.�[0m
�[1;36mSoft bound values are marked in cyan.�[0m
C/V= Constant/Variable, RO/RW = ReadOnly/ReadWrite, AN=Allow None

�[1;34mName                        Value                     Type     Bounds   Mode �[0m

group                      'Curve'                   String             C RW 
label                         ''                     String             C RW 
cdims                         {}                      Dict              V RW 
kdims                  [Dimension('x')]               List     (1, 2)   C RW 
vdims                  [Dimension('y')]               List   (1, None)  C RW 
extents            (None, None, None, None)          Tuple              V RW 
datatype   ['dataframe', 'dictionary', 'grid', '...   List   (0, None)  V RW 

�[1;32mParameter docstrings:
=====================�[0m

�[1;34mgroup:    A string describing the data wrapped by the object.�[0m
�[1;31mlabel:    Optional label describing the data, typically reflecting where�[0m
�[1;31m          or how it was measured. The label should allow a specific�[0m
�[1;31m          measurement or dataset to be referenced for a given group.�[0m
�[1;34mcdims:    The constant dimensions defined as a dictionary of Dimension:value�[0m
�[1;34m          pairs providing additional dimension information about the object.�[0m
�[1;34m          �[0m
�[1;34m          Aliased with constant_dimensions.�[0m
�[1;31mkdims:    The key dimension(s) of a Chart represent the independent�[0m
�[1;31m          variable(s).�[0m
�[1;34mvdims:    The value dimensions of the Chart, usually corresponding to a�[0m
�[1;34m          number of dependent variables.�[0m
�[1;31mextents:  Allows overriding the extents of the Element in 2D space defined�[0m
�[1;31m          as four-tuple defining the (left, bottom, right and top) edges.�[0m
�[1;34mdatatype: A priority list of the data types to be used for storage�[0m
�[1;34m          on the .data attribute. If the input supplied to the element�[0m
�[1;34m          constructor cannot be put into the requested format, the next�[0m
�[1;34m          format listed will be used until a suitable format is found (or�[0m
�[1;34m          the data fails to be understood).�[0m

@Azaya89

Azaya89 commented Feb 18, 2026

Copy link
Copy Markdown
Member

Can you please see if this PR can also fix #5421 and #5423 as well? Thanks!

@AR21SM

AR21SM commented Feb 19, 2026

Copy link
Copy Markdown
Contributor Author

Can you please see if this PR can also fix #5421 and #5423 as well? Thanks!

Sure, I’ll look into it.

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.

hv.help not helpful outside of Jupyter

3 participants