nbdev 2.3.33__py3-none-any.whl → 2.3.34__py3-none-any.whl

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/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "2.3.33"
1
+ __version__ = "2.3.34"
2
2
 
3
3
  from .doclinks import nbdev_export
4
4
  from .showdoc import show_doc
nbdev/_modidx.py CHANGED
@@ -3,7 +3,7 @@
3
3
  d = { 'settings': { 'branch': 'master',
4
4
  'doc_baseurl': '/',
5
5
  'doc_host': 'https://nbdev.fast.ai',
6
- 'git_url': 'https://github.com/fastai/nbdev',
6
+ 'git_url': 'https://github.com/AnswerDotAI/nbdev',
7
7
  'lib_path': 'nbdev'},
8
8
  'syms': { 'nbdev.clean': { 'nbdev.clean._add_jupyter_hooks': ('api/clean.html#_add_jupyter_hooks', 'nbdev/clean.py'),
9
9
  'nbdev.clean._clean_cell': ('api/clean.html#_clean_cell', 'nbdev/clean.py'),
@@ -70,6 +70,7 @@ d = { 'settings': { 'branch': 'master',
70
70
  'nbdev.doclinks._qual_sym': ('api/doclinks.html#_qual_sym', 'nbdev/doclinks.py'),
71
71
  'nbdev.doclinks._qual_syms': ('api/doclinks.html#_qual_syms', 'nbdev/doclinks.py'),
72
72
  'nbdev.doclinks._sym_nm': ('api/doclinks.html#_sym_nm', 'nbdev/doclinks.py'),
73
+ 'nbdev.doclinks.create_index': ('api/doclinks.html#create_index', 'nbdev/doclinks.py'),
73
74
  'nbdev.doclinks.nbdev_export': ('api/doclinks.html#nbdev_export', 'nbdev/doclinks.py'),
74
75
  'nbdev.doclinks.nbglob': ('api/doclinks.html#nbglob', 'nbdev/doclinks.py'),
75
76
  'nbdev.doclinks.nbglob_cli': ('api/doclinks.html#nbglob_cli', 'nbdev/doclinks.py'),
nbdev/config.py CHANGED
@@ -138,7 +138,7 @@ def _cfg2txt(cfg, head, sections, tail=''):
138
138
 
139
139
  # %% ../nbs/api/01_config.ipynb
140
140
  _nbdev_cfg_head = '''# All sections below are required unless otherwise specified.
141
- # See https://github.com/fastai/nbdev/blob/master/settings.ini for examples.
141
+ # See https://github.com/AnswerDotAI/nbdev/blob/main/settings.ini for examples.
142
142
 
143
143
  '''
144
144
  _nbdev_cfg_sections = {'Python library': 'repo lib_name version min_python license black_formatting',
nbdev/doclinks.py CHANGED
@@ -3,7 +3,7 @@
3
3
  # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/api/05_doclinks.ipynb.
4
4
 
5
5
  # %% auto 0
6
- __all__ = ['patch_name', 'nbglob', 'nbglob_cli', 'nbdev_export', 'NbdevLookup']
6
+ __all__ = ['typs', 'bset', 'patch_name', 'nbglob', 'nbglob_cli', 'nbdev_export', 'create_index', 'NbdevLookup']
7
7
 
8
8
  # %% ../nbs/api/05_doclinks.ipynb
9
9
  from .config import *
@@ -14,11 +14,14 @@ from .imports import *
14
14
  from fastcore.script import *
15
15
  from fastcore.utils import *
16
16
  from fastcore.meta import delegates
17
+ from fastcore.net import urlread
17
18
 
18
- import ast,contextlib
19
+ import ast,builtins,contextlib
19
20
  import pkg_resources,importlib
20
- from astunparse import unparse
21
21
 
22
+ from astunparse import unparse
23
+ from io import BytesIO
24
+ from collections import defaultdict
22
25
  from pprint import pformat
23
26
  from urllib.parse import urljoin
24
27
  from functools import lru_cache
@@ -153,6 +156,28 @@ def nbdev_export(
153
156
  add_init(get_config().lib_path)
154
157
  _build_modidx()
155
158
 
159
+ # %% ../nbs/api/05_doclinks.ipynb
160
+ typs = 'module','class','method','function'
161
+ bset = set(dir(builtins))
162
+
163
+ # %% ../nbs/api/05_doclinks.ipynb
164
+ def create_index(url, pre=None):
165
+ "Create a documentation index from a sphinx inventory file at `url`, with optional prefix `pre`"
166
+ try: from sphinx.util.inventory import InventoryFile
167
+ except ImportError: raise ImportError('`sphinx` is a dependency for building indexes. Run `pip install sphinx` to use `create_index`.')
168
+ pre = ifnone(pre, f"{url}/")
169
+ invs = urlread(f'{url}/objects.inv', decode=False)
170
+ idx = InventoryFile.load(stream=BytesIO(invs), uri=pre, joinfunc=urljoin)
171
+ _get = lambda o: {k:v[2] for k,v in idx[f'py:{o}'].items() if k[0]!='_'}
172
+ d = {o:_get(o) for o in typs}
173
+ syms = defaultdict(dict)
174
+ for o in typs:
175
+ for k,v in d[o].items():
176
+ if k.split('.')[0] in bset: k = 'builtins.' + k
177
+ modparts = k.split(".")[:-2 if o=='method' else -1]
178
+ if modparts: syms['.'.join(modparts)][k] = v
179
+ return syms
180
+
156
181
  # %% ../nbs/api/05_doclinks.ipynb
157
182
  import importlib,ast
158
183
  from functools import lru_cache
nbdev/processors.py CHANGED
@@ -249,7 +249,7 @@ class exec_show_docs(Processor):
249
249
  if _do_eval(cell): self.k.cell(cell)
250
250
  title = fm.get('title', '')
251
251
  if self.k.exc:
252
- raise Exception(f"Error{' in notebook: '+title if title else ''} in cell {cell.idx_} :\n{cell.source}") from self.k.exc[1]
252
+ raise Exception(f"Error{' in notebook: '+title if title else ''} in cell {cell.idx_} :\n{cell.source}") from self.k.exc
253
253
 
254
254
  def end(self):
255
255
  try: from ipywidgets import Widget
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nbdev
3
- Version: 2.3.33
3
+ Version: 2.3.34
4
4
  Summary: Create delightful software with Jupyter Notebooks
5
5
  Home-page: https://github.com/AnswerDotAI/nbdev
6
6
  Author: Jeremy Howard and Hamel Husain
@@ -41,6 +41,7 @@ Requires-Dist: svg.py ; extra == 'dev'
41
41
  Requires-Dist: nbclassic ; extra == 'dev'
42
42
  Requires-Dist: pysymbol-llm ; extra == 'dev'
43
43
  Requires-Dist: llms-txt ; extra == 'dev'
44
+ Requires-Dist: sphinx ; extra == 'dev'
44
45
 
45
46
  # Getting Started
46
47
 
@@ -1,9 +1,9 @@
1
- nbdev/__init__.py,sha256=zyGebCy5vacGGdDbzVk4ZwbBNwGFaTTApHl3PHrqwOk,90
2
- nbdev/_modidx.py,sha256=k-21ZZLvVkXodH8hvq7opMoO-lmqXQhgBxHJ0V6wL-I,41145
1
+ nbdev/__init__.py,sha256=ZX6ZpzceYLyy-v7u62yWomGalDXO3B7da54WH-xylnQ,90
2
+ nbdev/_modidx.py,sha256=mquJnE_EgW0V2fUzt93Fn_NkWBG-wZUrvpQl_1NsHo4,41270
3
3
  nbdev/clean.py,sha256=mVgsW2_g7KIXAVh8mwpj86UwMN6QVM-q33PDzA27nWw,9410
4
4
  nbdev/cli.py,sha256=8YWXu9jDiVpTd9mhCealLNAd5Fg3xCpNklpZ6Fc8tD0,7045
5
- nbdev/config.py,sha256=B_LbvyTLi2jDI53MTWypJhgXD8PoyY0ztRzPhYEnG7s,12225
6
- nbdev/doclinks.py,sha256=ebSn9-4djFmZHxEQioA5I4rV-fwLeCSxgYaTDvZ9s_s,11175
5
+ nbdev/config.py,sha256=RQGR-zTmsZrjfszDDF0qdAMnyvmMS7Kn0ccMFLrxnh8,12228
6
+ nbdev/doclinks.py,sha256=-ET_sYAiAU2TnyxXFFFoUSqzI7SyqcL5viS_zg_Z6ms,12334
7
7
  nbdev/export.py,sha256=IonpKGYthPgAjEGrm8sK36O2yflQFaxLEXBBrEYe5q4,3955
8
8
  nbdev/extract_attachments.py,sha256=O4mS4EFIOXL_yQ3jmsnBStrWxGR_nPNvxLYXHtLeimw,2208
9
9
  nbdev/frontmatter.py,sha256=i195bhDLWd-WUEzQT9JBoA4Ee3j6gD1dKMT8yk5fF4Y,2761
@@ -12,7 +12,7 @@ nbdev/maker.py,sha256=JrvvtG23_tgT4i-zzDrUF1GmLhdL_9j4S-dcD-GVui4,9801
12
12
  nbdev/merge.py,sha256=xmT7LMY_mQGOGl0ynqkB13M6HwJfUOTis1Xl--YDXR8,4341
13
13
  nbdev/migrate.py,sha256=YJTtWC6TPaZpZTcD0Jex6stOSumjju2QrUozF9rvl0Y,7311
14
14
  nbdev/process.py,sha256=Vb3SN5YW2gB9rYv5ToeveOeL9qM9AGLRPXCyAFiaE3g,5853
15
- nbdev/processors.py,sha256=vtby1GBM-iz6axnhPIVU-HTN8jNYA6CzsT-N_EGcUlE,11976
15
+ nbdev/processors.py,sha256=fS4WrowC8bi6sFJJUVA9r9IRgmk-gffrJ9zNfb7vpIM,11973
16
16
  nbdev/qmd.py,sha256=VAxE-c1sT7y26VdyreB6j9fge-CuLbHWocRE_WbnYXg,2994
17
17
  nbdev/quarto.py,sha256=o-fRR5gqWKvIjr-k4f_XfN3LpMIsO0URC9yEtDOJHLs,12053
18
18
  nbdev/release.py,sha256=K8Q7CU-fM5TyLy5Q8AswpA3vE5CHa8aHaeKU9LHtlv0,14159
@@ -21,9 +21,9 @@ nbdev/serve_drv.py,sha256=IZ2acem_KKsXYYe0iUECiR_orkYLBkT1ZG_258ZS7SQ,657
21
21
  nbdev/showdoc.py,sha256=v7qUzyr5gMN99jZMzal_ulRLsn617BkRMS1XEq9UqjE,10033
22
22
  nbdev/sync.py,sha256=ld-lSOmlX1FdnTOzaSHcxKyIuIguI_SpluqfPSH2BZ8,3201
23
23
  nbdev/test.py,sha256=_ECBd5fvfGEICIfkTI2S8w8YatL5CaPltCeDSsiH6yw,4435
24
- nbdev-2.3.33.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
25
- nbdev-2.3.33.dist-info/METADATA,sha256=pCeE7eIuXL2xLlTqnGCka5jY5cw5XaOKgRDBWioHKRA,10515
26
- nbdev-2.3.33.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
27
- nbdev-2.3.33.dist-info/entry_points.txt,sha256=P7LtWbUX0nXuV5g7HJtSDdTWjn7cq9a9uv3p6VoYDz8,1400
28
- nbdev-2.3.33.dist-info/top_level.txt,sha256=3cWYLMuaXsZjz3TQRGEkWGs9Z8ieEDmYcq8TZS3y3vU,6
29
- nbdev-2.3.33.dist-info/RECORD,,
24
+ nbdev-2.3.34.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
25
+ nbdev-2.3.34.dist-info/METADATA,sha256=gzDkAX7jEZuJZyLf8vYx8bXqDFPLEm8lhX12X5_XkwA,10554
26
+ nbdev-2.3.34.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
27
+ nbdev-2.3.34.dist-info/entry_points.txt,sha256=P7LtWbUX0nXuV5g7HJtSDdTWjn7cq9a9uv3p6VoYDz8,1400
28
+ nbdev-2.3.34.dist-info/top_level.txt,sha256=3cWYLMuaXsZjz3TQRGEkWGs9Z8ieEDmYcq8TZS3y3vU,6
29
+ nbdev-2.3.34.dist-info/RECORD,,
File without changes