nbdev 2.3.33__py3-none-any.whl → 2.3.35__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 +1 -1
- nbdev/_modidx.py +5 -2
- nbdev/cli.py +3 -2
- nbdev/config.py +3 -3
- nbdev/doclinks.py +34 -6
- nbdev/export.py +2 -1
- nbdev/maker.py +3 -3
- nbdev/processors.py +1 -1
- nbdev/quarto.py +38 -3
- nbdev/release.py +7 -3
- nbdev/serve.py +2 -1
- {nbdev-2.3.33.dist-info → nbdev-2.3.35.dist-info}/METADATA +15 -14
- nbdev-2.3.35.dist-info/RECORD +29 -0
- {nbdev-2.3.33.dist-info → nbdev-2.3.35.dist-info}/WHEEL +1 -1
- {nbdev-2.3.33.dist-info → nbdev-2.3.35.dist-info}/entry_points.txt +1 -0
- nbdev-2.3.33.dist-info/RECORD +0 -29
- {nbdev-2.3.33.dist-info → nbdev-2.3.35.dist-info}/LICENSE +0 -0
- {nbdev-2.3.33.dist-info → nbdev-2.3.35.dist-info}/top_level.txt +0 -0
nbdev/__init__.py
CHANGED
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/
|
|
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'),
|
nbdev/cli.py
CHANGED
|
@@ -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 = '
|
|
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 = {
|
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/
|
|
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):
|
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
|
|
@@ -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 = {
|
|
223
|
-
|
|
224
|
-
|
|
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
|
|
nbdev/export.py
CHANGED
|
@@ -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)
|
nbdev/maker.py
CHANGED
|
@@ -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
|
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
|
|
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
|
nbdev/quarto.py
CHANGED
|
@@ -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',
|
|
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
|
|
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
|
|
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
|
nbdev/release.py
CHANGED
|
@@ -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',
|
|
7
|
-
'conda_output_path', 'write_conda_meta', 'write_requirements', 'anaconda_upload',
|
|
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"""
|
nbdev/serve.py
CHANGED
|
@@ -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.
|
|
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
|
|
@@ -22,25 +22,26 @@ Requires-Python: >=3.7
|
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
Requires-Dist: packaging
|
|
25
|
-
Requires-Dist: fastcore
|
|
26
|
-
Requires-Dist: execnb
|
|
25
|
+
Requires-Dist: fastcore>=1.5.27
|
|
26
|
+
Requires-Dist: execnb>=0.1.12
|
|
27
27
|
Requires-Dist: astunparse
|
|
28
|
-
Requires-Dist: ghapi
|
|
28
|
+
Requires-Dist: ghapi>=1.0.3
|
|
29
29
|
Requires-Dist: watchdog
|
|
30
30
|
Requires-Dist: asttokens
|
|
31
31
|
Requires-Dist: setuptools
|
|
32
32
|
Requires-Dist: PyYAML
|
|
33
33
|
Provides-Extra: dev
|
|
34
|
-
Requires-Dist: ipywidgets
|
|
35
|
-
Requires-Dist: nbdev-numpy
|
|
36
|
-
Requires-Dist: nbdev-stdlib
|
|
37
|
-
Requires-Dist: pandas
|
|
38
|
-
Requires-Dist: matplotlib
|
|
39
|
-
Requires-Dist: black
|
|
40
|
-
Requires-Dist: svg.py
|
|
41
|
-
Requires-Dist: nbclassic
|
|
42
|
-
Requires-Dist:
|
|
43
|
-
Requires-Dist: llms-txt
|
|
34
|
+
Requires-Dist: ipywidgets; extra == "dev"
|
|
35
|
+
Requires-Dist: nbdev-numpy; extra == "dev"
|
|
36
|
+
Requires-Dist: nbdev-stdlib; extra == "dev"
|
|
37
|
+
Requires-Dist: pandas; extra == "dev"
|
|
38
|
+
Requires-Dist: matplotlib; extra == "dev"
|
|
39
|
+
Requires-Dist: black; extra == "dev"
|
|
40
|
+
Requires-Dist: svg.py; extra == "dev"
|
|
41
|
+
Requires-Dist: nbclassic; extra == "dev"
|
|
42
|
+
Requires-Dist: pysymbol_llm; extra == "dev"
|
|
43
|
+
Requires-Dist: llms-txt; extra == "dev"
|
|
44
|
+
Requires-Dist: sphinx; extra == "dev"
|
|
44
45
|
|
|
45
46
|
# Getting Started
|
|
46
47
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
nbdev/__init__.py,sha256=gVdieX3lx7fnseoce24feoanYKZSn_pbz0cyEoVPWpg,90
|
|
2
|
+
nbdev/_modidx.py,sha256=zOSOxxECJWwE8_VBaiKguawI8YbQ9e3jPmefZQPW1lU,41526
|
|
3
|
+
nbdev/clean.py,sha256=mVgsW2_g7KIXAVh8mwpj86UwMN6QVM-q33PDzA27nWw,9410
|
|
4
|
+
nbdev/cli.py,sha256=vPBg1OrqzXW_b2NHiUn9g7CflP2M_Bk3pdbKXuKXwjM,7107
|
|
5
|
+
nbdev/config.py,sha256=8U_0mZ3DPuHbFqSVoVSYVpfSPHKB-3jB1Opvws3d9ig,12296
|
|
6
|
+
nbdev/doclinks.py,sha256=Y-pk3-9wDKFqDtPhAd2tNUCkcQ4B4i0WeNKhORcRP3Q,12427
|
|
7
|
+
nbdev/export.py,sha256=dX_mAnH6-vLHJEb4vp-QS2pY78Hk5YXsdvdgzMTiymY,4059
|
|
8
|
+
nbdev/extract_attachments.py,sha256=O4mS4EFIOXL_yQ3jmsnBStrWxGR_nPNvxLYXHtLeimw,2208
|
|
9
|
+
nbdev/frontmatter.py,sha256=i195bhDLWd-WUEzQT9JBoA4Ee3j6gD1dKMT8yk5fF4Y,2761
|
|
10
|
+
nbdev/imports.py,sha256=f5Ynco14hsJyFCf43-uP_YARMhHADe6lM-20Mc_vXhw,95
|
|
11
|
+
nbdev/maker.py,sha256=o075fYwU_oXiYjSbq67_Vjmj7ATYLYqhKd0X6ZVqrJ0,9859
|
|
12
|
+
nbdev/merge.py,sha256=xmT7LMY_mQGOGl0ynqkB13M6HwJfUOTis1Xl--YDXR8,4341
|
|
13
|
+
nbdev/migrate.py,sha256=YJTtWC6TPaZpZTcD0Jex6stOSumjju2QrUozF9rvl0Y,7311
|
|
14
|
+
nbdev/process.py,sha256=Vb3SN5YW2gB9rYv5ToeveOeL9qM9AGLRPXCyAFiaE3g,5853
|
|
15
|
+
nbdev/processors.py,sha256=fS4WrowC8bi6sFJJUVA9r9IRgmk-gffrJ9zNfb7vpIM,11973
|
|
16
|
+
nbdev/qmd.py,sha256=VAxE-c1sT7y26VdyreB6j9fge-CuLbHWocRE_WbnYXg,2994
|
|
17
|
+
nbdev/quarto.py,sha256=YnYwM1gTSIuitfUnK-R3gxqfrUh6rHPZmBN1OqhLuQ0,13816
|
|
18
|
+
nbdev/release.py,sha256=MDTFjwD8xRUeR7VINgiakOx1JNFAdBTi58zbzrYlLlI,14326
|
|
19
|
+
nbdev/serve.py,sha256=HcYoNQiSROdMS1J8YlOlyTya-LmmrR-8v3ho5D9g700,3146
|
|
20
|
+
nbdev/serve_drv.py,sha256=IZ2acem_KKsXYYe0iUECiR_orkYLBkT1ZG_258ZS7SQ,657
|
|
21
|
+
nbdev/showdoc.py,sha256=v7qUzyr5gMN99jZMzal_ulRLsn617BkRMS1XEq9UqjE,10033
|
|
22
|
+
nbdev/sync.py,sha256=ld-lSOmlX1FdnTOzaSHcxKyIuIguI_SpluqfPSH2BZ8,3201
|
|
23
|
+
nbdev/test.py,sha256=_ECBd5fvfGEICIfkTI2S8w8YatL5CaPltCeDSsiH6yw,4435
|
|
24
|
+
nbdev-2.3.35.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
25
|
+
nbdev-2.3.35.dist-info/METADATA,sha256=odS-A_GRE_Te8XC_U7wTG80fEtYdGxoqDWqrdhPJ0_k,10541
|
|
26
|
+
nbdev-2.3.35.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
27
|
+
nbdev-2.3.35.dist-info/entry_points.txt,sha256=1ADLbIIJxZeLgOD8NpizkPULSsd_fgUQxwAkbGk45b8,1453
|
|
28
|
+
nbdev-2.3.35.dist-info/top_level.txt,sha256=3cWYLMuaXsZjz3TQRGEkWGs9Z8ieEDmYcq8TZS3y3vU,6
|
|
29
|
+
nbdev-2.3.35.dist-info/RECORD,,
|
|
@@ -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
|
nbdev-2.3.33.dist-info/RECORD
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
nbdev/__init__.py,sha256=zyGebCy5vacGGdDbzVk4ZwbBNwGFaTTApHl3PHrqwOk,90
|
|
2
|
-
nbdev/_modidx.py,sha256=k-21ZZLvVkXodH8hvq7opMoO-lmqXQhgBxHJ0V6wL-I,41145
|
|
3
|
-
nbdev/clean.py,sha256=mVgsW2_g7KIXAVh8mwpj86UwMN6QVM-q33PDzA27nWw,9410
|
|
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
|
|
7
|
-
nbdev/export.py,sha256=IonpKGYthPgAjEGrm8sK36O2yflQFaxLEXBBrEYe5q4,3955
|
|
8
|
-
nbdev/extract_attachments.py,sha256=O4mS4EFIOXL_yQ3jmsnBStrWxGR_nPNvxLYXHtLeimw,2208
|
|
9
|
-
nbdev/frontmatter.py,sha256=i195bhDLWd-WUEzQT9JBoA4Ee3j6gD1dKMT8yk5fF4Y,2761
|
|
10
|
-
nbdev/imports.py,sha256=f5Ynco14hsJyFCf43-uP_YARMhHADe6lM-20Mc_vXhw,95
|
|
11
|
-
nbdev/maker.py,sha256=JrvvtG23_tgT4i-zzDrUF1GmLhdL_9j4S-dcD-GVui4,9801
|
|
12
|
-
nbdev/merge.py,sha256=xmT7LMY_mQGOGl0ynqkB13M6HwJfUOTis1Xl--YDXR8,4341
|
|
13
|
-
nbdev/migrate.py,sha256=YJTtWC6TPaZpZTcD0Jex6stOSumjju2QrUozF9rvl0Y,7311
|
|
14
|
-
nbdev/process.py,sha256=Vb3SN5YW2gB9rYv5ToeveOeL9qM9AGLRPXCyAFiaE3g,5853
|
|
15
|
-
nbdev/processors.py,sha256=vtby1GBM-iz6axnhPIVU-HTN8jNYA6CzsT-N_EGcUlE,11976
|
|
16
|
-
nbdev/qmd.py,sha256=VAxE-c1sT7y26VdyreB6j9fge-CuLbHWocRE_WbnYXg,2994
|
|
17
|
-
nbdev/quarto.py,sha256=o-fRR5gqWKvIjr-k4f_XfN3LpMIsO0URC9yEtDOJHLs,12053
|
|
18
|
-
nbdev/release.py,sha256=K8Q7CU-fM5TyLy5Q8AswpA3vE5CHa8aHaeKU9LHtlv0,14159
|
|
19
|
-
nbdev/serve.py,sha256=Yn1TqXi3cngCuGGC4iMy9tMRS4ID1lHdjro10LVKtts,3061
|
|
20
|
-
nbdev/serve_drv.py,sha256=IZ2acem_KKsXYYe0iUECiR_orkYLBkT1ZG_258ZS7SQ,657
|
|
21
|
-
nbdev/showdoc.py,sha256=v7qUzyr5gMN99jZMzal_ulRLsn617BkRMS1XEq9UqjE,10033
|
|
22
|
-
nbdev/sync.py,sha256=ld-lSOmlX1FdnTOzaSHcxKyIuIguI_SpluqfPSH2BZ8,3201
|
|
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,,
|
|
File without changes
|
|
File without changes
|