From 2d61b50f360bce869593d28f9a3c46be1417b189 Mon Sep 17 00:00:00 2001 From: Isaac Flath Date: Tue, 24 Sep 2024 12:06:32 -0400 Subject: [PATCH] Add docments --- nbdev/cli.py | 6 +++++- nbs/api/13_cli.ipynb | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/nbdev/cli.py b/nbdev/cli.py index 5746ed3d..2c4c31b1 100644 --- a/nbdev/cli.py +++ b/nbdev/cli.py @@ -173,7 +173,11 @@ def nb_export_cli(nbname, # %% ../nbs/api/13_cli.ipynb @call_parse -def watch_export(nbs:str=None, lib:str=None, force:bool=False): +def watch_export(nbs:str=None, # Nb directory to watch for changes + lib:str=None, # Export directory to write py files to + force:bool=False # Ignore nbdev config if in nbdev project + ): + '''Use `nb_export` on ipynb files in `nbs` directory on changes using nbdev config if available''' cfg = get_config() if is_nbdev() else None nbs = nbs or (cfg.nbs_path if cfg else '.') lib = lib or (cfg.lib_path if cfg else '.') diff --git a/nbs/api/13_cli.ipynb b/nbs/api/13_cli.ipynb index cc34c9b5..3696109c 100644 --- a/nbs/api/13_cli.ipynb +++ b/nbs/api/13_cli.ipynb @@ -315,7 +315,11 @@ "source": [ "#|export\n", "@call_parse\n", - "def watch_export(nbs:str=None, lib:str=None, force:bool=False):\n", + "def watch_export(nbs:str=None, # Nb directory to watch for changes\n", + " lib:str=None, # Export directory to write py files to\n", + " force:bool=False # Ignore nbdev config if in nbdev project\n", + " ):\n", + " '''Use `nb_export` on ipynb files in `nbs` directory on changes using nbdev config if available'''\n", " cfg = get_config() if is_nbdev() else None\n", " nbs = nbs or (cfg.nbs_path if cfg else '.')\n", " lib = lib or (cfg.lib_path if cfg else '.')\n",