kynan / nbstripout

strip output from Jupyter and IPython notebooks
Other
1.19k stars 94 forks source link

Add support for stripping init cells #157

Closed Pugio closed 2 years ago

Pugio commented 2 years ago

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.

kynan commented 2 years ago

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

kynan commented 2 years ago

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.

Pugio commented 2 years ago

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