Hacker News new | ask | show | jobs
by fluidcruft 1101 days ago
I use a pre-commit setup that strips and formats notebooks. IIRC I use a bunch of the nbqa hooks (to also apply black, isort, ruff, etc) but I'd have to check if I moved to different versions for some reason. My workflow uses papermill so the notebooks I store in git are essentially "parameterized templates that get instantiated with data".

https://pre-commit.com/

https://github.com/nbQA-dev/nbQA

https://papermill.readthedocs.io/en/latest/