nbdev 3.3.26__tar.gz → 3.3.27__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 (42) hide show
  1. {nbdev-3.3.26/nbdev.egg-info → nbdev-3.3.27}/PKG-INFO +1 -1
  2. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/__init__.py +1 -1
  3. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/quarto_render.py +4 -3
  4. {nbdev-3.3.26 → nbdev-3.3.27/nbdev.egg-info}/PKG-INFO +1 -1
  5. {nbdev-3.3.26 → nbdev-3.3.27}/tests/test_quarto_render.py +6 -3
  6. {nbdev-3.3.26 → nbdev-3.3.27}/CONTRIBUTING.md +0 -0
  7. {nbdev-3.3.26 → nbdev-3.3.27}/LICENSE +0 -0
  8. {nbdev-3.3.26 → nbdev-3.3.27}/README.md +0 -0
  9. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/_modidx.py +0 -0
  10. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/clean.py +0 -0
  11. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/cli.py +0 -0
  12. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/config.py +0 -0
  13. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/diff.py +0 -0
  14. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/doclinks.py +0 -0
  15. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/export.py +0 -0
  16. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/extract_attachments.py +0 -0
  17. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/frontmatter.py +0 -0
  18. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/imports.py +0 -0
  19. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/maker.py +0 -0
  20. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/merge.py +0 -0
  21. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/migrate.py +0 -0
  22. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/moddocs.py +0 -0
  23. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/process.py +0 -0
  24. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/processors.py +0 -0
  25. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/qmd.py +0 -0
  26. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/quarto.py +0 -0
  27. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/readme_filter.py +0 -0
  28. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/release.py +0 -0
  29. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/scrubmagics.py +0 -0
  30. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/serve.py +0 -0
  31. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/serve_drv.py +0 -0
  32. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/showdoc.py +0 -0
  33. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/skill.py +0 -0
  34. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/sync.py +0 -0
  35. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev/test.py +0 -0
  36. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev.egg-info/SOURCES.txt +0 -0
  37. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev.egg-info/dependency_links.txt +0 -0
  38. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev.egg-info/entry_points.txt +0 -0
  39. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev.egg-info/requires.txt +0 -0
  40. {nbdev-3.3.26 → nbdev-3.3.27}/nbdev.egg-info/top_level.txt +0 -0
  41. {nbdev-3.3.26 → nbdev-3.3.27}/pyproject.toml +0 -0
  42. {nbdev-3.3.26 → nbdev-3.3.27}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdev
3
- Version: 3.3.26
3
+ Version: 3.3.27
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-Expression: Apache-2.0
@@ -6,7 +6,7 @@ Modules:
6
6
  - `nbdev.moddocs`: # Module docs: creating them from existing notebooks
7
7
  - `nbdev.skill`: Write, read and review nbdev notebooks as source, documentation, examples and tests. You MUST read this before any work on a project with notebooks."""
8
8
 
9
- __version__ = "3.3.26"
9
+ __version__ = "3.3.27"
10
10
 
11
11
  from .doclinks import nbdev_export
12
12
  from .showdoc import show_doc
@@ -6,8 +6,8 @@ from fastcore.parallel import parallel
6
6
  from fastcore.utils import *
7
7
 
8
8
 
9
- def _quarto(path, *args):
10
- res = subprocess.run(['quarto', *map(str, args)], cwd=path, capture_output=True, text=True)
9
+ def _quarto(path, *args, env=None):
10
+ res = subprocess.run(['quarto', *map(str, args)], cwd=path, capture_output=True, text=True, env=env)
11
11
  if res.returncode: raise RuntimeError(res.stderr or res.stdout or f'Quarto exited with status {res.returncode}')
12
12
  return res.stdout
13
13
 
@@ -25,7 +25,8 @@ def quarto_stale(path, output_dir):
25
25
 
26
26
  def _render_batch(job):
27
27
  path, inputs, output = job
28
- _quarto(path, 'render', *inputs, '--no-cache', '--no-clean', '--output-dir', output)
28
+ env = {**os.environ, 'XDG_CACHE_HOME': str(path/'.cache')} if sys.platform == 'linux' else None
29
+ _quarto(path, 'render', *inputs, '--no-cache', '--no-clean', '--output-dir', output, env=env)
29
30
  return output
30
31
 
31
32
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdev
3
- Version: 3.3.26
3
+ Version: 3.3.27
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-Expression: Apache-2.0
@@ -1,4 +1,4 @@
1
- import json, shutil, subprocess, pytest
1
+ import json, shutil, subprocess, sys, pytest
2
2
  from xml.etree import ElementTree as ET
3
3
  from fastcore.test import test_eq as teq
4
4
  from nbdev.quarto_render import render_quarto, quarto_stale
@@ -40,7 +40,9 @@ Documentation = "https://example.com/project/"
40
40
 
41
41
 
42
42
  @pytest.mark.skipif(not shutil.which('quarto'), reason='requires Quarto')
43
- def test_website(tmp_path):
43
+ def test_website(tmp_path, monkeypatch):
44
+ cache = tmp_path/'cache'
45
+ monkeypatch.setenv('XDG_CACHE_HOME', str(cache))
44
46
  root = tmp_path/'source'
45
47
  root.mkdir()
46
48
  (root/'_quarto.yml').write_text(r'''project:
@@ -68,9 +70,10 @@ Page {name}. [Alpha](alpha.qmd#detail). [Download](data.txt).
68
70
  (root/'other.qmd').write_text('---\noutput-file: renamed.html\n---\n# Other')
69
71
  serial, parallel = tmp_path/'serial', root/'_site'
70
72
  assert quarto_stale(root, parallel)
71
- render_quarto(root, serial, n_workers=1)
72
73
  render_quarto(root, parallel, n_workers=2)
74
+ if sys.platform == 'linux': assert not (cache/'quarto/sass').exists()
73
75
  assert not quarto_stale(root, parallel)
76
+ render_quarto(root, serial, n_workers=1)
74
77
  search = lambda d: {e['href']: e['text'] for e in json.loads((d/'search.json').read_text())}
75
78
  urls = lambda d: {e.text for e in ET.parse(d/'sitemap.xml').findall('.//{*}loc')}
76
79
  teq(search(serial), search(parallel))
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