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

Clean cell outputs at merge time #3

Open
amit1rrr opened this issue Oct 23, 2018 · 1 comment
Open

Clean cell outputs at merge time #3

amit1rrr opened this issue Oct 23, 2018 · 1 comment
Labels
Feature Request A new feature that's under consideration.

Comments

@amit1rrr
Copy link
Member

amit1rrr commented Oct 23, 2018

Problem

Lot of users want to version control only the source (markdown + code cells) but don't wish to commit output into their git repository. They currently do this via nbstripout or with "Clear All Outputs" in the Jupyter UI.

The problem is, sometimes you might want to keep an output for some notebooks or even for some cells in the Notebook. Then both the earlier options are kind of icky. Also, people sometimes just tend to forget to hit "Clear All Outputs" before committing.

Solution

We can give users ability to clean output at merge time. They can view the entire diff and select which outputs they want to keep (if any) and once the review is complete and user hits merge we can remove the output and push a new commit with the stripped version.

Moreover, we can let user configure the repo to always strip all output at every merge so no more forgetting to clean output. If you need to overwrite the stripping for a few select cells, just mark those in the merge UI and we'll keep those outputs and clean everything else.

Benefits

  • Once configured, it just strips output every time user merge the changes.
  • It's easy to overwrite the cleaning rule for a select set of outputs in a given merge. Simply select the outputs you wish to keep and we'll deleted the rest.

Feel free to upvote/downvote the issue indicating whether you think this is useful feature or not. I also welcome additional questions/comments/discussion on the issue.

@amit1rrr amit1rrr self-assigned this Oct 23, 2018
@amit1rrr amit1rrr added the Feature Request A new feature that's under consideration. label Oct 23, 2018
@amit1rrr amit1rrr changed the title Remove cell outputs at merge time Clean cell outputs at merge time Oct 27, 2018
@amit1rrr amit1rrr removed their assignment Jan 10, 2020
@davidrs
Copy link

davidrs commented Jul 30, 2020

Would be an awesome feature. FWIW Base on my workflow I'd make heavy use of the:

configure the repo to always strip all output at every merge so no more forgetting to clean output.

I'd make much less use of the option to select specific cells to keep. If that helps make the scope easier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A new feature that's under consideration.
Projects
None yet
Development

No branches or pull requests

2 participants