nbdev 2.3.22__py3-none-any.whl → 2.3.25__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.22"
1
+ __version__ = "2.3.25"
2
2
 
3
3
  from .doclinks import nbdev_export
4
4
  from .showdoc import show_doc
nbdev/clean.py CHANGED
@@ -30,6 +30,7 @@ def nbdev_trust(
30
30
  import warnings
31
31
  warnings.warn("Please install jupyter and try again")
32
32
  return
33
+ from nbformat import read
33
34
 
34
35
  fname = Path(fname if fname else get_config().nbs_path)
35
36
  path = fname if fname.is_dir() else fname.parent
@@ -40,7 +41,7 @@ def nbdev_trust(
40
41
  if last_checked and not force_all:
41
42
  last_changed = os.path.getmtime(fn)
42
43
  if last_changed < last_checked: continue
43
- nb = read_nb(fn)
44
+ with open(fn, 'r', encoding='utf-8') as f: nb = read(f, as_version=4)
44
45
  if not NotebookNotary().check_signature(nb): NotebookNotary().sign(nb)
45
46
  check_fname.touch(exist_ok=True)
46
47
 
@@ -121,7 +122,8 @@ def _nbdev_clean(nb, path=None, clear_all=None):
121
122
  clear_all = clear_all or cfg.clear_all
122
123
  allowed_metadata_keys = cfg.get("allowed_metadata_keys").split()
123
124
  allowed_cell_metadata_keys = cfg.get("allowed_cell_metadata_keys").split()
124
- return clean_nb(nb, clear_all, allowed_metadata_keys, allowed_cell_metadata_keys, cfg.clean_ids)
125
+ clean_nb(nb, clear_all, allowed_metadata_keys, allowed_cell_metadata_keys, cfg.clean_ids)
126
+ if path: nbdev_trust.__wrapped__(path)
125
127
 
126
128
  # %% ../nbs/api/11_clean.ipynb 29
127
129
  @call_parse
nbdev/config.py CHANGED
@@ -63,7 +63,7 @@ def _apply_defaults(
63
63
  title='%(lib_name)s', # Quarto website title
64
64
  allowed_metadata_keys='', # Preserve the list of keys in the main notebook metadata
65
65
  allowed_cell_metadata_keys='', # Preserve the list of keys in cell level metadata
66
- jupyter_hooks:bool_arg=True, # Run Jupyter hooks?
66
+ jupyter_hooks:bool_arg=False, # Run Jupyter hooks?
67
67
  clean_ids:bool_arg=True, # Remove ids from plaintext reprs?
68
68
  clear_all:bool_arg=False, # Remove all cell metadata and cell outputs?
69
69
  put_version_in_init:bool_arg=True, # Add the version to the main __init__.py in nbdev_export
nbdev/release.py CHANGED
@@ -240,11 +240,11 @@ def write_conda_meta(path='conda'):
240
240
  _write_yaml(path, *_get_conda_meta())
241
241
 
242
242
  # %% ../nbs/api/18_release.ipynb 43
243
- # This function is used as a utility for creating HF spaces.
244
- def write_requirements(directory=None):
243
+ @call_parse
244
+ def write_requirements(path:str=''):
245
245
  "Writes a `requirements.txt` file to `directory` based on settings.ini."
246
246
  cfg = get_config()
247
- d = Path(directory) if directory else cfg.config_path
247
+ d = Path(path) if path else cfg.config_path
248
248
  req = '\n'.join([cfg.get(k, '').replace(' ', '\n') for k in ['requirements', 'pip_requirements']])
249
249
  (d/'requirements.txt').mk_write(req)
250
250
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nbdev
3
- Version: 2.3.22
3
+ Version: 2.3.25
4
4
  Summary: Create delightful software with Jupyter Notebooks
5
5
  Home-page: https://github.com/fastai/nbdev
6
6
  Author: Jeremy Howard and Hamel Husain
@@ -1,8 +1,8 @@
1
- nbdev/__init__.py,sha256=fuQM7ER8lmcnHczTCUVGHqbCDK_D4pHds8Uo1JBVdHk,90
1
+ nbdev/__init__.py,sha256=7SAtKCWZF0IYI-oXAYIv80UtQ7Cu1JsImF8CnucscnY,90
2
2
  nbdev/_modidx.py,sha256=cfvhKryWwys106hchXzhcUqC37lQHHAKJKk6vrUiRAs,40317
3
- nbdev/clean.py,sha256=lLtfhCLjkDBqf8MvIG9lDSWSmA9vUDvn2QhS6LPprHI,9284
3
+ nbdev/clean.py,sha256=RLhM4-joJNpxauTy33HYb3gaUHaKtCOaWfrKWec5Zd4,9403
4
4
  nbdev/cli.py,sha256=OAEdAqGdgHbUFYjHmn8ZmFNbBCxJjwvtDwgYatjmh1U,5639
5
- nbdev/config.py,sha256=fTTtYCQHyp8sXCFAyGN93eLOr3N3uOkv4LJ5-9Bclxs,12235
5
+ nbdev/config.py,sha256=2WrrWR_3kyxUEmzz7hliVWDlYzWkLlOsiL08tUopNnI,12236
6
6
  nbdev/doclinks.py,sha256=X5d8Xz52p-LlWwhhCN6d-00RQ0E8BsONuPH_xUSA6kc,10287
7
7
  nbdev/export.py,sha256=LEhn7UpfMSm9QKrC31q91Bsw-ZHd68DNv7MjhsNi15A,3275
8
8
  nbdev/extract_attachments.py,sha256=O4mS4EFIOXL_yQ3jmsnBStrWxGR_nPNvxLYXHtLeimw,2208
@@ -15,15 +15,15 @@ nbdev/process.py,sha256=7dl9U7JLL9wbJta-KKTTnkMktBVsK5s-y8OBxtfk68I,5863
15
15
  nbdev/processors.py,sha256=O5r2gXOCQlHI6aX0UFl_4PdaYV0fKPy6joYov_T7V88,11492
16
16
  nbdev/qmd.py,sha256=3Cskd8ynm25Hh7bo-_t0hxCMF6jqXxgq_VfkpLBKu_w,2958
17
17
  nbdev/quarto.py,sha256=uPburjx-OG9ruNTI08Ku_iOV5gerUUGNQUXDeOGmAco,12017
18
- nbdev/release.py,sha256=1rqBx77XPWSfb9JW8X7rTyaHz7wc4aRd3BHIkJafcKI,14229
18
+ nbdev/release.py,sha256=6lwSBn9HkTNSl9jWIkYcKdBtWGo-LWl3YBjhQREuI2k,14167
19
19
  nbdev/serve.py,sha256=8q2qa82-osuIOpQamJ13Q_WEnnVZycxb8Vj467PGias,3020
20
20
  nbdev/serve_drv.py,sha256=IZ2acem_KKsXYYe0iUECiR_orkYLBkT1ZG_258ZS7SQ,657
21
21
  nbdev/showdoc.py,sha256=sWkpTLpWLUMQBsysHqyvS7czIVcmfkJ_pjSU3zcp-AI,9150
22
22
  nbdev/sync.py,sha256=ZKcWRJd49EaYJXeIB8hSa8oWHDrqRWoyRbGUGHDYxJg,2898
23
23
  nbdev/test.py,sha256=74db-sK_rnc69Q3beztibXDSZUeOk6M9nIiIORLHzlo,4397
24
- nbdev-2.3.22.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
25
- nbdev-2.3.22.dist-info/METADATA,sha256=_GCqOiQNGrSn7GAklNaypt01dt4FI4eVrN8xefhmFi8,10158
26
- nbdev-2.3.22.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
27
- nbdev-2.3.22.dist-info/entry_points.txt,sha256=lFZD1JQyZQI8x8PuaaSqbfnhInHhpm56nCR6n84nFKk,1272
28
- nbdev-2.3.22.dist-info/top_level.txt,sha256=3cWYLMuaXsZjz3TQRGEkWGs9Z8ieEDmYcq8TZS3y3vU,6
29
- nbdev-2.3.22.dist-info/RECORD,,
24
+ nbdev-2.3.25.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
25
+ nbdev-2.3.25.dist-info/METADATA,sha256=-BD11ix7lukd1U8Nwhf4du3PtvZ7MxUqVmmFr8Lav7s,10158
26
+ nbdev-2.3.25.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
27
+ nbdev-2.3.25.dist-info/entry_points.txt,sha256=GMherdbuc27OmIuaaom4eNx5sTdCvAdNrZA6XLEZOA8,1326
28
+ nbdev-2.3.25.dist-info/top_level.txt,sha256=3cWYLMuaXsZjz3TQRGEkWGs9Z8ieEDmYcq8TZS3y3vU,6
29
+ nbdev-2.3.25.dist-info/RECORD,,
@@ -23,6 +23,7 @@ nbdev_readme = nbdev.quarto:nbdev_readme
23
23
  nbdev_release_both = nbdev.release:release_both
24
24
  nbdev_release_gh = nbdev.release:release_gh
25
25
  nbdev_release_git = nbdev.release:release_git
26
+ nbdev_requirements = nbdev.release:write_requirements
26
27
  nbdev_sidebar = nbdev.quarto:nbdev_sidebar
27
28
  nbdev_test = nbdev.test:nbdev_test
28
29
  nbdev_trust = nbdev.clean:nbdev_trust
File without changes