nbdev 3.3.18__tar.gz → 3.3.20__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.18/nbdev.egg-info → nbdev-3.3.20}/PKG-INFO +2 -3
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/__init__.py +1 -1
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/cli.py +3 -3
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/config.py +2 -2
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/doclinks.py +4 -1
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/serve.py +1 -1
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/skill.py +2 -2
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/test.py +5 -4
- {nbdev-3.3.18 → nbdev-3.3.20/nbdev.egg-info}/PKG-INFO +2 -3
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev.egg-info/requires.txt +1 -2
- {nbdev-3.3.18 → nbdev-3.3.20}/pyproject.toml +2 -3
- {nbdev-3.3.18 → nbdev-3.3.20}/CONTRIBUTING.md +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/LICENSE +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/README.md +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/_modidx.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/clean.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/diff.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/export.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/extract_attachments.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/frontmatter.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/imports.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/maker.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/merge.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/migrate.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/moddocs.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/process.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/processors.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/qmd.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/quarto.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/release.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/scrubmagics.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/serve_drv.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/showdoc.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev/sync.py +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev.egg-info/SOURCES.txt +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev.egg-info/dependency_links.txt +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev.egg-info/entry_points.txt +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/nbdev.egg-info/top_level.txt +0 -0
- {nbdev-3.3.18 → nbdev-3.3.20}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nbdev
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.20
|
|
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
|
|
@@ -16,7 +16,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: fastcore>=2.2.
|
|
19
|
+
Requires-Dist: fastcore>=2.2.28
|
|
20
20
|
Requires-Dist: execnb>=0.3.3
|
|
21
21
|
Requires-Dist: astunparse
|
|
22
22
|
Requires-Dist: ghapi>=2.0.2
|
|
@@ -35,7 +35,6 @@ Requires-Dist: pandas; extra == "dev"
|
|
|
35
35
|
Requires-Dist: matplotlib; extra == "dev"
|
|
36
36
|
Requires-Dist: black; extra == "dev"
|
|
37
37
|
Requires-Dist: svg.py; extra == "dev"
|
|
38
|
-
Requires-Dist: nbclassic; extra == "dev"
|
|
39
38
|
Requires-Dist: pysym2md>=0.0.6; extra == "dev"
|
|
40
39
|
Requires-Dist: llms-txt; extra == "dev"
|
|
41
40
|
Requires-Dist: sphinx; extra == "dev"
|
|
@@ -6,7 +6,7 @@ Modules:
|
|
|
6
6
|
- `nbdev.moddocs`: # Module docs: creating them from existing notebooks
|
|
7
7
|
- `nbdev.skill`: Author nbdev notebooks as source, documentation, examples, and tests. Ensure this guidance is in context before any notebook edit."""
|
|
8
8
|
|
|
9
|
-
__version__ = "3.3.
|
|
9
|
+
__version__ = "3.3.20"
|
|
10
10
|
|
|
11
11
|
from .doclinks import nbdev_export
|
|
12
12
|
from .showdoc import show_doc
|
|
@@ -156,16 +156,16 @@ async def nbdev_update_license(
|
|
|
156
156
|
|
|
157
157
|
mapped = mapping.get(to, None)
|
|
158
158
|
if mapped not in avail_lic: raise ValueError(f"{to} is not an available license")
|
|
159
|
-
|
|
159
|
+
lic = await api.licenses.get(mapped)
|
|
160
160
|
|
|
161
161
|
copyright = f"{datetime.now().year}, {cfg.author}"
|
|
162
|
-
body = body.replace('[year], [fullname]', copyright)
|
|
162
|
+
body = lic['body'].replace('[year], [fullname]', copyright)
|
|
163
163
|
body = body.replace('[year] [fullname]', copyright)
|
|
164
164
|
|
|
165
165
|
# Update pyproject.toml
|
|
166
166
|
pyproj = cfg.config_file
|
|
167
167
|
content = pyproj.read_text()
|
|
168
|
-
content = re.sub(r'^
|
|
168
|
+
content = re.sub(r'^license\s*=.*$', f'license = "{lic.spdx_id}"', content, flags=re.MULTILINE)
|
|
169
169
|
pyproj.write_text(content)
|
|
170
170
|
|
|
171
171
|
Path('LICENSE').write_text(body)
|
|
@@ -71,7 +71,7 @@ def _fetch_from_git(raise_err=False):
|
|
|
71
71
|
|
|
72
72
|
# %% ../nbs/api/01_config.ipynb #05aae09f
|
|
73
73
|
pyproject_tmpl = '''[build-system]
|
|
74
|
-
requires = ["setuptools>=
|
|
74
|
+
requires = ["setuptools>=77"]
|
|
75
75
|
build-backend = "setuptools.build_meta"
|
|
76
76
|
|
|
77
77
|
[project]
|
|
@@ -80,7 +80,7 @@ dynamic = ["version"]
|
|
|
80
80
|
description = "{description}"
|
|
81
81
|
readme = "README.md"
|
|
82
82
|
requires-python = ">={min_python}"
|
|
83
|
-
license =
|
|
83
|
+
license = "{license}"
|
|
84
84
|
authors = [{{name = "{author}", email = "{author_email}"}}]
|
|
85
85
|
keywords = {keywords}
|
|
86
86
|
classifiers = [
|
|
@@ -129,12 +129,15 @@ def nbglob_cli(
|
|
|
129
129
|
symlinks:bool=False, # Follow symlinks?
|
|
130
130
|
file_glob:str='*.ipynb', # Only include files matching glob
|
|
131
131
|
file_re:str=None, # Only include files matching regex
|
|
132
|
+
path_glob:str=None, # Only include files whose full paths match glob (wildcards match separators)
|
|
133
|
+
path_re:str=None, # Only include files whose full paths match regex
|
|
132
134
|
folder_re:str=None, # Only enter folders matching regex
|
|
133
135
|
skip_file_glob:str=None, # Skip files matching glob
|
|
134
136
|
skip_file_re:str='^[_.]', # Skip files matching regex
|
|
135
137
|
skip_folder_re:str = '^[_.]'): # Skip folders matching regex
|
|
136
138
|
"Find all files in a directory matching an extension given a config key."
|
|
137
|
-
return nbglob(path, symlinks=symlinks, file_glob=file_glob, file_re=file_re,
|
|
139
|
+
return nbglob(path, symlinks=symlinks, file_glob=file_glob, file_re=file_re,
|
|
140
|
+
path_glob=path_glob, path_re=path_re, folder_re=folder_re,
|
|
138
141
|
skip_file_glob=skip_file_glob, skip_file_re=skip_file_re, skip_folder_re=skip_folder_re)
|
|
139
142
|
|
|
140
143
|
# %% ../nbs/api/05_doclinks.ipynb #5e6fbe08
|
|
@@ -87,7 +87,7 @@ def proc_nbs(
|
|
|
87
87
|
(cache/'_quarto.yml').unlink(missing_ok=True) # single-doc renders strip the staged copy in place (`_strip_sidebar`), so always restage it
|
|
88
88
|
|
|
89
89
|
files = files.map(_proc_file, mtime=cache_mtime, cache=cache, path=path).filter()
|
|
90
|
-
kw = {} if
|
|
90
|
+
kw = {} if in_notebook() else {'method':'spawn'}
|
|
91
91
|
parallel(nbdev.serve_drv.main, files, n_workers=n_workers, pause=0.01, **kw)
|
|
92
92
|
if cache.exists(): cache.touch()
|
|
93
93
|
return cache
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Write notebooks to be read top-to-bottom, interleaving implementation, explanation, examples, outputs, and failure demonstrations. These conventions target published libraries; match surrounding notebooks in internal projects.
|
|
6
6
|
|
|
7
|
-
Check the file, not the repo: `# AUTOGENERATED! DO NOT EDIT!` names the source notebook; `# %% ../nbs/04_usage.ipynb #a45f753a` identifies the source cell. Edit that notebook, never generated modules, `__all__`, `_modidx.py`, or module docstrings; `nbdev-export` regenerates them. Unmarked modules are hand-written. Use notebooks where narrative/examples teach the API, plain `.py` for dense mechanism iterated under pytest. Tests follow source form: lesson cells for notebooks, `tests/*.py` for plain modules.
|
|
7
|
+
Check the file, not the repo: `# AUTOGENERATED! DO NOT EDIT!` names the source notebook; `# %% ../nbs/04_usage.ipynb #a45f753a` identifies the source cell. Edit that notebook, never generated modules, `__all__`, `_modidx.py`, or module docstrings; `nbdev-export` regenerates them. Unmarked modules are hand-written. Use notebooks where narrative/examples teach the API, plain `.py` for dense mechanism iterated under pytest (which should be very rare; never add pytests to a project that doesn't have any, unless explicitly requested). Tests follow source form: lesson cells for notebooks, `tests/*.py` for plain modules.
|
|
8
8
|
|
|
9
9
|
For project-level questions, read `nbs/index.ipynb`, the source of README.md; regenerate with `nbdev-readme` after changes.
|
|
10
10
|
|
|
@@ -36,7 +36,7 @@ Check claims by running code before documenting them; preview assembly with `nbd
|
|
|
36
36
|
|
|
37
37
|
Write page content, not standalone test cells (except rare hidden checks): realistic values, minimal setup, reused objects, and direct assertions that support the lesson. End lesson cells with an informative displayed value when there is something useful to show. Compact `_repr_markdown_` or structured summaries can make later examples readable; plots, tables, images, and HTML also provide evidence. Explain what matters in large outputs and keep stored results focused.
|
|
38
38
|
|
|
39
|
-
Use `fastcore.test` assertions and `expect_fail` in ordinary code cells, with one focused error example per contract. Keep check plumbing, mocks, dense comprehensions, and long setup out of reader-facing examples: extract a small helper or hide the check.
|
|
39
|
+
Use `fastcore.test` assertions and `expect_fail` in ordinary code cells, with one focused error example per contract. Keep check plumbing, mocks, dense comprehensions, and long setup out of reader-facing examples: extract a small helper or hide the check. Use `nbdev-test --file-re` for running >1 named notebook, since they'll run in parallel.
|
|
40
40
|
|
|
41
41
|
Review these as rewrite signals, not absolute rules:
|
|
42
42
|
|
|
@@ -92,12 +92,12 @@ def test_nb(
|
|
|
92
92
|
cell_timing_min:float=None # print cells slower than this many seconds (None: no timing output)
|
|
93
93
|
):
|
|
94
94
|
"Execute tests in notebook in `fn` except those with `skip_flags`"
|
|
95
|
-
if not
|
|
95
|
+
if not in_notebook() and threading.current_thread() is threading.main_thread(): signal.signal(signal.SIGINT, _int_handler)
|
|
96
96
|
fn = Path(fn)
|
|
97
97
|
_cur_nb[0] = fn
|
|
98
98
|
if basepath: sys.path.insert(0, str(basepath))
|
|
99
99
|
prev_test = os.environ.get('IN_TEST')
|
|
100
|
-
if not
|
|
100
|
+
if not in_notebook(): os.environ['IN_TEST'] = '1'
|
|
101
101
|
try:
|
|
102
102
|
nb = NBProcessor(fn, rm_directives=False, process=True).nb
|
|
103
103
|
fm = nb_frontmatter(nb)
|
|
@@ -143,7 +143,7 @@ def _keep_file(
|
|
|
143
143
|
@call_parse(pos=['path'])
|
|
144
144
|
@delegates(nbglob_cli)
|
|
145
145
|
def nbdev_test(
|
|
146
|
-
path:str=None, # A notebook
|
|
146
|
+
path:str=None, # A notebook, directory, or full-path glob to test
|
|
147
147
|
flags:str='', # Space separated list of test flags to run that are normally ignored
|
|
148
148
|
n_workers:int=None, # Number of workers
|
|
149
149
|
timing:bool=False, # Time each notebook to see which are slow
|
|
@@ -157,6 +157,7 @@ def nbdev_test(
|
|
|
157
157
|
**kwargs
|
|
158
158
|
):
|
|
159
159
|
"Test in parallel notebooks matching `path`, passing along `flags`"
|
|
160
|
+
if path and not Path(path).exists(): kwargs['path_glob'],path = os.path.abspath(path),Path.cwd()
|
|
160
161
|
cfg = get_config(Path(path).resolve() if path else None)
|
|
161
162
|
cell_timeout,cell_timing_min = ifnone(cell_timeout, cfg.cell_timeout),ifnone(cell_timing_min, cfg.get('cell_timing_min'))
|
|
162
163
|
skip_flags = cfg.tst_flags
|
|
@@ -167,7 +168,7 @@ def nbdev_test(
|
|
|
167
168
|
if len(files)==0: return print('No files were eligible for testing')
|
|
168
169
|
|
|
169
170
|
if n_workers is None: n_workers = 0 if len(files)==1 else min(num_cpus(), 8)
|
|
170
|
-
if
|
|
171
|
+
if in_notebook(): kw = {'method':'spawn'} if os.name=='nt' or sys.platform=='darwin' else {'method':'forkserver'}
|
|
171
172
|
else: kw = {'method':'spawn'} if sys.platform=='darwin' else {}
|
|
172
173
|
wd_pth = cfg.nbs_path
|
|
173
174
|
with working_directory(wd_pth if (wd_pth and wd_pth.exists()) else os.getcwd()):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nbdev
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.20
|
|
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
|
|
@@ -16,7 +16,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: fastcore>=2.2.
|
|
19
|
+
Requires-Dist: fastcore>=2.2.28
|
|
20
20
|
Requires-Dist: execnb>=0.3.3
|
|
21
21
|
Requires-Dist: astunparse
|
|
22
22
|
Requires-Dist: ghapi>=2.0.2
|
|
@@ -35,7 +35,6 @@ Requires-Dist: pandas; extra == "dev"
|
|
|
35
35
|
Requires-Dist: matplotlib; extra == "dev"
|
|
36
36
|
Requires-Dist: black; extra == "dev"
|
|
37
37
|
Requires-Dist: svg.py; extra == "dev"
|
|
38
|
-
Requires-Dist: nbclassic; extra == "dev"
|
|
39
38
|
Requires-Dist: pysym2md>=0.0.6; extra == "dev"
|
|
40
39
|
Requires-Dist: llms-txt; extra == "dev"
|
|
41
40
|
Requires-Dist: sphinx; extra == "dev"
|
|
@@ -19,12 +19,11 @@ classifiers = [
|
|
|
19
19
|
"License :: OSI Approved :: Apache Software License",
|
|
20
20
|
]
|
|
21
21
|
dynamic = ["version"]
|
|
22
|
-
dependencies = [ "fastcore>=2.2.
|
|
22
|
+
dependencies = [ "fastcore>=2.2.28", "execnb>=0.3.3", "astunparse", "ghapi>=2.0.2", "watchdog", "asttokens",
|
|
23
23
|
"setuptools", "build", "fastgit>=0.0.7", "pyyaml", "tomli; python_version < '3.11'", ]
|
|
24
24
|
|
|
25
25
|
[project.optional-dependencies]
|
|
26
|
-
dev = [ "ipywidgets", "nbdev-numpy", "nbdev-stdlib", "pandas", "matplotlib", "black", "svg.py", "
|
|
27
|
-
"pysym2md>=0.0.6", "llms-txt", "sphinx", "plum-dispatch", ]
|
|
26
|
+
dev = [ "ipywidgets", "nbdev-numpy", "nbdev-stdlib", "pandas", "matplotlib", "black", "svg.py", "pysym2md>=0.0.6", "llms-txt", "sphinx", "plum-dispatch", ]
|
|
28
27
|
|
|
29
28
|
[project.urls]
|
|
30
29
|
Repository = "https://github.com/AnswerDotAI/nbdev"
|
|
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
|