holoviz / holoviz/param

Make tooltips useful in a modern IDEs

Open
#646 4 comments 2 reactions 1 assignee Claimed by @jbednar View on GitHub
type-feature
Dominant language
Python
Stars
521
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
35

Description

## Request

Make sure that tooltips shown in VS Code, PyCharm and other modern IDEs are useful.

## Motivation

If tooltips are empty, not meaningful or not specific, it makes it way too hard to use the framework. Many things seems mysterious and different arguments or features are not discoverable.

## Example

I'm trying to help a user here https://discourse.holoviz.org/t/how-to-param-dataframe-populated/3957. I'm working in VS Code.

The tooltip of `param.DataFrame` is a general tooltip that does not help me understand how I can initialize the `DataFrame` parameter in particular.

![image](https://user-images.githubusercontent.com/42288570/180613849-42300670-d5f4-4f05-a2d3-207b1f5be244.png)

The issue is that if a docstring for the `__init__` function of the class or a parent exists, then its used as tooltip. And its defined for the `Parameter` parent class only.

![image](https://user-images.githubusercontent.com/42288570/180613941-765af972-3a53-493d-8f2c-284142a49452.png)

The docstring of the `DataFrame` class is not shown. It would have been much more useful.

![image](https://user-images.githubusercontent.com/42288570/180613979-4c7d6dc3-180b-442c-a489-e0715db91d1e.png)

## Discussion

I would argue that docstrings simply need to be handcrafted and that having undocumented `**params` arguments should be avoided.

The current state is an advantage for developers who can minimize their work. But it does not benefit beginners or non-super users that needs help to work with the framework.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.