jupytext
jupytext copied to clipboard
How to best use jupytext and nbdev together?
Imagine we have two notebooks:
1_def_function.ipynbthat defines a functionfand documents it, and exports it to a package usingnbdev2_use_function.ipynbthat importsffrom the package generated bynbdev.
Questions:
- Does it makes sense to use both nbdev and jupytext in such a project? What is the recommended configuration? Can one use text-notebooks only?
- Is it easy to refactor the project? Imagine we want to refactor (rename)
fin the project. Will a tool like PyCharm identify thatfshould be renamed in a. the notebook that definesf, b. the package generated by nbdev and c. the notebook that importsf?
Cc @eserie and @jph00.
Hello!
I use both jupytext and nbdev heavily in my workflows, it would be great if I could use them together.
Thank you!
I use both jupytext and nbdev heavily in my workflows, it would be great if I could use them together.
Sure! Just to be sure, currently you use them on different projects? Have you ever tried to use them on the same project? (Personally I tried but if I remember well I had a conflict on the README.md and main notebook...)
Also, what do you expect of the combination? Do you want to keep the .ipynb files and use paired notebooks, or just use text notebooks + nbdev?
did you guys get any best practices out of this? I like my python notebooks in percent form, but would also like to use alot of what nbdev has to offer..