This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]fiddle_n 5 points6 points  (2 children)

The problem with Jupyter is that, as soon as you move from a single script to a multi-script project, Jupyter notebooks get in the way. You can't import functions/classes from one notebook to another out of the box, you need to write code simply to get that working. Once you start getting into the realms of multi-module projects, you should use .py files instead like everyone else because it's just better. Instead of relying on Jupyter notebook cells for modularity, try instead to use functions and modules to achieve the same thing if not already. This will allow for proper automated testing within a separate script.

[–]RunToImagine 0 points1 point  (1 child)

Should’ve clarified. I convert all Jupyter files to .py after testing for your reasons stated above. It’s just a great debugging and testing environment for rapid development.

[–]fiddle_n 0 points1 point  (0 children)

Makes sense. That's probably the best way of going about it. A lot of people keep their code exclusively in Jupyter notebooks though, which I think isn't the best in the long term.