nbdev 3.0.8__tar.gz → 3.0.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nbdev-3.0.8/nbdev.egg-info → nbdev-3.0.9}/PKG-INFO +1 -1
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/__init__.py +1 -1
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/cli.py +3 -3
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/config.py +1 -1
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/test.py +5 -3
- {nbdev-3.0.8 → nbdev-3.0.9/nbdev.egg-info}/PKG-INFO +1 -1
- {nbdev-3.0.8 → nbdev-3.0.9}/CONTRIBUTING.md +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/LICENSE +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/MANIFEST.in +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/README.md +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/_modidx.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/clean.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/diff.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/doclinks.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/export.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/extract_attachments.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/frontmatter.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/imports.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/maker.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/merge.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/migrate.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/process.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/processors.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/qmd.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/quarto.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/release.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/scrubmagics.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/serve.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/serve_drv.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/showdoc.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev/sync.py +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev.egg-info/SOURCES.txt +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev.egg-info/dependency_links.txt +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev.egg-info/entry_points.txt +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev.egg-info/requires.txt +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/nbdev.egg-info/top_level.txt +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/pyproject.toml +0 -0
- {nbdev-3.0.8 → nbdev-3.0.9}/setup.cfg +0 -0
|
@@ -184,16 +184,16 @@ def watch_export(nbs:str=None, # Nb directory to watch for changes
|
|
|
184
184
|
lib = lib or (cfg.lib_path if cfg else '.')
|
|
185
185
|
if cfg and (nbs != cfg.nbs_path or lib != cfg.lib_path) and not force:
|
|
186
186
|
raise ValueError("In nbdev project. Use --force to override config.")
|
|
187
|
-
run(
|
|
187
|
+
run('nbdev-export')
|
|
188
188
|
def _export(e,lib=lib):
|
|
189
189
|
p = e.src_path
|
|
190
190
|
if (not '.ipynb_checkpoints' in p and p.endswith('.ipynb') and not Path(p).name.startswith(('tmp','.~'))):
|
|
191
191
|
if e.event_type == 'modified':
|
|
192
192
|
time.sleep(0.1)
|
|
193
|
-
try: run(f'
|
|
193
|
+
try: run(f'nb-export --lib_path {lib} "{p}"')
|
|
194
194
|
except IOError:
|
|
195
195
|
time.sleep(0.3)
|
|
196
|
-
run(f'
|
|
196
|
+
run(f'nb-export --lib_path {lib} "{p}"')
|
|
197
197
|
with fs_watchdog(_export, nbs):
|
|
198
198
|
while True: time.sleep(1)
|
|
199
199
|
|
|
@@ -152,7 +152,7 @@ def _load_toml(p):
|
|
|
152
152
|
|
|
153
153
|
def _has_nbdev(p):
|
|
154
154
|
"True if pyproject.toml at `p` has [tool.nbdev]"
|
|
155
|
-
try: return
|
|
155
|
+
try: return _load_toml(p).get('tool', {}).get('nbdev') is not None
|
|
156
156
|
except Exception: return False
|
|
157
157
|
|
|
158
158
|
def _find_nbdev_pyproject(path=None):
|
|
@@ -28,7 +28,8 @@ def test_nb(fn, # file name of notebook to test
|
|
|
28
28
|
force_flags=None, # list of flags marking cells to always run
|
|
29
29
|
do_print=False, # print completion?
|
|
30
30
|
showerr=True, # print errors to stderr?
|
|
31
|
-
basepath=None
|
|
31
|
+
basepath=None, # path to add to sys.path
|
|
32
|
+
verbose=False): # stream stdout/stderr from cells to console?
|
|
32
33
|
"Execute tests in notebook in `fn` except those with `skip_flags`"
|
|
33
34
|
if basepath: sys.path.insert(0, str(basepath))
|
|
34
35
|
if not IN_NOTEBOOK: os.environ["IN_TEST"] = '1'
|
|
@@ -49,7 +50,7 @@ def test_nb(fn, # file name of notebook to test
|
|
|
49
50
|
if do_print: print(f'Starting {fn}')
|
|
50
51
|
try:
|
|
51
52
|
with working_directory(fn.parent):
|
|
52
|
-
k.run_all(nb, exc_stop=True, preproc=_no_eval)
|
|
53
|
+
k.run_all(nb, exc_stop=True, preproc=_no_eval, verbose=verbose)
|
|
53
54
|
res = True
|
|
54
55
|
except:
|
|
55
56
|
if showerr: sys.stderr.write(k.prettytb(fname=fn)+'\n')
|
|
@@ -76,6 +77,7 @@ def nbdev_test(
|
|
|
76
77
|
do_print:bool=False, # Print start and end of each notebook
|
|
77
78
|
pause:float=0.01, # Pause time (in seconds) between notebooks to avoid race conditions
|
|
78
79
|
ignore_fname:str='.notest', # Filename that will result in siblings being ignored
|
|
80
|
+
verbose:bool=False, # Print stdout/stderr from notebook cells?
|
|
79
81
|
**kwargs):
|
|
80
82
|
"Test in parallel notebooks matching `path`, passing along `flags`"
|
|
81
83
|
skip_flags = get_config().tst_flags
|
|
@@ -90,7 +92,7 @@ def nbdev_test(
|
|
|
90
92
|
wd_pth = get_config().nbs_path
|
|
91
93
|
with working_directory(wd_pth if (wd_pth and wd_pth.exists()) else os.getcwd()):
|
|
92
94
|
results = parallel(test_nb, files, skip_flags=skip_flags, force_flags=force_flags, n_workers=n_workers,
|
|
93
|
-
basepath=get_config().config_path, pause=pause, do_print=do_print, **kw)
|
|
95
|
+
basepath=get_config().config_path, pause=pause, do_print=do_print, verbose=verbose, **kw)
|
|
94
96
|
passed,times = zip(*results)
|
|
95
97
|
if all(passed): print("Success.")
|
|
96
98
|
else:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|