nbdev 2.3.30__py3-none-any.whl → 2.3.31__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.30"
1
+ __version__ = "2.3.31"
2
2
 
3
3
  from .doclinks import nbdev_export
4
4
  from .showdoc import show_doc
nbdev/_modidx.py CHANGED
@@ -41,6 +41,7 @@ d = { 'settings': { 'branch': 'master',
41
41
  'nbdev.config.config_key': ('api/config.html#config_key', 'nbdev/config.py'),
42
42
  'nbdev.config.create_output': ('api/config.html#create_output', 'nbdev/config.py'),
43
43
  'nbdev.config.get_config': ('api/config.html#get_config', 'nbdev/config.py'),
44
+ 'nbdev.config.is_nbdev': ('api/config.html#is_nbdev', 'nbdev/config.py'),
44
45
  'nbdev.config.nbdev_create_config': ('api/config.html#nbdev_create_config', 'nbdev/config.py'),
45
46
  'nbdev.config.show_src': ('api/config.html#show_src', 'nbdev/config.py'),
46
47
  'nbdev.config.update_version': ('api/config.html#update_version', 'nbdev/config.py'),
nbdev/config.py CHANGED
@@ -3,8 +3,8 @@
3
3
  # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/api/01_config.ipynb.
4
4
 
5
5
  # %% auto 0
6
- __all__ = ['nbdev_create_config', 'get_config', 'config_key', 'create_output', 'show_src', 'update_version', 'add_init',
7
- 'write_cells']
6
+ __all__ = ['nbdev_create_config', 'get_config', 'config_key', 'is_nbdev', 'create_output', 'show_src', 'update_version',
7
+ 'add_init', 'write_cells']
8
8
 
9
9
  # %% ../nbs/api/01_config.ipynb
10
10
  from datetime import datetime
@@ -209,6 +209,9 @@ def config_key(c, default=None, path=True, missing_ok=None):
209
209
  warn("`config_key` is deprecated. Use `get_config().get` or `get_config().path` instead.", DeprecationWarning)
210
210
  return get_config().path(c, default) if path else get_config().get(c, default)
211
211
 
212
+ # %% ../nbs/api/01_config.ipynb
213
+ def is_nbdev(): return _nbdev_config_file().exists()
214
+
212
215
  # %% ../nbs/api/01_config.ipynb
213
216
  def create_output(txt, mime):
214
217
  "Add a cell output containing `txt` of the `mime` text MIME sub-type"
nbdev/doclinks.py CHANGED
@@ -143,9 +143,10 @@ def nbdev_export(
143
143
  **kwargs):
144
144
  "Export notebooks in `path` to Python modules"
145
145
  if os.environ.get('IN_TEST',0): return
146
+ if not is_nbdev(): raise Exception('`nbdev_export` must be called from a directory within a nbdev project.')
146
147
  if procs:
147
- import nbdev.export
148
- procs = [getattr(nbdev.export, p) for p in L(procs)]
148
+ import nbdev.export
149
+ procs = [getattr(nbdev.export, p) for p in L(procs)]
149
150
  files = nbglob(path=path, as_path=True, **kwargs).sorted('name')
150
151
  for f in files: nb_export(f, procs=procs)
151
152
  add_init(get_config().lib_path)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nbdev
3
- Version: 2.3.30
3
+ Version: 2.3.31
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,9 +1,9 @@
1
- nbdev/__init__.py,sha256=N20VnRvvDUC9kAXnKgZJD_7suSbzb-Q1vJKDEju_eBM,90
2
- nbdev/_modidx.py,sha256=Pa-Ve3zq0R4qkykuda25oQ5Jw0YXa5u0ds6QK_siSmk,40577
1
+ nbdev/__init__.py,sha256=ReFFjPgrWaySFlsH-cmisBxKdGcxzuymBgY7aQ3OpDs,90
2
+ nbdev/_modidx.py,sha256=7X6o4xjiXIFQHKsVBFE0qOF3Wuo_s2KSxGoPViqFRiM,40681
3
3
  nbdev/clean.py,sha256=mVgsW2_g7KIXAVh8mwpj86UwMN6QVM-q33PDzA27nWw,9410
4
4
  nbdev/cli.py,sha256=qGNwsrskbVazzyKDpTjwQsQcwEqAZBlFTlehHswasHs,5608
5
- nbdev/config.py,sha256=4vQ480tv1CrUv52m6vmj407btJOTfPyUQCDYMlE6FH4,12247
6
- nbdev/doclinks.py,sha256=t6tbISN4R-WyDCmXJeGjYadpc5kBGQnAIxBEsWw3kBw,10490
5
+ nbdev/config.py,sha256=vbNR9hUr5kcOTJrah229Wcn8o5sF92LZAEmTE9mJtoE,12345
6
+ nbdev/doclinks.py,sha256=L2KkkpC1h6f80rZ-GKj2wRb7uI8lmkXxcVEsQ7jeeoM,10607
7
7
  nbdev/export.py,sha256=P4fzzPFs0VIaWXclfU1i3JtBdMpDNqq8lmV4oKv6n9Y,3574
8
8
  nbdev/extract_attachments.py,sha256=O4mS4EFIOXL_yQ3jmsnBStrWxGR_nPNvxLYXHtLeimw,2208
9
9
  nbdev/frontmatter.py,sha256=i195bhDLWd-WUEzQT9JBoA4Ee3j6gD1dKMT8yk5fF4Y,2761
@@ -21,9 +21,9 @@ nbdev/serve_drv.py,sha256=IZ2acem_KKsXYYe0iUECiR_orkYLBkT1ZG_258ZS7SQ,657
21
21
  nbdev/showdoc.py,sha256=sSVyVw-hIIewJ12sxngVpvb_hoHVrmLcuZWjszqMzxE,9169
22
22
  nbdev/sync.py,sha256=eykW8weeOqoRLbNRCeKaO8QqD6_CwspOwnwgno44yxY,3088
23
23
  nbdev/test.py,sha256=_ECBd5fvfGEICIfkTI2S8w8YatL5CaPltCeDSsiH6yw,4435
24
- nbdev-2.3.30.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
25
- nbdev-2.3.30.dist-info/METADATA,sha256=nAzf_SpCTGFaJNo6cymczYungEWpFZsxQ38vdpZFWhs,10398
26
- nbdev-2.3.30.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
27
- nbdev-2.3.30.dist-info/entry_points.txt,sha256=GMherdbuc27OmIuaaom4eNx5sTdCvAdNrZA6XLEZOA8,1326
28
- nbdev-2.3.30.dist-info/top_level.txt,sha256=3cWYLMuaXsZjz3TQRGEkWGs9Z8ieEDmYcq8TZS3y3vU,6
29
- nbdev-2.3.30.dist-info/RECORD,,
24
+ nbdev-2.3.31.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
25
+ nbdev-2.3.31.dist-info/METADATA,sha256=ON3bNstEl4GPPHHFFMnLjZoMpopPxOo7qG_OWV2Qqoc,10398
26
+ nbdev-2.3.31.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
27
+ nbdev-2.3.31.dist-info/entry_points.txt,sha256=GMherdbuc27OmIuaaom4eNx5sTdCvAdNrZA6XLEZOA8,1326
28
+ nbdev-2.3.31.dist-info/top_level.txt,sha256=3cWYLMuaXsZjz3TQRGEkWGs9Z8ieEDmYcq8TZS3y3vU,6
29
+ nbdev-2.3.31.dist-info/RECORD,,
File without changes