nbdev 3.3.3__tar.gz → 3.3.4__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.3.3/nbdev.egg-info → nbdev-3.3.4}/PKG-INFO +1 -1
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/__init__.py +1 -1
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/quarto.py +9 -5
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/serve.py +1 -1
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/skill.py +2 -0
- {nbdev-3.3.3 → nbdev-3.3.4/nbdev.egg-info}/PKG-INFO +1 -1
- {nbdev-3.3.3 → nbdev-3.3.4}/CONTRIBUTING.md +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/LICENSE +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/MANIFEST.in +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/README.md +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/_modidx.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/clean.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/cli.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/config.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/diff.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/doclinks.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/export.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/extract_attachments.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/frontmatter.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/imports.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/maker.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/merge.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/migrate.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/process.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/processors.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/qmd.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/release.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/scrubmagics.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/serve_drv.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/showdoc.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/sync.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev/test.py +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev.egg-info/SOURCES.txt +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev.egg-info/dependency_links.txt +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev.egg-info/entry_points.txt +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev.egg-info/requires.txt +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/nbdev.egg-info/top_level.txt +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/pyproject.toml +0 -0
- {nbdev-3.3.3 → nbdev-3.3.4}/setup.cfg +0 -0
|
@@ -5,7 +5,7 @@ Modules:
|
|
|
5
5
|
- `nbdev.extract_attachments`: A preprocessor that extracts all of the attachments from the notebook file. The extracted attachments are returned in the 'resources' dictionary.
|
|
6
6
|
- `nbdev.skill`: Author clear, executable nbdev notebooks where code, prose, examples, outputs, and tests form one coherent narrative."""
|
|
7
7
|
|
|
8
|
-
__version__ = "3.3.
|
|
8
|
+
__version__ = "3.3.4"
|
|
9
9
|
|
|
10
10
|
from .doclinks import nbdev_export
|
|
11
11
|
from .showdoc import show_doc
|
|
@@ -208,8 +208,10 @@ def _chk_nbdev_yml(path):
|
|
|
208
208
|
|
|
209
209
|
# %% ../nbs/api/14_quarto.ipynb #6b880922
|
|
210
210
|
def _pre_docs(path=None, n_workers:int=defaults.cpus, **kwargs):
|
|
211
|
-
cfg = get_config()
|
|
212
|
-
path = Path(path) if path else cfg.nbs_path
|
|
211
|
+
cfg = get_config(path)
|
|
212
|
+
path = Path(path).absolute() if path else cfg.nbs_path
|
|
213
|
+
if not (path/'nbdev.yml').exists(): path = cfg.nbs_path # given a project root, fall back to its configured nbs
|
|
214
|
+
os.chdir(cfg.config_path) # bare `get_config()` runs downstream (including in render workers), so anchor the cwd
|
|
213
215
|
_chk_nbdev_yml(path)
|
|
214
216
|
_ensure_quarto()
|
|
215
217
|
refresh_quarto_yml()
|
|
@@ -272,12 +274,14 @@ def _save_cached_readme(cache, cfg):
|
|
|
272
274
|
# %% ../nbs/api/14_quarto.ipynb #45d6bb5d
|
|
273
275
|
@call_parse
|
|
274
276
|
def nbdev_readme(
|
|
275
|
-
path:str=None, # Path to notebooks
|
|
277
|
+
path:str=None, # Path to notebooks (or project root)
|
|
276
278
|
chk_time:bool=False): # Only build if out of date
|
|
277
279
|
"Create README.md from readme_nb (index.ipynb by default). Skips if the file doesn't exist."
|
|
278
|
-
cfg = get_config()
|
|
279
|
-
path = Path(path) if path else cfg.nbs_path
|
|
280
|
+
cfg = get_config(path)
|
|
281
|
+
path = Path(path).absolute() if path else cfg.nbs_path
|
|
282
|
+
if not (path/cfg.readme_nb).exists(): path = cfg.nbs_path # given a project root, fall back to its configured nbs
|
|
280
283
|
if not (path/cfg.readme_nb).exists(): return
|
|
284
|
+
os.chdir(cfg.config_path) # bare `get_config()` runs downstream (including in render workers), so anchor the cwd
|
|
281
285
|
_chk_nbdev_yml(path)
|
|
282
286
|
if chk_time and _doc_mtime_not_older(cfg.config_path/'README.md', path/cfg.readme_nb): return
|
|
283
287
|
|
|
@@ -70,7 +70,7 @@ def proc_nbs(
|
|
|
70
70
|
file_re:str='', # Only process notebooks matching regex (other files are always included)
|
|
71
71
|
**kwargs):
|
|
72
72
|
"Process notebooks in `path` for docs rendering"
|
|
73
|
-
cfg = get_config()
|
|
73
|
+
cfg = get_config(path or None)
|
|
74
74
|
cache = cfg.config_path/'_proc'
|
|
75
75
|
path = Path(path or cfg.nbs_path)
|
|
76
76
|
files = nbglob(path, func=Path, file_glob='', file_re='', **kwargs)
|
|
@@ -72,6 +72,8 @@ Keep imports in dedicated import cells, define values near first use, reuse esta
|
|
|
72
72
|
|
|
73
73
|
Everything here describes nbdev v3 (released Jan 2026, possibly after a model's training cutoff). Key user-visible changes from v2: config moved from `settings.ini` to `pyproject.toml`, with standard metadata in `[project]`, nbdev-specific keys in `[tool.nbdev]` (defaults `nbs_path='nbs'`, `doc_path='_docs'`), version in `__init__.py` via `dynamic = ["version"]`, and `_modidx` registered under `[project.entry-points.nbdev]`. CLI commands use hyphens (`nbdev-export`, `nbdev-test`, ...) though Python functions keep underscores. GitHub workflows use the v3 actions (`fastai/workflows/nbdev3-ci`, `quarto-ghp3`).
|
|
74
74
|
|
|
75
|
+
Directives can also live in cell *metadata*, under the `nbdev` key (`{"nbdev": {"export": "true"}}`), instead of `#|` comment lines. Export and the rest of the toolchain honor both; `mk_cell(source, metadata=...).directives` is the merged read, with the comment winning when both set the same key. The editing toolkit keeps the meta form visible: summaries show it bracketed after the type char (`id:c[export]:...` in nbio's `CellRow` and aidialog's previews), XML views render it as attrs (a bare `export` on the tag), and aidialog's `Message` offers `exported` (either form, read-only) and `meta_exported` (meta only, assignable), with `export=`/`meta=` params on the add functions.
|
|
76
|
+
|
|
75
77
|
# Before you finish
|
|
76
78
|
|
|
77
79
|
Each new test cell ran red then green, failing before the change and passing after. Re-read the touched section as a reader would, against the conventions above. Style damage breaks no test and no export, so the harm only shows on the docs page.
|
|
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
|
|
File without changes
|