nbdev 2.3.37__tar.gz → 2.4.1__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 (40) hide show
  1. {nbdev-2.3.37/nbdev.egg-info → nbdev-2.4.1}/PKG-INFO +3 -5
  2. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/__init__.py +1 -1
  3. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/_modidx.py +2 -1
  4. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/config.py +32 -4
  5. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/showdoc.py +1 -2
  6. {nbdev-2.3.37 → nbdev-2.4.1/nbdev.egg-info}/PKG-INFO +3 -5
  7. nbdev-2.4.1/pyproject.toml +11 -0
  8. {nbdev-2.3.37 → nbdev-2.4.1}/settings.ini +6 -5
  9. nbdev-2.3.37/pyproject.toml +0 -3
  10. {nbdev-2.3.37 → nbdev-2.4.1}/CONTRIBUTING.md +0 -0
  11. {nbdev-2.3.37 → nbdev-2.4.1}/LICENSE +0 -0
  12. {nbdev-2.3.37 → nbdev-2.4.1}/MANIFEST.in +0 -0
  13. {nbdev-2.3.37 → nbdev-2.4.1}/README.md +0 -0
  14. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/clean.py +0 -0
  15. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/cli.py +0 -0
  16. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/doclinks.py +0 -0
  17. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/export.py +0 -0
  18. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/extract_attachments.py +0 -0
  19. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/frontmatter.py +0 -0
  20. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/imports.py +0 -0
  21. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/maker.py +0 -0
  22. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/merge.py +0 -0
  23. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/migrate.py +0 -0
  24. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/process.py +0 -0
  25. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/processors.py +0 -0
  26. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/qmd.py +0 -0
  27. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/quarto.py +0 -0
  28. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/release.py +0 -0
  29. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/serve.py +0 -0
  30. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/serve_drv.py +0 -0
  31. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/sync.py +0 -0
  32. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev/test.py +0 -0
  33. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev.egg-info/SOURCES.txt +0 -0
  34. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev.egg-info/dependency_links.txt +0 -0
  35. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev.egg-info/entry_points.txt +0 -0
  36. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev.egg-info/not-zip-safe +0 -0
  37. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev.egg-info/requires.txt +1 -1
  38. {nbdev-2.3.37 → nbdev-2.4.1}/nbdev.egg-info/top_level.txt +0 -0
  39. {nbdev-2.3.37 → nbdev-2.4.1}/setup.cfg +0 -0
  40. {nbdev-2.3.37 → nbdev-2.4.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nbdev
3
- Version: 2.3.37
3
+ Version: 2.4.1
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
@@ -11,14 +11,12 @@ Keywords: nbdev fastai jupyter notebook export
11
11
  Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: Intended Audience :: Developers
13
13
  Classifier: Natural Language :: English
14
- Classifier: Programming Language :: Python :: 3.7
15
- Classifier: Programming Language :: Python :: 3.8
16
14
  Classifier: Programming Language :: Python :: 3.9
17
15
  Classifier: Programming Language :: Python :: 3.10
18
16
  Classifier: Programming Language :: Python :: 3.12
19
17
  Classifier: Programming Language :: Python :: 3.13
20
18
  Classifier: License :: OSI Approved :: Apache Software License
21
- Requires-Python: >=3.7
19
+ Requires-Python: >=3.9
22
20
  Description-Content-Type: text/markdown
23
21
  License-File: LICENSE
24
22
  Requires-Dist: packaging
@@ -29,7 +27,6 @@ Requires-Dist: ghapi>=1.0.3
29
27
  Requires-Dist: watchdog
30
28
  Requires-Dist: asttokens
31
29
  Requires-Dist: setuptools
32
- Requires-Dist: plum-dispatch
33
30
  Requires-Dist: PyYAML
34
31
  Provides-Extra: dev
35
32
  Requires-Dist: ipywidgets; extra == "dev"
@@ -43,6 +40,7 @@ Requires-Dist: nbclassic; extra == "dev"
43
40
  Requires-Dist: pysymbol_llm; extra == "dev"
44
41
  Requires-Dist: llms-txt; extra == "dev"
45
42
  Requires-Dist: sphinx; extra == "dev"
43
+ Requires-Dist: plum-dispatch; extra == "dev"
46
44
 
47
45
  # Getting Started
48
46
 
@@ -1,4 +1,4 @@
1
- __version__ = "2.3.37"
1
+ __version__ = "2.4.1"
2
2
 
3
3
  from .doclinks import nbdev_export
4
4
  from .showdoc import show_doc
@@ -1,6 +1,6 @@
1
1
  # Autogenerated by nbdev
2
2
 
3
- d = { 'settings': { 'branch': 'master',
3
+ d = { 'settings': { 'branch': 'main',
4
4
  'doc_baseurl': '/',
5
5
  'doc_host': 'https://nbdev.fast.ai',
6
6
  'git_url': 'https://github.com/AnswerDotAI/nbdev',
@@ -46,6 +46,7 @@ d = { 'settings': { 'branch': 'master',
46
46
  'nbdev.config.is_nbdev': ('api/config.html#is_nbdev', 'nbdev/config.py'),
47
47
  'nbdev.config.nbdev_create_config': ('api/config.html#nbdev_create_config', 'nbdev/config.py'),
48
48
  'nbdev.config.show_src': ('api/config.html#show_src', 'nbdev/config.py'),
49
+ 'nbdev.config.update_proj': ('api/config.html#update_proj', 'nbdev/config.py'),
49
50
  'nbdev.config.update_version': ('api/config.html#update_version', 'nbdev/config.py'),
50
51
  'nbdev.config.write_cells': ('api/config.html#write_cells', 'nbdev/config.py')},
51
52
  'nbdev.doclinks': { 'nbdev.doclinks.NbdevLookup': ('api/doclinks.html#nbdevlookup', 'nbdev/doclinks.py'),
@@ -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', 'is_nbdev', 'create_output', 'show_src', 'update_version',
7
- 'add_init', 'write_cells']
6
+ __all__ = ['pyproj_tmpl', 'nbdev_create_config', 'get_config', 'config_key', 'is_nbdev', 'create_output', 'show_src',
7
+ 'update_version', 'update_proj', 'add_init', 'write_cells']
8
8
 
9
9
  # %% ../nbs/api/01_config.ipynb
10
10
  from datetime import datetime
@@ -49,7 +49,7 @@ def _apply_defaults(
49
49
  license='apache2', # License for the package
50
50
  copyright:str=None, # Copyright for the package, defaults to '`current_year` onwards, `author`'
51
51
  status='3', # Development status PyPI classifier
52
- min_python='3.7', # Minimum Python version PyPI classifier
52
+ min_python='3.9', # Minimum Python version PyPI classifier
53
53
  audience='Developers', # Intended audience PyPI classifier
54
54
  language='English', # Language PyPI classifier
55
55
  recursive:bool_arg=True, # Include subfolders in notebook globs?
@@ -63,6 +63,7 @@ def _apply_defaults(
63
63
  clear_all:bool_arg=False, # Remove all cell metadata and cell outputs?
64
64
  cell_number:bool_arg=True, # Add cell number to the exported file
65
65
  put_version_in_init:bool_arg=True, # Add the version to the main __init__.py in nbdev_export
66
+ update_pyproject:bool_arg=True, # Create/update pyproject.toml with correct project name
66
67
  skip_procs:str='', # A comma-separated list of processors that you want to skip
67
68
  ):
68
69
  "Apply default settings where missing in `cfg`."
@@ -142,7 +143,7 @@ _nbdev_cfg_head = '''# All sections below are required unless otherwise specifie
142
143
 
143
144
  '''
144
145
  _nbdev_cfg_sections = {'Python library': 'repo lib_name version min_python license black_formatting',
145
- 'nbdev': 'doc_path lib_path nbs_path recursive tst_flags put_version_in_init',
146
+ 'nbdev': 'doc_path lib_path nbs_path recursive tst_flags put_version_in_init update_pyproject',
146
147
  'Docs': 'branch custom_sidebar doc_host doc_baseurl git_url title',
147
148
  'PyPI': 'audience author author_email copyright description keywords language status user'}
148
149
  _nbdev_cfg_tail = '''### Optional ###
@@ -219,9 +220,26 @@ def create_output(txt, mime):
219
220
  # %% ../nbs/api/01_config.ipynb
220
221
  def show_src(src, lang='python'): return Markdown(f'```{lang}\n{src}\n```')
221
222
 
223
+ # %% ../nbs/api/01_config.ipynb
224
+ pyproj_tmpl = """[build-system]
225
+ requires = ["setuptools>=64.0"]
226
+ build-backend = "setuptools.build_meta"
227
+
228
+ [project]
229
+ name = "FILL_IN"
230
+ requires-python="FILL_IN"
231
+ dynamic = [ "keywords", "description", "version", "dependencies", "optional-dependencies", "readme", "license", "authors", "classifiers", "entry-points", "scripts", "urls"]
232
+
233
+ [tool.uv]
234
+ cache-keys = [{ file = "pyproject.toml" }, { file = "settings.ini" }, { file = "setup.py" }]
235
+ """
236
+
222
237
  # %% ../nbs/api/01_config.ipynb
223
238
  _re_version = re.compile(r'^__version__\s*=.*$', re.MULTILINE)
239
+ _re_proj = re.compile(r'^name\s*=\s*".*$', re.MULTILINE)
240
+ _re_reqpy = re.compile(r'^requires-python\s*=\s*".*$', re.MULTILINE)
224
241
  _init = '__init__.py'
242
+ _pyproj = 'pyproject.toml'
225
243
 
226
244
  def update_version(path=None):
227
245
  "Add or update `__version__` in the main `__init__.py` of the library."
@@ -236,6 +254,15 @@ def update_version(path=None):
236
254
 
237
255
  def _has_py(fs): return any(1 for f in fs if f.endswith('.py'))
238
256
 
257
+ def update_proj(path):
258
+ "Create or update `pyproject.toml` in the project root."
259
+ fname = path/_pyproj
260
+ if not fname.exists(): fname.write_text(pyproj_tmpl)
261
+ txt = fname.read_text()
262
+ txt = _re_proj.sub(f'name="{get_config().lib_name}"', txt)
263
+ txt = _re_reqpy.sub(f'requires-python=">={get_config().min_python}"', txt)
264
+ fname.write_text(txt)
265
+
239
266
  def add_init(path=None):
240
267
  "Add `__init__.py` in all subdirs of `path` containing python files if it's not there already."
241
268
  # we add the lowest-level `__init__.py` files first, which ensures _has_py succeeds for parent modules
@@ -247,6 +274,7 @@ def add_init(path=None):
247
274
  subds = (os.listdir(r/d) for d in ds)
248
275
  if _has_py(fs) or any(filter(_has_py, subds)) and not (r/_init).exists(): (r/_init).touch()
249
276
  if get_config().get('put_version_in_init', True): update_version(path)
277
+ if get_config().get('update_pyproject', True): update_proj(path.parent)
250
278
 
251
279
  # %% ../nbs/api/01_config.ipynb
252
280
  def write_cells(cells, hdr, file, offset=0, cell_number=True, solo_nb=False):
@@ -13,7 +13,6 @@ from fastcore.utils import *
13
13
  from importlib import import_module
14
14
  import inspect, sys
15
15
  from collections import OrderedDict
16
- from plum import Function
17
16
  from textwrap import fill
18
17
  from types import FunctionType
19
18
 
@@ -189,7 +188,7 @@ def show_doc(sym, # Symbol to document
189
188
  elif isinstance(renderer,str):
190
189
  p,m = renderer.rsplit('.', 1)
191
190
  renderer = getattr(import_module(p), m)
192
- if isinstance(sym, Function): pass
191
+ if isinstance_str(sym, "Function"): pass
193
192
  elif isinstance_str(sym, "TypeDispatch"): pass # use _str as TypeDispatch will be removed from fastcore
194
193
  else:return renderer(sym or show_doc, name=name, title_level=title_level)
195
194
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nbdev
3
- Version: 2.3.37
3
+ Version: 2.4.1
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
@@ -11,14 +11,12 @@ Keywords: nbdev fastai jupyter notebook export
11
11
  Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: Intended Audience :: Developers
13
13
  Classifier: Natural Language :: English
14
- Classifier: Programming Language :: Python :: 3.7
15
- Classifier: Programming Language :: Python :: 3.8
16
14
  Classifier: Programming Language :: Python :: 3.9
17
15
  Classifier: Programming Language :: Python :: 3.10
18
16
  Classifier: Programming Language :: Python :: 3.12
19
17
  Classifier: Programming Language :: Python :: 3.13
20
18
  Classifier: License :: OSI Approved :: Apache Software License
21
- Requires-Python: >=3.7
19
+ Requires-Python: >=3.9
22
20
  Description-Content-Type: text/markdown
23
21
  License-File: LICENSE
24
22
  Requires-Dist: packaging
@@ -29,7 +27,6 @@ Requires-Dist: ghapi>=1.0.3
29
27
  Requires-Dist: watchdog
30
28
  Requires-Dist: asttokens
31
29
  Requires-Dist: setuptools
32
- Requires-Dist: plum-dispatch
33
30
  Requires-Dist: PyYAML
34
31
  Provides-Extra: dev
35
32
  Requires-Dist: ipywidgets; extra == "dev"
@@ -43,6 +40,7 @@ Requires-Dist: nbclassic; extra == "dev"
43
40
  Requires-Dist: pysymbol_llm; extra == "dev"
44
41
  Requires-Dist: llms-txt; extra == "dev"
45
42
  Requires-Dist: sphinx; extra == "dev"
43
+ Requires-Dist: plum-dispatch; extra == "dev"
46
44
 
47
45
  # Getting Started
48
46
 
@@ -0,0 +1,11 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name="nbdev"
7
+ requires-python=">=3.9"
8
+ dynamic = [ "keywords", "description", "version", "dependencies", "optional-dependencies", "readme", "license", "authors", "classifiers", "entry-points", "scripts", "urls"]
9
+
10
+ [tool.uv]
11
+ cache-keys = [{ file = "pyproject.toml" }, { file = "settings.ini" }, { file = "setup.py" }]
@@ -7,19 +7,19 @@ keywords = nbdev fastai jupyter notebook export
7
7
  user = AnswerDotAI
8
8
  author = Jeremy Howard and Hamel Husain
9
9
  author_email = j@fast.ai
10
- branch = master
11
- min_python = 3.7
12
- version = 2.3.37
10
+ branch = main
11
+ min_python = 3.9
12
+ version = 2.4.1
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.8.0 execnb>=0.1.12 astunparse ghapi>=1.0.3 watchdog asttokens setuptools plum-dispatch
18
+ requirements = fastcore>=1.8.0 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 sphinx
22
+ dev_requirements = ipywidgets nbdev-numpy nbdev-stdlib pandas matplotlib black svg.py nbclassic pysymbol_llm llms-txt sphinx plum-dispatch
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
@@ -72,4 +72,5 @@ clear_all = False
72
72
  cell_number = False
73
73
  put_version_in_init = True
74
74
  skip_procs =
75
+ update_pyproject = True
75
76
 
@@ -1,3 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools>=64.0"]
3
- build-backend = "setuptools.build_meta"
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
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -6,7 +6,6 @@ ghapi>=1.0.3
6
6
  watchdog
7
7
  asttokens
8
8
  setuptools
9
- plum-dispatch
10
9
  PyYAML
11
10
 
12
11
  [dev]
@@ -21,3 +20,4 @@ nbclassic
21
20
  pysymbol_llm
22
21
  llms-txt
23
22
  sphinx
23
+ plum-dispatch
File without changes
File without changes