nbdev 2.3.32__tar.gz → 2.3.33__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-2.3.32/nbdev.egg-info → nbdev-2.3.33}/PKG-INFO +2 -2
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/__init__.py +1 -1
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/_modidx.py +1 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/doclinks.py +36 -22
- {nbdev-2.3.32 → nbdev-2.3.33/nbdev.egg-info}/PKG-INFO +2 -2
- {nbdev-2.3.32 → nbdev-2.3.33}/settings.ini +5 -5
- {nbdev-2.3.32 → nbdev-2.3.33}/CONTRIBUTING.md +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/LICENSE +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/MANIFEST.in +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/README.md +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/clean.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/cli.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/config.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/export.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/extract_attachments.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/frontmatter.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/imports.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/maker.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/merge.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/migrate.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/process.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/processors.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/qmd.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/quarto.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/release.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/serve.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/serve_drv.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/showdoc.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/sync.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev/test.py +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev.egg-info/SOURCES.txt +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev.egg-info/dependency_links.txt +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev.egg-info/entry_points.txt +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev.egg-info/not-zip-safe +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev.egg-info/requires.txt +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/nbdev.egg-info/top_level.txt +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/pyproject.toml +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/setup.cfg +0 -0
- {nbdev-2.3.32 → nbdev-2.3.33}/setup.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: nbdev
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.33
|
|
4
4
|
Summary: Create delightful software with Jupyter Notebooks
|
|
5
|
-
Home-page: https://github.com/
|
|
5
|
+
Home-page: https://github.com/AnswerDotAI/nbdev
|
|
6
6
|
Author: Jeremy Howard and Hamel Husain
|
|
7
7
|
Author-email: j@fast.ai
|
|
8
8
|
License: Apache Software License 2.0
|
|
@@ -58,6 +58,7 @@ d = { 'settings': { 'branch': 'master',
|
|
|
58
58
|
'nbdev.doclinks.NbdevLookup.link_line': ('api/doclinks.html#nbdevlookup.link_line', 'nbdev/doclinks.py'),
|
|
59
59
|
'nbdev.doclinks.NbdevLookup.linkify': ('api/doclinks.html#nbdevlookup.linkify', 'nbdev/doclinks.py'),
|
|
60
60
|
'nbdev.doclinks._binop_leafs': ('api/doclinks.html#_binop_leafs', 'nbdev/doclinks.py'),
|
|
61
|
+
'nbdev.doclinks._build_lookup_table': ('api/doclinks.html#_build_lookup_table', 'nbdev/doclinks.py'),
|
|
61
62
|
'nbdev.doclinks._build_modidx': ('api/doclinks.html#_build_modidx', 'nbdev/doclinks.py'),
|
|
62
63
|
'nbdev.doclinks._find_mod': ('api/doclinks.html#_find_mod', 'nbdev/doclinks.py'),
|
|
63
64
|
'nbdev.doclinks._get_exps': ('api/doclinks.html#_get_exps', 'nbdev/doclinks.py'),
|
|
@@ -22,6 +22,7 @@ from astunparse import unparse
|
|
|
22
22
|
from pprint import pformat
|
|
23
23
|
from urllib.parse import urljoin
|
|
24
24
|
from functools import lru_cache
|
|
25
|
+
from types import ModuleType
|
|
25
26
|
|
|
26
27
|
# %% ../nbs/api/05_doclinks.ipynb
|
|
27
28
|
def _sym_nm(klas, sym): return f'{unparse(klas).strip()}.{sym.name}'
|
|
@@ -166,6 +167,7 @@ def _find_mod(mod):
|
|
|
166
167
|
|
|
167
168
|
@lru_cache(None)
|
|
168
169
|
def _get_exps(mod):
|
|
170
|
+
"Get the line numbers for function and class definitions in module"
|
|
169
171
|
mf = _find_mod(mod)
|
|
170
172
|
if not mf: return {}
|
|
171
173
|
txt = mf.read_text(encoding='utf-8')
|
|
@@ -181,6 +183,7 @@ def _lineno(sym, fname): return _get_exps(fname).get(sym, None) if fname else No
|
|
|
181
183
|
|
|
182
184
|
# %% ../nbs/api/05_doclinks.ipynb
|
|
183
185
|
def _qual_sym(s, settings):
|
|
186
|
+
"Get qualified nb, py, and github paths for a symbol s"
|
|
184
187
|
if not isinstance(s,tuple): return s
|
|
185
188
|
nb,py = s
|
|
186
189
|
nbbase = urljoin(settings["doc_host"]+'/',settings["doc_baseurl"])
|
|
@@ -199,30 +202,41 @@ _re_backticks = re.compile(r'`([^`\s]+?)(?:\(\))?`')
|
|
|
199
202
|
|
|
200
203
|
# %% ../nbs/api/05_doclinks.ipynb
|
|
201
204
|
@lru_cache(None)
|
|
205
|
+
def _build_lookup_table(strip_libs=None, incl_libs=None, skip_mods=None):
|
|
206
|
+
cfg = get_config()
|
|
207
|
+
if strip_libs is None:
|
|
208
|
+
try: strip_libs = cfg.get('strip_libs', cfg.get('lib_path', 'nbdev').name).split()
|
|
209
|
+
except FileNotFoundError: strip_libs = 'nbdev'
|
|
210
|
+
skip_mods = setify(skip_mods)
|
|
211
|
+
strip_libs = L(strip_libs)
|
|
212
|
+
if incl_libs is not None: incl_libs = (L(incl_libs)+strip_libs).unique()
|
|
213
|
+
entries = {}
|
|
214
|
+
for o in pkg_resources.iter_entry_points(group='nbdev'):
|
|
215
|
+
if incl_libs is not None and o.dist.key not in incl_libs: continue
|
|
216
|
+
try: entries[o.name] = _qual_syms(o.resolve())
|
|
217
|
+
except Exception: pass
|
|
218
|
+
py_syms = merge(*L(o['syms'].values() for o in entries.values()).concat())
|
|
219
|
+
for m in strip_libs:
|
|
220
|
+
if m in entries:
|
|
221
|
+
_d = entries[m]
|
|
222
|
+
stripped = {remove_prefix(k,f"{mod}."):v
|
|
223
|
+
for mod,dets in _d['syms'].items() if mod not in skip_mods
|
|
224
|
+
for k,v in dets.items()}
|
|
225
|
+
py_syms = merge(stripped, py_syms)
|
|
226
|
+
return entries,py_syms
|
|
227
|
+
|
|
228
|
+
# %% ../nbs/api/05_doclinks.ipynb
|
|
202
229
|
class NbdevLookup:
|
|
203
230
|
"Mapping from symbol names to docs and source URLs"
|
|
204
|
-
def __init__(self, strip_libs=None, incl_libs=None, skip_mods=None):
|
|
205
|
-
|
|
206
|
-
if
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
self.entries = {o.name: _qual_syms(o.resolve()) for o in list(pkg_resources.iter_entry_points(group='nbdev'))
|
|
214
|
-
if incl_libs is None or o.dist.key in incl_libs}
|
|
215
|
-
py_syms = merge(*L(o['syms'].values() for o in self.entries.values()).concat())
|
|
216
|
-
for m in strip_libs:
|
|
217
|
-
if m in self.entries:
|
|
218
|
-
_d = self.entries[m]
|
|
219
|
-
stripped = {remove_prefix(k,f"{mod}."):v
|
|
220
|
-
for mod,dets in _d['syms'].items() if mod not in skip_mods
|
|
221
|
-
for k,v in dets.items()}
|
|
222
|
-
py_syms = merge(stripped, py_syms)
|
|
223
|
-
self.syms = py_syms
|
|
224
|
-
|
|
225
|
-
def __getitem__(self, s): return self.syms.get(s, None)
|
|
231
|
+
def __init__(self, strip_libs=None, incl_libs=None, skip_mods=None, ns=None):
|
|
232
|
+
self.entries,self.syms = _build_lookup_table(strip_libs, incl_libs, skip_mods)
|
|
233
|
+
self.aliases = {n:o.__name__ for n,o in (ns or {}).items() if isinstance(o, ModuleType)}
|
|
234
|
+
|
|
235
|
+
def __getitem__(self, s):
|
|
236
|
+
if '.' in s:
|
|
237
|
+
pre,post = s.split('.', 1)
|
|
238
|
+
if pre in self.aliases: s = f"{self.aliases[pre]}.{post}"
|
|
239
|
+
return self.syms.get(s, None)
|
|
226
240
|
|
|
227
241
|
def doc(self, sym):
|
|
228
242
|
"Link to docs for `sym`"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: nbdev
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.33
|
|
4
4
|
Summary: Create delightful software with Jupyter Notebooks
|
|
5
|
-
Home-page: https://github.com/
|
|
5
|
+
Home-page: https://github.com/AnswerDotAI/nbdev
|
|
6
6
|
Author: Jeremy Howard and Hamel Husain
|
|
7
7
|
Author-email: j@fast.ai
|
|
8
8
|
License: Apache Software License 2.0
|
|
@@ -4,12 +4,12 @@ repo = nbdev
|
|
|
4
4
|
description = Create delightful software with Jupyter Notebooks
|
|
5
5
|
copyright = 2020 onwards, Jeremy Howard
|
|
6
6
|
keywords = nbdev fastai jupyter notebook export
|
|
7
|
-
user =
|
|
7
|
+
user = AnswerDotAI
|
|
8
8
|
author = Jeremy Howard and Hamel Husain
|
|
9
9
|
author_email = j@fast.ai
|
|
10
10
|
branch = master
|
|
11
11
|
min_python = 3.7
|
|
12
|
-
version = 2.3.
|
|
12
|
+
version = 2.3.33
|
|
13
13
|
audience = Developers
|
|
14
14
|
language = English
|
|
15
15
|
custom_sidebar = True
|
|
@@ -50,15 +50,15 @@ console_scripts = nbdev_create_config=nbdev.config:nbdev_create_config
|
|
|
50
50
|
nbdev_requirements=nbdev.release:write_requirements
|
|
51
51
|
nbdev_proc_nbs=nbdev.quarto:nbdev_proc_nbs
|
|
52
52
|
nbdev_help=nbdev.cli:chelp
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
nb_export=nbdev.cli:nb_export_cli
|
|
54
|
+
watch_export=nbdev.cli:watch_export
|
|
55
55
|
tst_flags = notest
|
|
56
56
|
nbs_path = nbs
|
|
57
57
|
doc_path = _docs
|
|
58
58
|
recursive = True
|
|
59
59
|
doc_host = https://nbdev.fast.ai
|
|
60
60
|
doc_baseurl = /
|
|
61
|
-
git_url = https://github.com/
|
|
61
|
+
git_url = https://github.com/AnswerDotAI/nbdev
|
|
62
62
|
lib_path = nbdev
|
|
63
63
|
title = nbdev
|
|
64
64
|
black_formatting = False
|
|
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
|