Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

Added display option to Widgets #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jlstevens
Copy link
Member

When trying to batch generate notebooks with nbconvert using the execute preprocessor, widgets don't display in the HTML export and show this ugly message:

image

For this reason, it seems useful to have an option to disable display for notebooks that are to be batch run by setting paramnb.Widgets.display=False. This makes sense to me as widgets don't export to HTML anyway so suppressing those ugly (and irrelevant) warnings seems like a reasonable thing to do.

One other possibility would be to offer a display type. Perhaps a textual display of the current parameter values would be even more useful?

@jlstevens
Copy link
Member Author

In the end setting paramnb.Widgets.display='text' to pretty print the parameter values might be a nicer approach for batch runs...

@jbednar
Copy link
Member

jbednar commented Oct 20, 2016

Are you sure that the message above won't go away when you run the suggested command? If it's required, it's ok to have a parameter like display, but it would be better to detect that the widgets can't be displayed normally and fall back automatically. It's annoying to have to change the source code in a notebook for something that's not about correctness of the code, but about the capabilities of a particular way of processing the code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants