Refresh notebook running in Jupyter is not intuitive

It’s been my first week with nbdev and thank you so much for this very promising project. :pray:

nbdev_prepare

One beginner experience that was not very intuitive to me is how the nbdev_prepare command cleans up the notebook with line numbers, etc but that does not reflect in the open Jupyter notebook. I basically, had to reload the Jupyter notebook in my browser to see the cleaned up version before I continued to work on the notebook.

I am not sure if there is a way for Jupyter notebook to reload automatically when it’s changed by something external, in this case it’s the nbdev_prepare prepare command. Any ideas or workflow change that anybody can recommend?

nbdev_preview

The other thing I have noticed is that changes don’t reflect post edit the very first time with nbdev_preview. I had to terminate the running server and re-run nbdev_preview to start the live-reload of the pages in the browser. Not sure, if it’s something on my setup or is that the general behavior.

Generally this will be the case if it’s a new page/notebook that has to be completely rendered the first time. Otherwise live reloading works well. I run rm -r _procs; nbdev_preview when previewing it so I can CTRL+C and just rerun that when I want to push a new nb to be processed

2 Likes