nbdev 3.0.0__tar.gz → 3.0.2__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 (37) hide show
  1. {nbdev-3.0.0/nbdev.egg-info → nbdev-3.0.2}/PKG-INFO +29 -12
  2. {nbdev-3.0.0 → nbdev-3.0.2}/README.md +28 -11
  3. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/__init__.py +1 -1
  4. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/config.py +8 -6
  5. {nbdev-3.0.0 → nbdev-3.0.2/nbdev.egg-info}/PKG-INFO +29 -12
  6. {nbdev-3.0.0 → nbdev-3.0.2}/CONTRIBUTING.md +0 -0
  7. {nbdev-3.0.0 → nbdev-3.0.2}/LICENSE +0 -0
  8. {nbdev-3.0.0 → nbdev-3.0.2}/MANIFEST.in +0 -0
  9. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/_modidx.py +0 -0
  10. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/clean.py +0 -0
  11. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/cli.py +0 -0
  12. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/diff.py +0 -0
  13. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/doclinks.py +0 -0
  14. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/export.py +0 -0
  15. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/extract_attachments.py +0 -0
  16. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/frontmatter.py +0 -0
  17. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/imports.py +0 -0
  18. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/maker.py +0 -0
  19. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/merge.py +0 -0
  20. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/migrate.py +0 -0
  21. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/process.py +0 -0
  22. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/processors.py +0 -0
  23. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/qmd.py +0 -0
  24. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/quarto.py +0 -0
  25. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/release.py +0 -0
  26. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/serve.py +0 -0
  27. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/serve_drv.py +0 -0
  28. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/showdoc.py +0 -0
  29. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/sync.py +0 -0
  30. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev/test.py +0 -0
  31. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev.egg-info/SOURCES.txt +0 -0
  32. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev.egg-info/dependency_links.txt +0 -0
  33. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev.egg-info/entry_points.txt +0 -0
  34. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev.egg-info/requires.txt +0 -0
  35. {nbdev-3.0.0 → nbdev-3.0.2}/nbdev.egg-info/top_level.txt +0 -0
  36. {nbdev-3.0.0 → nbdev-3.0.2}/pyproject.toml +0 -0
  37. {nbdev-3.0.0 → nbdev-3.0.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdev
3
- Version: 3.0.0
3
+ Version: 3.0.2
4
4
  Summary: Create delightful software with Jupyter Notebooks
5
5
  Author-email: "Jeremy Howard and the fast.ai community" <j@fast.ai>
6
6
  License: Apache-2.0
@@ -49,6 +49,22 @@ Dynamic: license-file
49
49
 
50
50
  ![CI](https://github.com/fastai/nbdev/actions/workflows/test.yaml/badge.svg)
51
51
 
52
+ ## 🛑**Jan 2026 Major Version Update – Breaking Change**🛑
53
+
54
+ **nbdev3 is here!** As many of you have been requesting, configuration
55
+ has moved from `settings.ini` to `pyproject.toml`, following modern
56
+ Python packaging standards ([PEP
57
+ 621](https://peps.python.org/pep-0621/)). Your project metadata now
58
+ lives in the standard `[project]` section, while nbdev-specific settings
59
+ go in `[tool.nbdev]`.
60
+
61
+ **Migrating from nbdev2:** Run
62
+ [`nbdev_migrate_config`](https://nbdev.fast.ai/api/migrate.html#nbdev_migrate_config)
63
+ in your project root to automatically convert your `settings.ini` to
64
+ `pyproject.toml` and update your GitHub Actions workflows to use
65
+ nbdev3-compatible versions. Your existing notebooks and code don’t need
66
+ any changes.
67
+
52
68
  `nbdev` is a notebook-driven development platform. Simply write
53
69
  notebooks with lightweight markup and get high-quality documentation,
54
70
  tests, continuous integration, and packaging for free!
@@ -68,7 +84,10 @@ practices because tests and documentation are first class.
68
84
  package releases. Python best practices are automatically followed,
69
85
  for example, only exported objects are included in `__all__`
70
86
  - **Two-way sync between notebooks and plaintext source code** allowing
71
- you to use your IDE for code navigation or quick edits
87
+ you to use your IDE for code navigation or quick edits. Sync is
88
+ robust: each exported cell is tagged with its unique notebook cell ID,
89
+ so [`nbdev_update`](https://nbdev.fast.ai/api/sync.html#nbdev_update)
90
+ always updates the correct cell
72
91
  - **Tests** written as ordinary notebook cells are run in parallel with
73
92
  a single command
74
93
  - **Continuous integration** out-of-the-box with [GitHub
@@ -91,12 +110,6 @@ You can install nbdev with pip:
91
110
  pip install nbdev
92
111
  ```
93
112
 
94
- … or with conda (or mamba):
95
-
96
- ``` sh
97
- conda install -c fastai nbdev
98
- ```
99
-
100
113
  Note that `nbdev` must be installed into the same Python environment
101
114
  that you use for both Jupyter and your project.
102
115
 
@@ -123,11 +136,13 @@ available commands:
123
136
  !nbdev_help
124
137
  ```
125
138
 
126
- nbdev_bump_version Increment version in settings.ini by one
139
+ nb_export Export a single nbdev notebook to a python script.
140
+ nbdev_bump_version Increment version in __init__.py by one
127
141
  nbdev_changelog Create a CHANGELOG.md file from closed and labeled GitHub issues
128
142
  nbdev_clean Clean all notebooks in `fname` to avoid merge conflicts
129
143
  nbdev_conda Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it
130
- nbdev_create_config Create a config file.
144
+ nbdev_contributing Create CONTRIBUTING.md from contributing_nb (defaults to 'contributing.ipynb' if present). Skips if the file doesn't exist.
145
+ nbdev_create_config Create a pyproject.toml config file.
131
146
  nbdev_docs Create Quarto docs and README.md
132
147
  nbdev_export Export notebooks in `path` to Python modules
133
148
  nbdev_filter A notebook filter for Quarto
@@ -138,6 +153,7 @@ available commands:
138
153
  nbdev_install_quarto Install latest Quarto on macOS or Linux, prints instructions for Windows
139
154
  nbdev_merge Git merge driver for notebooks
140
155
  nbdev_migrate Convert all markdown and notebook files in `path` from v1 to v2
156
+ nbdev_migrate_config Migrate settings.ini to pyproject.toml
141
157
  nbdev_new Create an nbdev project.
142
158
  nbdev_prepare Export, test, and clean notebooks, and render README if needed
143
159
  nbdev_preview Preview docs locally
@@ -147,12 +163,13 @@ available commands:
147
163
  nbdev_release_both Release both conda and PyPI packages
148
164
  nbdev_release_gh Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`
149
165
  nbdev_release_git Tag and create a release in GitHub for the current version
150
- nbdev_requirements Writes a `requirements.txt` file to `directory` based on settings.ini.
166
+ nbdev_requirements Writes a `requirements.txt` file to `directory` based on pyproject.toml.
151
167
  nbdev_sidebar Create sidebar.yml
152
168
  nbdev_test Test in parallel notebooks matching `path`, passing along `flags`
153
- nbdev_trust Trust notebooks matching `fname`
169
+ nbdev_trust Trust notebooks matching `fname`.
154
170
  nbdev_update Propagate change in modules matching `fname` to notebooks that created them
155
171
  nbdev_update_license Allows you to update the license of your project.
172
+ watch_export Use `nb_export` on ipynb files in `nbs` directory on changes using nbdev config if available
156
173
 
157
174
  ## FAQ
158
175
 
@@ -5,6 +5,22 @@
5
5
 
6
6
  ![CI](https://github.com/fastai/nbdev/actions/workflows/test.yaml/badge.svg)
7
7
 
8
+ ## 🛑**Jan 2026 Major Version Update – Breaking Change**🛑
9
+
10
+ **nbdev3 is here!** As many of you have been requesting, configuration
11
+ has moved from `settings.ini` to `pyproject.toml`, following modern
12
+ Python packaging standards ([PEP
13
+ 621](https://peps.python.org/pep-0621/)). Your project metadata now
14
+ lives in the standard `[project]` section, while nbdev-specific settings
15
+ go in `[tool.nbdev]`.
16
+
17
+ **Migrating from nbdev2:** Run
18
+ [`nbdev_migrate_config`](https://nbdev.fast.ai/api/migrate.html#nbdev_migrate_config)
19
+ in your project root to automatically convert your `settings.ini` to
20
+ `pyproject.toml` and update your GitHub Actions workflows to use
21
+ nbdev3-compatible versions. Your existing notebooks and code don’t need
22
+ any changes.
23
+
8
24
  `nbdev` is a notebook-driven development platform. Simply write
9
25
  notebooks with lightweight markup and get high-quality documentation,
10
26
  tests, continuous integration, and packaging for free!
@@ -24,7 +40,10 @@ practices because tests and documentation are first class.
24
40
  package releases. Python best practices are automatically followed,
25
41
  for example, only exported objects are included in `__all__`
26
42
  - **Two-way sync between notebooks and plaintext source code** allowing
27
- you to use your IDE for code navigation or quick edits
43
+ you to use your IDE for code navigation or quick edits. Sync is
44
+ robust: each exported cell is tagged with its unique notebook cell ID,
45
+ so [`nbdev_update`](https://nbdev.fast.ai/api/sync.html#nbdev_update)
46
+ always updates the correct cell
28
47
  - **Tests** written as ordinary notebook cells are run in parallel with
29
48
  a single command
30
49
  - **Continuous integration** out-of-the-box with [GitHub
@@ -47,12 +66,6 @@ You can install nbdev with pip:
47
66
  pip install nbdev
48
67
  ```
49
68
 
50
- … or with conda (or mamba):
51
-
52
- ``` sh
53
- conda install -c fastai nbdev
54
- ```
55
-
56
69
  Note that `nbdev` must be installed into the same Python environment
57
70
  that you use for both Jupyter and your project.
58
71
 
@@ -79,11 +92,13 @@ available commands:
79
92
  !nbdev_help
80
93
  ```
81
94
 
82
- nbdev_bump_version Increment version in settings.ini by one
95
+ nb_export Export a single nbdev notebook to a python script.
96
+ nbdev_bump_version Increment version in __init__.py by one
83
97
  nbdev_changelog Create a CHANGELOG.md file from closed and labeled GitHub issues
84
98
  nbdev_clean Clean all notebooks in `fname` to avoid merge conflicts
85
99
  nbdev_conda Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it
86
- nbdev_create_config Create a config file.
100
+ nbdev_contributing Create CONTRIBUTING.md from contributing_nb (defaults to 'contributing.ipynb' if present). Skips if the file doesn't exist.
101
+ nbdev_create_config Create a pyproject.toml config file.
87
102
  nbdev_docs Create Quarto docs and README.md
88
103
  nbdev_export Export notebooks in `path` to Python modules
89
104
  nbdev_filter A notebook filter for Quarto
@@ -94,6 +109,7 @@ available commands:
94
109
  nbdev_install_quarto Install latest Quarto on macOS or Linux, prints instructions for Windows
95
110
  nbdev_merge Git merge driver for notebooks
96
111
  nbdev_migrate Convert all markdown and notebook files in `path` from v1 to v2
112
+ nbdev_migrate_config Migrate settings.ini to pyproject.toml
97
113
  nbdev_new Create an nbdev project.
98
114
  nbdev_prepare Export, test, and clean notebooks, and render README if needed
99
115
  nbdev_preview Preview docs locally
@@ -103,12 +119,13 @@ available commands:
103
119
  nbdev_release_both Release both conda and PyPI packages
104
120
  nbdev_release_gh Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`
105
121
  nbdev_release_git Tag and create a release in GitHub for the current version
106
- nbdev_requirements Writes a `requirements.txt` file to `directory` based on settings.ini.
122
+ nbdev_requirements Writes a `requirements.txt` file to `directory` based on pyproject.toml.
107
123
  nbdev_sidebar Create sidebar.yml
108
124
  nbdev_test Test in parallel notebooks matching `path`, passing along `flags`
109
- nbdev_trust Trust notebooks matching `fname`
125
+ nbdev_trust Trust notebooks matching `fname`.
110
126
  nbdev_update Propagate change in modules matching `fname` to notebooks that created them
111
127
  nbdev_update_license Allows you to update the license of your project.
128
+ watch_export Use `nb_export` on ipynb files in `nbs` directory on changes using nbdev config if available
112
129
 
113
130
  ## FAQ
114
131
 
@@ -1,4 +1,4 @@
1
- __version__ = "3.0.0"
1
+ __version__ = "3.0.2"
2
2
 
3
3
  from .doclinks import nbdev_export
4
4
  from .showdoc import show_doc
@@ -16,11 +16,14 @@ from fastcore.script import *
16
16
  from fastcore.style import *
17
17
  from fastcore.xdg import *
18
18
 
19
- import ast,warnings,tomli
19
+ import ast,warnings
20
20
  from IPython.display import Markdown
21
21
  from execnb.nbio import read_nb,NbCell
22
22
  from urllib.error import HTTPError
23
23
 
24
+ try: import tomllib
25
+ except ImportError: import tomli as tomllib
26
+
24
27
  # %% ../nbs/api/01_config.ipynb #117128e6
25
28
  pyproject_nm = 'pyproject.toml'
26
29
  _nbdev_home_dir = 'nbdev'
@@ -145,7 +148,7 @@ def nbdev_create_config(
145
148
  # %% ../nbs/api/01_config.ipynb #0e56064f
146
149
  def _load_toml(p):
147
150
  "Load TOML file at `p` into a dict"
148
- return tomli.loads(Path(p).read_text(encoding='utf-8'))
151
+ return tomllib.loads(Path(p).read_text(encoding='utf-8'))
149
152
 
150
153
  def _has_nbdev(p):
151
154
  "True if pyproject.toml at `p` has [tool.nbdev]"
@@ -158,6 +161,9 @@ def _find_nbdev_pyproject(path=None):
158
161
  for d in [p] + list(p.parents):
159
162
  f = d/pyproject_nm
160
163
  if f.exists() and _has_nbdev(f): return f
164
+ for d in [p] + list(p.parents):
165
+ if (d/'settings.ini').exists():
166
+ raise ValueError(f"Found old settings.ini. Migrate to pyproject.toml using `nbdev_migrate`. See https://nbdev.fast.ai/getting_started.html")
161
167
 
162
168
  # %% ../nbs/api/01_config.ipynb #3dac70e0
163
169
  nbdev_defaults = dict(nbs_path='nbs', doc_path='_docs', tst_flags='notest', recursive=True, readme_nb='index.ipynb',
@@ -224,10 +230,6 @@ def get_config(path=None, also_settings=False):
224
230
  "Return nbdev config."
225
231
  cfg_file = _find_nbdev_pyproject(path)
226
232
  if cfg_file is not None:
227
- # Check for old settings.ini and complain loudly
228
- old_cfg = cfg_file.parent / 'settings.ini'
229
- if old_cfg.exists() and not also_settings:
230
- raise ValueError(f"Found old settings.ini at {old_cfg}. Please migrate to pyproject.toml using `nbdev_migrate`. See https://nbdev.fast.ai/getting_started.html for details.")
231
233
  d = _load_toml(cfg_file)
232
234
  user = _user_config()
233
235
  nbdev = {**user, **d.get('tool', {}).get('nbdev', {})}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdev
3
- Version: 3.0.0
3
+ Version: 3.0.2
4
4
  Summary: Create delightful software with Jupyter Notebooks
5
5
  Author-email: "Jeremy Howard and the fast.ai community" <j@fast.ai>
6
6
  License: Apache-2.0
@@ -49,6 +49,22 @@ Dynamic: license-file
49
49
 
50
50
  ![CI](https://github.com/fastai/nbdev/actions/workflows/test.yaml/badge.svg)
51
51
 
52
+ ## 🛑**Jan 2026 Major Version Update – Breaking Change**🛑
53
+
54
+ **nbdev3 is here!** As many of you have been requesting, configuration
55
+ has moved from `settings.ini` to `pyproject.toml`, following modern
56
+ Python packaging standards ([PEP
57
+ 621](https://peps.python.org/pep-0621/)). Your project metadata now
58
+ lives in the standard `[project]` section, while nbdev-specific settings
59
+ go in `[tool.nbdev]`.
60
+
61
+ **Migrating from nbdev2:** Run
62
+ [`nbdev_migrate_config`](https://nbdev.fast.ai/api/migrate.html#nbdev_migrate_config)
63
+ in your project root to automatically convert your `settings.ini` to
64
+ `pyproject.toml` and update your GitHub Actions workflows to use
65
+ nbdev3-compatible versions. Your existing notebooks and code don’t need
66
+ any changes.
67
+
52
68
  `nbdev` is a notebook-driven development platform. Simply write
53
69
  notebooks with lightweight markup and get high-quality documentation,
54
70
  tests, continuous integration, and packaging for free!
@@ -68,7 +84,10 @@ practices because tests and documentation are first class.
68
84
  package releases. Python best practices are automatically followed,
69
85
  for example, only exported objects are included in `__all__`
70
86
  - **Two-way sync between notebooks and plaintext source code** allowing
71
- you to use your IDE for code navigation or quick edits
87
+ you to use your IDE for code navigation or quick edits. Sync is
88
+ robust: each exported cell is tagged with its unique notebook cell ID,
89
+ so [`nbdev_update`](https://nbdev.fast.ai/api/sync.html#nbdev_update)
90
+ always updates the correct cell
72
91
  - **Tests** written as ordinary notebook cells are run in parallel with
73
92
  a single command
74
93
  - **Continuous integration** out-of-the-box with [GitHub
@@ -91,12 +110,6 @@ You can install nbdev with pip:
91
110
  pip install nbdev
92
111
  ```
93
112
 
94
- … or with conda (or mamba):
95
-
96
- ``` sh
97
- conda install -c fastai nbdev
98
- ```
99
-
100
113
  Note that `nbdev` must be installed into the same Python environment
101
114
  that you use for both Jupyter and your project.
102
115
 
@@ -123,11 +136,13 @@ available commands:
123
136
  !nbdev_help
124
137
  ```
125
138
 
126
- nbdev_bump_version Increment version in settings.ini by one
139
+ nb_export Export a single nbdev notebook to a python script.
140
+ nbdev_bump_version Increment version in __init__.py by one
127
141
  nbdev_changelog Create a CHANGELOG.md file from closed and labeled GitHub issues
128
142
  nbdev_clean Clean all notebooks in `fname` to avoid merge conflicts
129
143
  nbdev_conda Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it
130
- nbdev_create_config Create a config file.
144
+ nbdev_contributing Create CONTRIBUTING.md from contributing_nb (defaults to 'contributing.ipynb' if present). Skips if the file doesn't exist.
145
+ nbdev_create_config Create a pyproject.toml config file.
131
146
  nbdev_docs Create Quarto docs and README.md
132
147
  nbdev_export Export notebooks in `path` to Python modules
133
148
  nbdev_filter A notebook filter for Quarto
@@ -138,6 +153,7 @@ available commands:
138
153
  nbdev_install_quarto Install latest Quarto on macOS or Linux, prints instructions for Windows
139
154
  nbdev_merge Git merge driver for notebooks
140
155
  nbdev_migrate Convert all markdown and notebook files in `path` from v1 to v2
156
+ nbdev_migrate_config Migrate settings.ini to pyproject.toml
141
157
  nbdev_new Create an nbdev project.
142
158
  nbdev_prepare Export, test, and clean notebooks, and render README if needed
143
159
  nbdev_preview Preview docs locally
@@ -147,12 +163,13 @@ available commands:
147
163
  nbdev_release_both Release both conda and PyPI packages
148
164
  nbdev_release_gh Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`
149
165
  nbdev_release_git Tag and create a release in GitHub for the current version
150
- nbdev_requirements Writes a `requirements.txt` file to `directory` based on settings.ini.
166
+ nbdev_requirements Writes a `requirements.txt` file to `directory` based on pyproject.toml.
151
167
  nbdev_sidebar Create sidebar.yml
152
168
  nbdev_test Test in parallel notebooks matching `path`, passing along `flags`
153
- nbdev_trust Trust notebooks matching `fname`
169
+ nbdev_trust Trust notebooks matching `fname`.
154
170
  nbdev_update Propagate change in modules matching `fname` to notebooks that created them
155
171
  nbdev_update_license Allows you to update the license of your project.
172
+ watch_export Use `nb_export` on ipynb files in `nbs` directory on changes using nbdev config if available
156
173
 
157
174
  ## FAQ
158
175
 
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
File without changes
File without changes
File without changes
File without changes
File without changes