kynan / nbstripout

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

Strip out 'id' field from cells #148

Closed horseshoe107 closed 3 years ago

horseshoe107 commented 3 years ago

As described in issue #146, cell IDs are here to stay with notebook formats 4.5+. The code in the PR strips them out (no configuration option). It is working in my setup as a git filter (no other usage tested).

cdeil commented 3 years ago

@kynan - Favor atender.

Would be really nice to have, having the IDs show up in diffs is really annoying for change review (#146).

kynan commented 3 years ago

As explained here it turns out that we can't strip the id, as doing so will cause nbformat to generate a new one when validating the notebook and thereby guaranteeing a diff.