Skip to content

nbdev_update sometimes fails silently #1148

@methuselah-0

Description

@methuselah-0

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions