Skip to content
Advertisement

Is there a way to have a “jupyter notebook template”?

I want a file with the following properties:

  • Contains the code + markdown in a jupyter notebook
  • Is not runnable — can be safely checked in to a VC system

My use case is I want to have a notebook template for computing various stats on some sims I’m running. For each sim, I want to be able to

  • papermill or nbconvert into a sim report using this template
  • create an actual jupyter notebook (just for that sim) from this template (for an interesting stat in this template report, I can drill down)

Is there a way to do this?

Advertisement

Answer

I would recommend using JupyText to make a notebook in an alternate format and then you can make a Cookiecutter project with things the way you like..

I’m not using Jupytext in my Cookiecutter.. but here is an example cookiecutter project I made.

https://gitlab.com/usmcamp0811/cronus

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement