nbdev 2.3.33__tar.gz → 2.3.35__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 (39) hide show
  1. {nbdev-2.3.33/nbdev.egg-info → nbdev-2.3.35}/PKG-INFO +3 -2
  2. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/__init__.py +1 -1
  3. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/_modidx.py +5 -2
  4. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/cli.py +3 -2
  5. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/config.py +3 -3
  6. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/doclinks.py +34 -6
  7. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/export.py +2 -1
  8. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/maker.py +3 -3
  9. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/processors.py +1 -1
  10. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/quarto.py +38 -3
  11. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/release.py +7 -3
  12. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/serve.py +2 -1
  13. {nbdev-2.3.33 → nbdev-2.3.35/nbdev.egg-info}/PKG-INFO +3 -2
  14. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev.egg-info/entry_points.txt +1 -0
  15. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev.egg-info/requires.txt +2 -1
  16. {nbdev-2.3.33 → nbdev-2.3.35}/settings.ini +4 -3
  17. {nbdev-2.3.33 → nbdev-2.3.35}/CONTRIBUTING.md +0 -0
  18. {nbdev-2.3.33 → nbdev-2.3.35}/LICENSE +0 -0
  19. {nbdev-2.3.33 → nbdev-2.3.35}/MANIFEST.in +0 -0
  20. {nbdev-2.3.33 → nbdev-2.3.35}/README.md +0 -0
  21. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/clean.py +0 -0
  22. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/extract_attachments.py +0 -0
  23. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/frontmatter.py +0 -0
  24. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/imports.py +0 -0
  25. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/merge.py +0 -0
  26. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/migrate.py +0 -0
  27. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/process.py +0 -0
  28. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/qmd.py +0 -0
  29. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/serve_drv.py +0 -0
  30. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/showdoc.py +0 -0
  31. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/sync.py +0 -0
  32. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev/test.py +0 -0
  33. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev.egg-info/SOURCES.txt +0 -0
  34. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev.egg-info/dependency_links.txt +0 -0
  35. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev.egg-info/not-zip-safe +0 -0
  36. {nbdev-2.3.33 → nbdev-2.3.35}/nbdev.egg-info/top_level.txt +0 -0
  37. {nbdev-2.3.33 → nbdev-2.3.35}/pyproject.toml +0 -0
  38. {nbdev-2.3.33 → nbdev-2.3.35}/setup.cfg +0 -0
  39. {nbdev-2.3.33 → nbdev-2.3.35}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nbdev
3
- Version: 2.3.33
3
+ Version: 2.3.35
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
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
24
  Requires-Dist: packaging
25
25
  Requires-Dist: fastcore>=1.5.27
26
- Requires-Dist: execnb>=0.1.4
26
+ Requires-Dist: execnb>=0.1.12
27
27
  Requires-Dist: astunparse
28
28
  Requires-Dist: ghapi>=1.0.3
29
29
  Requires-Dist: watchdog
@@ -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,4 +1,4 @@
1
- __version__ = "2.3.33"
1
+ __version__ = "2.3.35"
2
2
 
3
3
  from .doclinks import nbdev_export
4
4
  from .showdoc import show_doc
@@ -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'),
@@ -256,20 +257,22 @@ d = { 'settings': { 'branch': 'master',
256
257
  'nbdev.quarto._SidebarYmlRemoved.__init__': ( 'api/quarto.html#_sidebarymlremoved.__init__',
257
258
  'nbdev/quarto.py'),
258
259
  'nbdev.quarto._copytree': ('api/quarto.html#_copytree', 'nbdev/quarto.py'),
260
+ 'nbdev.quarto._doc_mtime_not_older': ('api/quarto.html#_doc_mtime_not_older', 'nbdev/quarto.py'),
259
261
  'nbdev.quarto._ensure_quarto': ('api/quarto.html#_ensure_quarto', 'nbdev/quarto.py'),
260
262
  'nbdev.quarto._install_linux': ('api/quarto.html#_install_linux', 'nbdev/quarto.py'),
261
263
  'nbdev.quarto._install_mac': ('api/quarto.html#_install_mac', 'nbdev/quarto.py'),
262
264
  'nbdev.quarto._nbglob_docs': ('api/quarto.html#_nbglob_docs', 'nbdev/quarto.py'),
263
265
  'nbdev.quarto._pre': ('api/quarto.html#_pre', 'nbdev/quarto.py'),
264
266
  'nbdev.quarto._pre_docs': ('api/quarto.html#_pre_docs', 'nbdev/quarto.py'),
265
- 'nbdev.quarto._readme_mtime_not_older': ('api/quarto.html#_readme_mtime_not_older', 'nbdev/quarto.py'),
266
267
  'nbdev.quarto._recursive_parser': ('api/quarto.html#_recursive_parser', 'nbdev/quarto.py'),
268
+ 'nbdev.quarto._save_cached_contributing': ('api/quarto.html#_save_cached_contributing', 'nbdev/quarto.py'),
267
269
  'nbdev.quarto._save_cached_readme': ('api/quarto.html#_save_cached_readme', 'nbdev/quarto.py'),
268
270
  'nbdev.quarto._sort': ('api/quarto.html#_sort', 'nbdev/quarto.py'),
269
271
  'nbdev.quarto._sprun': ('api/quarto.html#_sprun', 'nbdev/quarto.py'),
270
272
  'nbdev.quarto.fs_watchdog': ('api/quarto.html#fs_watchdog', 'nbdev/quarto.py'),
271
273
  'nbdev.quarto.install': ('api/quarto.html#install', 'nbdev/quarto.py'),
272
274
  'nbdev.quarto.install_quarto': ('api/quarto.html#install_quarto', 'nbdev/quarto.py'),
275
+ 'nbdev.quarto.nbdev_contributing': ('api/quarto.html#nbdev_contributing', 'nbdev/quarto.py'),
273
276
  'nbdev.quarto.nbdev_docs': ('api/quarto.html#nbdev_docs', 'nbdev/quarto.py'),
274
277
  'nbdev.quarto.nbdev_preview': ('api/quarto.html#nbdev_preview', 'nbdev/quarto.py'),
275
278
  'nbdev.quarto.nbdev_proc_nbs': ('api/quarto.html#nbdev_proc_nbs', 'nbdev/quarto.py'),
@@ -13,7 +13,7 @@ from .processors import *
13
13
  from .doclinks import *
14
14
  from .test import *
15
15
  from .clean import *
16
- from .quarto import nbdev_readme, refresh_quarto_yml, fs_watchdog
16
+ from .quarto import nbdev_readme, nbdev_contributing, refresh_quarto_yml, fs_watchdog
17
17
  from .export import nb_export
18
18
  from .frontmatter import FrontmatterProc
19
19
 
@@ -91,7 +91,7 @@ def nbdev_new(**kwargs):
91
91
  _update_repo_meta(cfg)
92
92
  path = Path()
93
93
 
94
- _ORG_OR_USR,_REPOSITORY = 'fastai','nbdev-template'
94
+ _ORG_OR_USR,_REPOSITORY = 'answerdotai','nbdev-template'
95
95
  _TEMPLATE = f'{_ORG_OR_USR}/{_REPOSITORY}'
96
96
  template = kwargs.get('template', _TEMPLATE)
97
97
  try: org_or_usr, repo = template.split('/')
@@ -121,6 +121,7 @@ def nbdev_new(**kwargs):
121
121
  refresh_quarto_yml()
122
122
  nbdev_export.__wrapped__()
123
123
  nbdev_readme.__wrapped__()
124
+ nbdev_contributing.__wrapped__()
124
125
 
125
126
  # %% ../nbs/api/13_cli.ipynb
126
127
  mapping = {
@@ -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',
@@ -249,12 +249,12 @@ def add_init(path=None):
249
249
  if get_config().get('put_version_in_init', True): update_version(path)
250
250
 
251
251
  # %% ../nbs/api/01_config.ipynb
252
- def write_cells(cells, hdr, file, offset=0, cell_number=True):
252
+ def write_cells(cells, hdr, file, offset=0, cell_number=True, solo_nb=False):
253
253
  "Write `cells` to `file` along with header `hdr` starting at index `offset` (mainly for nbdev internal use)."
254
254
  for cell in cells:
255
255
  if cell.cell_type=='code' and cell.source.strip():
256
256
  idx = f" {cell.idx_+offset}" if cell_number else ""
257
- file.write(f'\n\n{hdr}{idx}\n{cell.source}')
257
+ file.write(f'\n\n{hdr}{idx}\n{cell.source}') if not solo_nb else file.write(f'\n\n{cell.source}')
258
258
 
259
259
  # %% ../nbs/api/01_config.ipynb
260
260
  def _basic_export_nb(fname, name, dest=None):
@@ -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
@@ -219,9 +244,12 @@ def _build_lookup_table(strip_libs=None, incl_libs=None, skip_mods=None):
219
244
  for m in strip_libs:
220
245
  if m in entries:
221
246
  _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()}
247
+ stripped = {}
248
+ for mod, dets in _d['syms'].items():
249
+ if mod not in skip_mods:
250
+ for k,v in dets.items():
251
+ k = remove_prefix(k,f"{mod}.")
252
+ if k not in stripped: stripped[k] = v
225
253
  py_syms = merge(stripped, py_syms)
226
254
  return entries,py_syms
227
255
 
@@ -73,6 +73,7 @@ def nb_export(nbname:str, # Filename of notebook
73
73
  name:str=None, # Name of python script {name}.py to create.
74
74
  mod_maker=ModuleMaker,
75
75
  debug:bool=False, # Debug mode
76
+ solo_nb:bool=False # Export single notebook outside of an nbdev project.
76
77
  ):
77
78
  "Create module(s) from notebook"
78
79
  if lib_path is None: lib_path = get_config().lib_path if is_nbdev() else '.'
@@ -88,5 +89,5 @@ def nb_export(nbname:str, # Filename of notebook
88
89
  "Note nbdev2 no longer supports nbdev1 syntax. Run `nbdev_migrate` to upgrade.\n"
89
90
  "See https://nbdev.fast.ai/getting_started.html for more information.")
90
91
  return
91
- mm = mod_maker(dest=lib_path, name=nm, nb_path=nbname, is_new=bool(name) or mod=='#')
92
+ mm = mod_maker(dest=lib_path, name=nm, nb_path=nbname, is_new=bool(name) or mod=='#', solo_nb=solo_nb)
92
93
  mm.make(cells, all_cells, lib_path=lib_path)
@@ -63,7 +63,7 @@ def update_var(varname, func, fn=None, code=None):
63
63
  # %% ../nbs/api/02_maker.ipynb
64
64
  class ModuleMaker:
65
65
  "Helper class to create exported library from notebook source cells"
66
- def __init__(self, dest, name, nb_path, is_new=True, parse=True):
66
+ def __init__(self, dest, name, nb_path, is_new=True, parse=True, solo_nb=False):
67
67
  dest,nb_path = Path(dest),Path(nb_path)
68
68
  store_attr()
69
69
  self.fname = dest/(name.replace('.','/') + ".py")
@@ -208,8 +208,8 @@ def make(self:ModuleMaker, cells, all_cells=None, lib_path=None):
208
208
  f.write(_retr_mdoc(cells))
209
209
  f.write(f"# AUTOGENERATED! DO NOT EDIT! File to edit: {self.dest2nb}.")
210
210
  if last_future > 0: write_cells(cells[:last_future], self.hdr, f)
211
- if self.parse: f.write(f"\n\n# %% auto 0\n__all__ = {all_str}")
212
- write_cells(cells[last_future:], self.hdr, f, cell_number=get_config().cell_number)
211
+ if self.parse and not self.solo_nb: f.write(f"\n\n# %% auto 0\n__all__ = {all_str}")
212
+ write_cells(cells[last_future:], self.hdr, f, cell_number=get_config().cell_number, solo_nb=self.solo_nb)
213
213
  f.write('\n')
214
214
 
215
215
  # %% ../nbs/api/02_maker.ipynb
@@ -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
@@ -21,7 +21,8 @@ import yaml
21
21
 
22
22
  # %% auto 0
23
23
  __all__ = ['BASE_QUARTO_URL', 'install_quarto', 'install', 'IndentDumper', 'nbdev_sidebar', 'refresh_quarto_yml',
24
- 'nbdev_proc_nbs', 'nbdev_readme', 'nbdev_docs', 'prepare', 'fs_watchdog', 'nbdev_preview']
24
+ 'nbdev_proc_nbs', 'nbdev_readme', 'nbdev_contributing', 'nbdev_docs', 'prepare', 'fs_watchdog',
25
+ 'nbdev_preview']
25
26
 
26
27
  # %% ../nbs/api/14_quarto.ipynb
27
28
  def _sprun(cmd):
@@ -214,7 +215,7 @@ def nbdev_proc_nbs(**kwargs):
214
215
  _pre_docs(**kwargs)[0]
215
216
 
216
217
  # %% ../nbs/api/14_quarto.ipynb
217
- def _readme_mtime_not_older(readme_path, readme_nb_path):
218
+ def _doc_mtime_not_older(readme_path, readme_nb_path):
218
219
  if not readme_nb_path.exists():
219
220
  print(f"Could not find {readme_nb_path}")
220
221
  return True
@@ -259,7 +260,7 @@ def nbdev_readme(
259
260
  "Create README.md from readme_nb (index.ipynb by default)"
260
261
  cfg = get_config()
261
262
  path = Path(path) if path else cfg.nbs_path
262
- if chk_time and _readme_mtime_not_older(cfg.config_path/'README.md', path/cfg.readme_nb): return
263
+ if chk_time and _doc_mtime_not_older(cfg.config_path/'README.md', path/cfg.readme_nb): return
263
264
 
264
265
  with _SidebarYmlRemoved(path): # to avoid rendering whole website
265
266
  cache = proc_nbs(path)
@@ -267,6 +268,38 @@ def nbdev_readme(
267
268
 
268
269
  _save_cached_readme(cache, cfg)
269
270
 
271
+ # %% ../nbs/api/14_quarto.ipynb
272
+ def _save_cached_contributing(cache, cfg, contrib_nb):
273
+ "Move CONTRIBUTING.md (and any `_files` assets) from the Quarto build cache to the repo root."
274
+ tmp_doc_path = cache / cfg.doc_path.name
275
+ contrib_file = tmp_doc_path / 'CONTRIBUTING.md'
276
+ if contrib_file.exists():
277
+ final_path = cfg.config_path / 'CONTRIBUTING.md'
278
+ if final_path.exists(): final_path.unlink() # py37 doesn't have `missing_ok`
279
+ move(contrib_file, final_path)
280
+ assets_folder = tmp_doc_path / (Path(contrib_nb).stem + '_files') # Supporting files for CONTRIBUTING
281
+ if assets_folder.exists(): _copytree(assets_folder, cfg.config_path / assets_folder.name)
282
+
283
+ # %% ../nbs/api/14_quarto.ipynb
284
+ @call_parse
285
+ def nbdev_contributing(
286
+ path:str=None, # Path to notebooks
287
+ chk_time:bool=False # Only build if out-of-date
288
+ ):
289
+ """Create CONTRIBUTING.md from contributing_nb (defaults to 'contributing.ipynb' if present). Skips if the file doesn't exist."""
290
+ cfg = get_config()
291
+ path = Path(path) if path else cfg.nbs_path
292
+ contrib_nb_name = cfg.get('contributing_nb', 'contributing.ipynb')
293
+ contrib_nb_path = path / contrib_nb_name
294
+ if not contrib_nb_path.exists(): return
295
+ if chk_time and _doc_mtime_not_older(cfg.config_path / 'CONTRIBUTING.md' , contrib_nb_path): return
296
+
297
+ with _SidebarYmlRemoved(path): # to avoid rendering whole website
298
+ cache = proc_nbs(path)
299
+ _sprun(f'cd "{cache}" && quarto render "{cache/contrib_nb_name}" -o CONTRIBUTING.md -t gfm --no-execute')
300
+
301
+ _save_cached_contributing(cache, cfg, contrib_nb_name)
302
+
270
303
  # %% ../nbs/api/14_quarto.ipynb
271
304
  @call_parse
272
305
  @delegates(_nbglob_docs)
@@ -277,6 +310,7 @@ def nbdev_docs(
277
310
  "Create Quarto docs and README.md"
278
311
  cache,cfg,path = _pre_docs(path, n_workers=n_workers, **kwargs)
279
312
  nbdev_readme.__wrapped__(path=path, chk_time=True)
313
+ nbdev_contributing.__wrapped__(path=path, chk_time=True)
280
314
  _sprun(f'cd "{cache}" && quarto render --no-cache')
281
315
  shutil.rmtree(cfg.doc_path, ignore_errors=True)
282
316
  move(cache/cfg.doc_path.name, cfg.config_path)
@@ -291,6 +325,7 @@ def prepare():
291
325
  nbdev.clean.nbdev_clean.__wrapped__()
292
326
  refresh_quarto_yml()
293
327
  nbdev_readme.__wrapped__(chk_time=True)
328
+ nbdev_contributing.__wrapped__(chk_time=True)
294
329
 
295
330
  # %% ../nbs/api/14_quarto.ipynb
296
331
  @contextmanager
@@ -3,9 +3,9 @@
3
3
  # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/api/18_release.ipynb.
4
4
 
5
5
  # %% auto 0
6
- __all__ = ['GH_HOST', 'Release', 'changelog', 'release_git', 'release_gh', 'pypi_json', 'latest_pypi', 'pypi_details',
7
- 'conda_output_path', 'write_conda_meta', 'write_requirements', 'anaconda_upload', 'release_conda',
8
- 'chk_conda_rel', 'release_pypi', 'release_both', 'bump_version', 'nbdev_bump_version']
6
+ __all__ = ['GH_HOST', 'CONDA_WARNING', 'Release', 'changelog', 'release_git', 'release_gh', 'pypi_json', 'latest_pypi',
7
+ 'pypi_details', 'conda_output_path', 'write_conda_meta', 'write_requirements', 'anaconda_upload',
8
+ 'release_conda', 'chk_conda_rel', 'release_pypi', 'release_both', 'bump_version', 'nbdev_bump_version']
9
9
 
10
10
  # %% ../nbs/api/18_release.ipynb
11
11
  from fastcore.all import *
@@ -251,8 +251,11 @@ def write_requirements(path:str=''):
251
251
  (d/'requirements.txt').mk_write(req)
252
252
 
253
253
  # %% ../nbs/api/18_release.ipynb
254
+ CONDA_WARNING='Conda support for nbdev is deprecated and scheduled for removal in a future version.'
255
+
254
256
  def anaconda_upload(name, loc=None, user=None, token=None, env_token=None):
255
257
  "Upload `name` to anaconda"
258
+ warn(CONDA_WARNING)
256
259
  user = f'-u {user} ' if user else ''
257
260
  if env_token: token = os.getenv(env_token)
258
261
  token = f'-t {token} ' if token else ''
@@ -271,6 +274,7 @@ def release_conda(
271
274
  upload_user:str=None # Optional user to upload package to
272
275
  ):
273
276
  "Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it"
277
+ warn(CONDA_WARNING)
274
278
  name = get_config().lib_name
275
279
  write_conda_meta(path)
276
280
  out = f"Done. Next steps:\n```\ncd {path}\n"""
@@ -36,7 +36,7 @@ def _is_qpy(path:Path):
36
36
 
37
37
  # %% ../nbs/api/17_serve.ipynb
38
38
  def _proc_file(s, cache, path, mtime=None):
39
- skips = ('_proc', '_docs', '_site')
39
+ skips = ('_proc', '_docs', '_site', 'settings.ini')
40
40
  if not s.is_file() or any(o[0]=='.' or o in skips for o in s.parts): return
41
41
  d = cache/s.relative_to(path)
42
42
  if s.suffix=='.py': d = d.with_suffix('')
@@ -66,6 +66,7 @@ def proc_nbs(
66
66
  path = Path(path or cfg.nbs_path)
67
67
  files = nbglob(path, func=Path, file_glob='', file_re='', **kwargs)
68
68
  if (path/'_quarto.yml').exists(): files.append(path/'_quarto.yml')
69
+ if (path/'_brand.yml').exists(): files.append(path/'_brand.yml')
69
70
  if (path/'_extensions').exists(): files.extend(nbglob(path/'_extensions', func=Path, file_glob='', file_re='', skip_file_re='^[.]'))
70
71
 
71
72
  # If settings.ini or filter script newer than cache folder modified, delete cache
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nbdev
3
- Version: 2.3.33
3
+ Version: 2.3.35
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
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
24
  Requires-Dist: packaging
25
25
  Requires-Dist: fastcore>=1.5.27
26
- Requires-Dist: execnb>=0.1.4
26
+ Requires-Dist: execnb>=0.1.12
27
27
  Requires-Dist: astunparse
28
28
  Requires-Dist: ghapi>=1.0.3
29
29
  Requires-Dist: watchdog
@@ -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
 
@@ -4,6 +4,7 @@ nbdev_bump_version = nbdev.release:nbdev_bump_version
4
4
  nbdev_changelog = nbdev.release:changelog
5
5
  nbdev_clean = nbdev.clean:nbdev_clean
6
6
  nbdev_conda = nbdev.release:release_conda
7
+ nbdev_contributing = nbdev.quarto:nbdev_contributing
7
8
  nbdev_create_config = nbdev.config:nbdev_create_config
8
9
  nbdev_docs = nbdev.quarto:nbdev_docs
9
10
  nbdev_export = nbdev.doclinks:nbdev_export
@@ -1,6 +1,6 @@
1
1
  packaging
2
2
  fastcore>=1.5.27
3
- execnb>=0.1.4
3
+ execnb>=0.1.12
4
4
  astunparse
5
5
  ghapi>=1.0.3
6
6
  watchdog
@@ -19,3 +19,4 @@ svg.py
19
19
  nbclassic
20
20
  pysymbol_llm
21
21
  llms-txt
22
+ sphinx
@@ -9,17 +9,17 @@ 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.33
12
+ version = 2.3.35
13
13
  audience = Developers
14
14
  language = English
15
15
  custom_sidebar = True
16
16
  license = apache2
17
17
  status = 5
18
- requirements = fastcore>=1.5.27 execnb>=0.1.4 astunparse ghapi>=1.0.3 watchdog asttokens setuptools
18
+ requirements = fastcore>=1.5.27 execnb>=0.1.12 astunparse ghapi>=1.0.3 watchdog asttokens setuptools
19
19
  pip_requirements = PyYAML
20
20
  conda_requirements = pyyaml
21
21
  conda_user = fastai
22
- dev_requirements = ipywidgets nbdev-numpy nbdev-stdlib pandas matplotlib black svg.py nbclassic pysymbol_llm llms-txt
22
+ dev_requirements = ipywidgets nbdev-numpy nbdev-stdlib pandas matplotlib black svg.py nbclassic pysymbol_llm llms-txt sphinx
23
23
  console_scripts = nbdev_create_config=nbdev.config:nbdev_create_config
24
24
  nbdev_update=nbdev.sync:nbdev_update
25
25
  nbdev_update_license=nbdev.cli:nbdev_update_license
@@ -40,6 +40,7 @@ console_scripts = nbdev_create_config=nbdev.config:nbdev_create_config
40
40
  nbdev_preview=nbdev.quarto:nbdev_preview
41
41
  nbdev_prepare=nbdev.quarto:prepare
42
42
  nbdev_readme=nbdev.quarto:nbdev_readme
43
+ nbdev_contributing=nbdev.quarto:nbdev_contributing
43
44
  nbdev_release_gh=nbdev.release:release_gh
44
45
  nbdev_release_git=nbdev.release:release_git
45
46
  nbdev_changelog=nbdev.release:changelog
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