AnswerDotAI / AnswerDotAI/nbdev

nbdev_update sometimes fails silently

Open
#1,148 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Jupyter Notebook
Stars
5.3k
Forks
513
Avg merge
2d 30m
Merged PRs (30d)
8

Description

for example, if you have a fresh repo initialized with nbdev_new, and you modify /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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.