When I was using nbdev to develop a package, I also heavily use vscode. I frequently use nbdev_update_lib and nbdev_build_lib. However, I organize my code by IDE, which cannot be converted by nbdev_update_lib. What is a good way to balance nbdev notebooks and vscode? Should I always use nbdev to write the code part?
You might be able to run your notebooks inside of vs code with the Python extension and still use nbdev to generate the library. Having your notebooks inside VS Code as well would keep you inside your comfort IDE all the time while you can still benefit from interactive output and most of the jupyter goodness. However note that you are still stuck with jupyters shortcuts when using VS Codes notebook viewer.
The Python extension also enables you to define code cells inside a
.py using comments (see here), which you can use for both interactive execution (while preserving your default code editing shortcuts) and later converting the file to an
.ipynb, which you could use for nbdev. The conversion to
.ipynb would probably have to be done manually tho.
I had some problems with doing autopep8 in vscode and my #Cell tag goes everywhere… Have you experienced that?
I don’t use autopep8, but I think it should not mess with comments… Maybe you can add an exception in the config?