From fc9d1fb876a31f36316717f3cbcc020988a534f2 Mon Sep 17 00:00:00 2001 From: curtis-allan Date: Mon, 2 Feb 2026 15:25:05 +1000 Subject: [PATCH 1/2] Fix `watch-export` --- nbdev/cli.py | 6 +++--- nbs/api/13_cli.ipynb | 14 ++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/nbdev/cli.py b/nbdev/cli.py index f38629bfb..dee3fcab7 100644 --- a/nbdev/cli.py +++ b/nbdev/cli.py @@ -184,16 +184,16 @@ def watch_export(nbs:str=None, # Nb directory to watch for changes lib = lib or (cfg.lib_path if cfg else '.') if cfg and (nbs != cfg.nbs_path or lib != cfg.lib_path) and not force: raise ValueError("In nbdev project. Use --force to override config.") - run(f'nbdev_export') + run('nbdev-export') def _export(e,lib=lib): p = e.src_path if (not '.ipynb_checkpoints' in p and p.endswith('.ipynb') and not Path(p).name.startswith(('tmp','.~'))): if e.event_type == 'modified': time.sleep(0.1) - try: run(f'nb_export --lib_path {lib} "{p}"') + try: run(f'nb-export --lib_path {lib} "{p}"') except IOError: time.sleep(0.3) - run(f'nb_export --lib_path {lib} "{p}"') + run(f'nb-export --lib_path {lib} "{p}"') with fs_watchdog(_export, nbs): while True: time.sleep(1) diff --git a/nbs/api/13_cli.ipynb b/nbs/api/13_cli.ipynb index fec6b2d53..facca94ad 100644 --- a/nbs/api/13_cli.ipynb +++ b/nbs/api/13_cli.ipynb @@ -326,16 +326,16 @@ " lib = lib or (cfg.lib_path if cfg else '.')\n", " if cfg and (nbs != cfg.nbs_path or lib != cfg.lib_path) and not force:\n", " raise ValueError(\"In nbdev project. Use --force to override config.\")\n", - " run(f'nbdev_export')\n", + " run('nbdev-export')\n", " def _export(e,lib=lib):\n", " p = e.src_path\n", " if (not '.ipynb_checkpoints' in p and p.endswith('.ipynb') and not Path(p).name.startswith(('tmp','.~'))):\n", " if e.event_type == 'modified':\n", " time.sleep(0.1)\n", - " try: run(f'nb_export --lib_path {lib} \"{p}\"')\n", + " try: run(f'nb-export --lib_path {lib} \"{p}\"')\n", " except IOError:\n", " time.sleep(0.3)\n", - " run(f'nb_export --lib_path {lib} \"{p}\"')\n", + " run(f'nb-export --lib_path {lib} \"{p}\"')\n", " with fs_watchdog(_export, nbs):\n", " while True: time.sleep(1)" ] @@ -445,7 +445,13 @@ ] } ], - "metadata": {}, + "metadata": { + "kernelspec": { + "display_name": "python3", + "language": "python", + "name": "python3" + } + }, "nbformat": 4, "nbformat_minor": 5 } From 40115fb7c4ad54ff680dc0a84309b9e50cb3c00c Mon Sep 17 00:00:00 2001 From: curtis-allan Date: Tue, 3 Feb 2026 07:50:37 +1000 Subject: [PATCH 2/2] tomllib import tests fix --- nbs/api/16_migrate.ipynb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nbs/api/16_migrate.ipynb b/nbs/api/16_migrate.ipynb index 120b78bf8..c187abe38 100644 --- a/nbs/api/16_migrate.ipynb +++ b/nbs/api/16_migrate.ipynb @@ -1390,7 +1390,8 @@ "outputs": [], "source": [ "from configparser import ConfigParser\n", - "import tomllib" + "try: import tomllib\n", + "except ImportError: import tomli as tomllib" ] }, { @@ -1551,7 +1552,10 @@ ] } ], - "metadata": {}, + "metadata": { + "solveit_dialog_mode": "learning", + "solveit_ver": 2 + }, "nbformat": 4, "nbformat_minor": 5 }