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

Cleaning Notebook cell outputs #392

Open
jaipreet-s opened this issue Aug 8, 2019 · 6 comments
Open

Cleaning Notebook cell outputs #392

jaipreet-s opened this issue Aug 8, 2019 · 6 comments

Comments

@jaipreet-s
Copy link
Member

jaipreet-s commented Aug 8, 2019

Notebooks cell outputs can be a hindrance in Version Control while reviewing the diff of a commit to see what changed (either in a PR or historically)

Some ideas on how we could enable users to deal with outputs in cell in jupyterlab-git

  1. Enable a Command Palette option to easily install a Git filter with nbstripout
  2. Prompt the user to remove outputs from cells if we detect that there are cell outputs during a git push
  3. Use the JupyterLab settings registry to let the user specify that all Notebook outputs must be cleaned on a git push
@suiluj
Copy link

suiluj commented Oct 6, 2019

i would like to have this feature

@fcollonval
Copy link
Member

@suiluj if you are willing, PR are welcome. And we could help you with this.

@suiluj
Copy link

suiluj commented Oct 6, 2019

@fcollonval i found a easy to understand demo of nbstripout (did not know it till today)

here is the YouTube video demo. so now i think there is no need for further integrating this:

https://youtu.be/BEMP4xacrVc

@fcollonval
Copy link
Member

With #700, it is now possible to add nbstripout (for example) when initializing a git repository.

@fcollonval
Copy link
Member

As there is no clear answer on the best solutions and because it may not be wanted in some use cases (like using nbval), for now some solutions will be listed here for documentation. First of I want to point interested user to that blog post Making git and Jupyter notebooks play nice.

Here are some solutions:

To set up such tools at git initialization, you can take advantage of the post_init actions.

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

4 participants