srstevenson / nb-clean

Clean Jupyter notebooks for version control. Remove metadata, outputs, and execution counts with Git and pre-commit support.
https://pypi.org/project/nb-clean
ISC License
137 stars 19 forks source link

Feature request: preserve notebook metadata #244

Closed acroz closed 9 months ago

acroz commented 9 months ago

Hi Scott, hope you're well!

I'm interested in using nb-clean in a project to fail CI when output is committed in a notebook, but I'd like to be permissive about metadata. I see that the --preserve-cell-metadata option allows you to permit cell metadata, but language_info.version cannot currently be permitted, if I understand correctly.

Would you consider adding a flag to permit this metadata?

srstevenson commented 9 months ago

Hi Andrew, great to hear from you! 👋 This sounds reasonable, I've opened #245 to add this.

srstevenson commented 9 months ago

This is now available in nb-clean 3.2.0 which I've uploaded to PyPI.

acroz commented 9 months ago

Thanks very much!