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

Add support for stripping init cells #157

Merged
merged 4 commits into from
Sep 20, 2021
Merged

Add support for stripping init cells #157

merged 4 commits into from
Sep 20, 2021

Conversation

Pugio
Copy link
Contributor

@Pugio Pugio commented Sep 14, 2021

As mentioned in #156 :

This PR adds a flag: --strip-init-cells which alters the current behavior to also remove outputs from init cells.

Reason:
I have a whole bunch of notebooks which have the init_cell: true metadata. This generates a nice default set of UI widgets as soon as the notebook is loaded. However, since this is generated automatically, I don't want all the widget output checked into my source repo. Right now, every time a user commits a change to the notebook, we have huge amounts of cell output from the init_cell cells.

nbstripout/_nbstripout.py Outdated Show resolved Hide resolved
@kynan kynan added this to the 0.4.1 milestone Sep 19, 2021
@kynan
Copy link
Owner

kynan commented Sep 19, 2021

For some reason CI hasn't run on this PR. Investigating what's happened there.

@kynan
Copy link
Owner

kynan commented Sep 19, 2021

My bad, I hadn't configured GitHub Actions to run on a PR. I had to push a dummy commit to your branch to trigger CI.

Copy link
Owner

@kynan kynan left a comment

Choose a reason for hiding this comment

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

Please address the test failures and add a new test for your feature.

@kynan kynan added the state:waiting Waiting for response for reporter label Sep 19, 2021
@Pugio
Copy link
Contributor Author

Pugio commented Sep 20, 2021

Thank you. I have fixed the tests, and added a new one for the new case.

Copy link
Owner

@kynan kynan left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution, this looks good to go!

@kynan kynan merged commit 3843f5f into kynan:master Sep 20, 2021
@kynan kynan added resolution:merged and removed state:waiting Waiting for response for reporter labels Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants