@@ -78,7 +78,7 @@ def nbdev_sidebar(
7878 yml_path .write_text (yml )
7979 if returnit : return files
8080
81- # %% ../nbs/10_cli.ipynb 9
81+ # %% ../nbs/10_cli.ipynb 10
8282class FilterDefaults :
8383 "Override `FilterDefaults` to change which notebook processors are used"
8484 def _nothing (self ): return []
@@ -107,7 +107,7 @@ def nb_proc(self, nb):
107107 "Get an `NBProcessor` with these processors"
108108 return NBProcessor (nb = nb , procs = self .procs (), preprocs = self .preprocs (), postprocs = self .postprocs ())
109109
110- # %% ../nbs/10_cli.ipynb 10
110+ # %% ../nbs/10_cli.ipynb 11
111111@call_parse
112112def nbdev_filter (
113113 nb_txt :str = None , # Notebook text (uses stdin if not provided)
@@ -129,7 +129,7 @@ def nbdev_filter(
129129 if printit : print (res , flush = True )
130130 else : return res
131131
132- # %% ../nbs/10_cli.ipynb 13
132+ # %% ../nbs/10_cli.ipynb 14
133133_re_version = re .compile ('^__version__\s*=.*$' , re .MULTILINE )
134134
135135def update_version ():
@@ -161,12 +161,12 @@ def nbdev_bump_version(
161161 update_version ()
162162 print (f'New version: { cfg .version } ' )
163163
164- # %% ../nbs/10_cli.ipynb 15
164+ # %% ../nbs/10_cli.ipynb 16
165165def extract_tgz (url , dest = '.' ):
166166 from fastcore .net import urlopen
167167 with urlopen (url ) as u : tarfile .open (mode = 'r:gz' , fileobj = u ).extractall (dest )
168168
169- # %% ../nbs/10_cli.ipynb 16
169+ # %% ../nbs/10_cli.ipynb 17
170170def _get_info (owner , repo , default_branch = 'main' , default_kw = 'nbdev' ):
171171 try : from ghapi .all import GhApi
172172 except :
@@ -189,7 +189,7 @@ def _get_info(owner, repo, default_branch='main', default_kw='nbdev'):
189189
190190 return r .default_branch , default_kw if not r .topics else ' ' .join (r .topics ), r .description
191191
192- # %% ../nbs/10_cli.ipynb 18
192+ # %% ../nbs/10_cli.ipynb 19
193193def prompt_user (** kwargs ):
194194 config_vals = kwargs
195195 print ('================ nbdev Configuration ================\n ' )
@@ -202,7 +202,7 @@ def prompt_user(**kwargs):
202202 print (f"\n `settings.ini` updated with configuration values." )
203203 return config_vals
204204
205- # %% ../nbs/10_cli.ipynb 19
205+ # %% ../nbs/10_cli.ipynb 20
206206def _fetch_from_git (raise_err = False ):
207207 "Get information for settings.ini from the user."
208208 try :
@@ -217,7 +217,7 @@ def _fetch_from_git(raise_err=False):
217217 return dict (lib_name = repo .replace ('-' , '_' ), user = owner , branch = branch , author = author ,
218218 author_email = email , keywords = keywords , description = descrip , repo = repo )
219219
220- # %% ../nbs/10_cli.ipynb 21
220+ # %% ../nbs/10_cli.ipynb 22
221221_quarto_yml = """ipynb-filters: [nbdev_filter]
222222
223223project:
@@ -267,7 +267,7 @@ def refresh_quarto_yml():
267267 yml = _quarto_yml .format (** vals )
268268 p .write_text (yml )
269269
270- # %% ../nbs/10_cli.ipynb 22
270+ # %% ../nbs/10_cli.ipynb 23
271271@call_parse
272272def nbdev_new ():
273273 "Create a new project from the current git repo"
@@ -295,12 +295,12 @@ def nbdev_new():
295295 settings_path .write_text (settings )
296296 refresh_quarto_yml ()
297297
298- # %% ../nbs/10_cli.ipynb 24
298+ # %% ../nbs/10_cli.ipynb 25
299299def _sprun (cmd ):
300300 try : subprocess .check_output (cmd , shell = True )
301301 except subprocess .CalledProcessError as cpe : sys .exit (cpe .returncode )
302302
303- # %% ../nbs/10_cli.ipynb 25
303+ # %% ../nbs/10_cli.ipynb 26
304304@call_parse
305305def nbdev_quarto (
306306 path :str = None , # Path to notebooks
0 commit comments