nbdev icon indicating copy to clipboard operation
nbdev copied to clipboard

nbdev_update sometimes fails silently

Open methuselah-0 opened this issue 2 years ago • 0 comments

for example, if you have a fresh repo initialized with nbdev_new, and you modify <lib_name>/core.py then run nbdev_update --fname 'core', you won't see any output at all from the command and your 00_core.ipynb won't be updated. If you run just nbdev_update, you will get a modulenotfound error in the stacktrace.

However, if you first run, say nbdev_preview, the following snippet is invoked in the quarto modules install() method:

d = get_config().lib_path
if (d/'__init__.py').exists(): system(f'pip install -e "{d.parent}[dev]"')

which solves the problem (fixes PATH by for example adding an .egg-link directory in the ~/.local/lib..../site-packages directory).

Im not sure what the best way to solve the problem is though, so Im not sending a pull request myself.

methuselah-0 avatar Oct 06 '22 19:10 methuselah-0