Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide all input for output notebook #130

Closed
rgbkrk opened this issue Apr 6, 2018 · 11 comments
Closed

Hide all input for output notebook #130

rgbkrk opened this issue Apr 6, 2018 · 11 comments

Comments

@rgbkrk
Copy link
Member

rgbkrk commented Apr 6, 2018

From a user:

It would be cool if papermill had an option to hide code cell input when generating an output notebook. This could be very helpful when generating a nightly report and not wanting to see the code that generates the report.

Simple enough. nteract uses metadata.inputHidden as a boolean value to indicate if a cell's input is hidden.

I suppose a flag like --hide-inputs or something? Maybe if we wanted to be more opinionated about the naming we'd call it --report-mode or --mode=report?

Thus far convergence on flag name is --report-mode.

@mpacer
Copy link
Member

mpacer commented Apr 6, 2018 via email

@betatim
Copy link
Member

betatim commented Apr 7, 2018

I like --report-mode or --mode=report over --hide-input.

@cloud-princess
Copy link
Contributor

Can I take a stab at this?

@betatim
Copy link
Member

betatim commented May 9, 2018

Sure thing! Let us know how it is going and feel free to create a PR marked as "work in progress" as soon as you feel like you have something to share (even if it is a long way from being done).

@cloud-princess
Copy link
Contributor

Ok, thanks! Will do so.

@rgbkrk
Copy link
Member Author

rgbkrk commented May 10, 2018

Since we'll only have one mode to begin with, we should just call this --report-mode for now.

@mpacer
Copy link
Member

mpacer commented May 10, 2018

@cldssty since this is already a traitlet in nbconvert you could get away with adding a flag to the papermill jupyter app and setting the value of that nbconvert option (which I mention above).

Oh wait… this isn’t a JupyterApp… is there any reason why? Doing so would make a lot of the logic in the CLI a lot simpler and make it much easier to configure other jupyter parts like the kernel manager & nbconvert.

@rgbkrk
Copy link
Member Author

rgbkrk commented May 10, 2018

I think it would be fine if this was a JupyterApp. We were happy with using click and weren't aware of the benefits of it being a JupyterApp.

@cloud-princess
Copy link
Contributor

#135
Have made an attempt - please tell me what to add/change. Thanks!

@OrKoN
Copy link

OrKoN commented Nov 7, 2018

Hi, I got a question about this feature. I run papermill like this: papermill --report-mode input.ipynb output.ipynb -p ... I expected that output.ipynb will have input cells hidden if I open it with the jupyter notebook but actually input cells (e.g. code cells) are not hidden. How is this flag supposed to work?

@MSeal
Copy link
Member

MSeal commented Nov 7, 2018

@OrKoN This feature was relatively new, all of the tools have adopted it except jupyter classic as far I know. I looked at the code involved there and kicked a comment in jupyter/notebook#534 to see if we can get classic to also respect it soon.

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

No branches or pull requests

6 participants