Skip to content

Conversation

@bcwu
Copy link
Contributor

@bcwu bcwu commented Jun 10, 2021

Add option to hide code cells when rendering Jupyter notebooks

Description

This commit adds requested feature to hide code cells when rendering Jupyter notebooks.

Usage example

After setting up Connect and rsconnect-python, the user can render a Jupyter notebook without its corresponding code cells by passing the '--hide-all-input' flag through the rsconnect cli:

rsconnect deploy notebook \
    -n server \
    -k APIKey \
    --hide-all-input \
    hello_world.ipynb

To selectively hide the input of cells, the user can add a tag call 'hide_input' to the cell, then pass the ' --hide-tagged-input' flag through the rsconnect cli:

rsconnect deploy notebook \
    -n server \
    -k APIKey \
    --hide-tagged-input \
    hello_world.ipynb

@bcwu bcwu requested a review from mmarchetti June 22, 2021 15:21
Copy link
Contributor

@mmarchetti mmarchetti left a comment

Choose a reason for hiding this comment

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

This looks good. We should hold off merging until the corresponding Connect change is ready.

@bcwu bcwu requested a review from kgartland-rstudio June 29, 2021 18:55
Copy link
Contributor

@mmarchetti mmarchetti left a comment

Choose a reason for hiding this comment

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

Let a couple comments but the changes look good. Please hold off on merging until we are ready.

@bcwu bcwu merged commit a7b4069 into master Jul 29, 2021
@bcwu bcwu deleted the hide-code-cells-jupyter branch July 29, 2021 14:47
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.

3 participants