nbdev 3.3.8__tar.gz → 3.3.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.
Files changed (40) hide show
  1. {nbdev-3.3.8/nbdev.egg-info → nbdev-3.3.9}/PKG-INFO +1 -1
  2. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/__init__.py +1 -1
  3. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/_modidx.py +1 -7
  4. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/quarto.py +19 -20
  5. {nbdev-3.3.8 → nbdev-3.3.9/nbdev.egg-info}/PKG-INFO +1 -1
  6. {nbdev-3.3.8 → nbdev-3.3.9}/CONTRIBUTING.md +0 -0
  7. {nbdev-3.3.8 → nbdev-3.3.9}/LICENSE +0 -0
  8. {nbdev-3.3.8 → nbdev-3.3.9}/MANIFEST.in +0 -0
  9. {nbdev-3.3.8 → nbdev-3.3.9}/README.md +0 -0
  10. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/clean.py +0 -0
  11. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/cli.py +0 -0
  12. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/config.py +0 -0
  13. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/diff.py +0 -0
  14. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/doclinks.py +0 -0
  15. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/export.py +0 -0
  16. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/extract_attachments.py +0 -0
  17. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/frontmatter.py +0 -0
  18. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/imports.py +0 -0
  19. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/maker.py +0 -0
  20. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/merge.py +0 -0
  21. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/migrate.py +0 -0
  22. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/moddocs.py +0 -0
  23. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/process.py +0 -0
  24. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/processors.py +0 -0
  25. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/qmd.py +0 -0
  26. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/release.py +0 -0
  27. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/scrubmagics.py +0 -0
  28. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/serve.py +0 -0
  29. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/serve_drv.py +0 -0
  30. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/showdoc.py +0 -0
  31. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/skill.py +0 -0
  32. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/sync.py +0 -0
  33. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev/test.py +0 -0
  34. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev.egg-info/SOURCES.txt +0 -0
  35. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev.egg-info/dependency_links.txt +0 -0
  36. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev.egg-info/entry_points.txt +0 -0
  37. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev.egg-info/requires.txt +0 -0
  38. {nbdev-3.3.8 → nbdev-3.3.9}/nbdev.egg-info/top_level.txt +0 -0
  39. {nbdev-3.3.8 → nbdev-3.3.9}/pyproject.toml +0 -0
  40. {nbdev-3.3.8 → nbdev-3.3.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdev
3
- Version: 3.3.8
3
+ Version: 3.3.9
4
4
  Summary: Create delightful software with Jupyter Notebooks
5
5
  Author-email: "Jeremy Howard and the fast.ai community" <j@fast.ai>
6
6
  License: Apache-2.0
@@ -6,7 +6,7 @@ Modules:
6
6
  - `nbdev.moddocs`: # Module docs: creating them from existing notebooks
7
7
  - `nbdev.skill`: Author clear, executable nbdev notebooks where code, prose, examples, outputs, and tests form one coherent narrative."""
8
8
 
9
- __version__ = "3.3.8"
9
+ __version__ = "3.3.9"
10
10
 
11
11
  from .doclinks import nbdev_export
12
12
  from .showdoc import show_doc
@@ -292,13 +292,6 @@ d = { 'settings': { 'branch': 'main',
292
292
  'nbdev.quarto': { 'nbdev.quarto.IndentDumper': ('api/quarto.html#indentdumper', 'nbdev/quarto.py'),
293
293
  'nbdev.quarto.IndentDumper.increase_indent': ( 'api/quarto.html#indentdumper.increase_indent',
294
294
  'nbdev/quarto.py'),
295
- 'nbdev.quarto._SidebarYmlRemoved': ('api/quarto.html#_sidebarymlremoved', 'nbdev/quarto.py'),
296
- 'nbdev.quarto._SidebarYmlRemoved.__enter__': ( 'api/quarto.html#_sidebarymlremoved.__enter__',
297
- 'nbdev/quarto.py'),
298
- 'nbdev.quarto._SidebarYmlRemoved.__exit__': ( 'api/quarto.html#_sidebarymlremoved.__exit__',
299
- 'nbdev/quarto.py'),
300
- 'nbdev.quarto._SidebarYmlRemoved.__init__': ( 'api/quarto.html#_sidebarymlremoved.__init__',
301
- 'nbdev/quarto.py'),
302
295
  'nbdev.quarto._chk_nbdev_yml': ('api/quarto.html#_chk_nbdev_yml', 'nbdev/quarto.py'),
303
296
  'nbdev.quarto._copytree': ('api/quarto.html#_copytree', 'nbdev/quarto.py'),
304
297
  'nbdev.quarto._doc_mtime_not_older': ('api/quarto.html#_doc_mtime_not_older', 'nbdev/quarto.py'),
@@ -315,6 +308,7 @@ d = { 'settings': { 'branch': 'main',
315
308
  'nbdev.quarto._save_cached_readme': ('api/quarto.html#_save_cached_readme', 'nbdev/quarto.py'),
316
309
  'nbdev.quarto._sort': ('api/quarto.html#_sort', 'nbdev/quarto.py'),
317
310
  'nbdev.quarto._sprun': ('api/quarto.html#_sprun', 'nbdev/quarto.py'),
311
+ 'nbdev.quarto._strip_sidebar': ('api/quarto.html#_strip_sidebar', 'nbdev/quarto.py'),
318
312
  'nbdev.quarto.fs_watchdog': ('api/quarto.html#fs_watchdog', 'nbdev/quarto.py'),
319
313
  'nbdev.quarto.install': ('api/quarto.html#install', 'nbdev/quarto.py'),
320
314
  'nbdev.quarto.install_quarto': ('api/quarto.html#install_quarto', 'nbdev/quarto.py'),
@@ -236,17 +236,16 @@ def _doc_mtime_not_older(readme_path, readme_nb_path):
236
236
  return readme_path.exists() and readme_path.stat().st_mtime>=readme_nb_path.stat().st_mtime
237
237
 
238
238
  # %% ../nbs/api/14_quarto.ipynb #7b70b5c8
239
- class _SidebarYmlRemoved:
240
- "Context manager for `nbdev-readme` to avoid rendering whole docs website"
241
- def __init__(self,path): self._path=path
242
- def __enter__(self):
243
- self._yml_path = self._path/'sidebar.yml'
244
- self._moved=False
245
- if self._yml_path.exists():
246
- self._yml_path.rename(self._path/'sidebar.yml.bak')
247
- self._moved=True
248
- def __exit__(self, exc_type, exc_value, exc_tb):
249
- if self._moved: (self._path/'sidebar.yml.bak').rename(self._yml_path)
239
+ def _strip_sidebar(cache):
240
+ "Drop website sidebar config from the staged copy at `cache`, so single-doc renders skip nav resolution (see quarto-dev/quarto-cli#14757)"
241
+ p = Path(cache)/'_quarto.yml'
242
+ if not p.exists(): return
243
+ cfg = yaml.safe_load(p.read_text())
244
+ (cfg.get('website') or {}).pop('sidebar', None)
245
+ mf = cfg.get('metadata-files')
246
+ if mf and 'sidebar.yml' in mf: mf.remove('sidebar.yml')
247
+ (Path(cache)/'sidebar.yml').unlink(missing_ok=True)
248
+ p.write_text(yaml.dump(cfg, sort_keys=False))
250
249
 
251
250
  # %% ../nbs/api/14_quarto.ipynb #49661bbf
252
251
  def _copytree(a,b):
@@ -285,12 +284,12 @@ def nbdev_readme(
285
284
  _chk_nbdev_yml(path)
286
285
  if chk_time and _doc_mtime_not_older(cfg.config_path/'README.md', path/cfg.readme_nb): return
287
286
 
288
- with _SidebarYmlRemoved(path): # to avoid rendering whole website
289
- cache = proc_nbs(path, file_glob=Path(cfg.readme_nb).name)
290
- for f in _readme_cands(cache, cfg):
291
- if f.exists(): f.unlink() # remove stale renders from either quarto layout
292
- _sprun(f'cd "{cache}" && quarto render "{cache/cfg.readme_nb}" -o README.md -t gfm --no-execute -M wrap:preserve')
293
-
287
+ cache = proc_nbs(path, file_glob=Path(cfg.readme_nb).name)
288
+ _strip_sidebar(cache) # to avoid rendering whole website
289
+ for f in _readme_cands(cache, cfg):
290
+ if f.exists(): f.unlink() # remove stale renders from either quarto layout
291
+ _sprun(f'cd "{cache}" && quarto render "{cache/cfg.readme_nb}" -o README.md -t gfm --no-execute -M wrap:preserve')
292
+
294
293
  _save_cached_readme(cache, cfg)
295
294
 
296
295
  # %% ../nbs/api/14_quarto.ipynb #ef3f1e1f
@@ -319,9 +318,9 @@ def nbdev_contributing(
319
318
  if not contrib_nb_path.exists(): return
320
319
  if chk_time and _doc_mtime_not_older(cfg.config_path / 'CONTRIBUTING.md' , contrib_nb_path): return
321
320
 
322
- with _SidebarYmlRemoved(path): # to avoid rendering whole website
323
- cache = proc_nbs(path, file_glob=Path(contrib_nb_name).name)
324
- _sprun(f'cd "{cache}" && quarto render "{cache/contrib_nb_name}" -o CONTRIBUTING.md -t gfm --no-execute -M wrap:preserve')
321
+ cache = proc_nbs(path, file_glob=Path(contrib_nb_name).name)
322
+ _strip_sidebar(cache) # to avoid rendering whole website
323
+ _sprun(f'cd "{cache}" && quarto render "{cache/contrib_nb_name}" -o CONTRIBUTING.md -t gfm --no-execute -M wrap:preserve')
325
324
 
326
325
  _save_cached_contributing(cache, cfg, contrib_nb_name)
327
326
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdev
3
- Version: 3.3.8
3
+ Version: 3.3.9
4
4
  Summary: Create delightful software with Jupyter Notebooks
5
5
  Author-email: "Jeremy Howard and the fast.ai community" <j@fast.ai>
6
6
  License: Apache-2.0
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