nbdev 3.2.0__tar.gz → 3.2.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 (38) hide show
  1. {nbdev-3.2.0/nbdev.egg-info → nbdev-3.2.2}/PKG-INFO +35 -115
  2. {nbdev-3.2.0 → nbdev-3.2.2}/README.md +32 -112
  3. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/__init__.py +1 -1
  4. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/_modidx.py +8 -0
  5. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/diff.py +1 -1
  6. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/quarto.py +18 -5
  7. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/release.py +38 -14
  8. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/serve.py +10 -2
  9. {nbdev-3.2.0 → nbdev-3.2.2/nbdev.egg-info}/PKG-INFO +35 -115
  10. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev.egg-info/requires.txt +2 -2
  11. {nbdev-3.2.0 → nbdev-3.2.2}/pyproject.toml +2 -2
  12. {nbdev-3.2.0 → nbdev-3.2.2}/CONTRIBUTING.md +0 -0
  13. {nbdev-3.2.0 → nbdev-3.2.2}/LICENSE +0 -0
  14. {nbdev-3.2.0 → nbdev-3.2.2}/MANIFEST.in +0 -0
  15. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/clean.py +0 -0
  16. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/cli.py +0 -0
  17. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/config.py +0 -0
  18. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/doclinks.py +0 -0
  19. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/export.py +0 -0
  20. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/extract_attachments.py +0 -0
  21. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/frontmatter.py +0 -0
  22. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/imports.py +0 -0
  23. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/maker.py +0 -0
  24. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/merge.py +0 -0
  25. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/migrate.py +0 -0
  26. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/process.py +0 -0
  27. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/processors.py +0 -0
  28. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/qmd.py +0 -0
  29. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/scrubmagics.py +0 -0
  30. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/serve_drv.py +0 -0
  31. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/showdoc.py +0 -0
  32. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/sync.py +0 -0
  33. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev/test.py +0 -0
  34. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev.egg-info/SOURCES.txt +0 -0
  35. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev.egg-info/dependency_links.txt +0 -0
  36. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev.egg-info/entry_points.txt +0 -0
  37. {nbdev-3.2.0 → nbdev-3.2.2}/nbdev.egg-info/top_level.txt +0 -0
  38. {nbdev-3.2.0 → nbdev-3.2.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdev
3
- Version: 3.2.0
3
+ Version: 3.2.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
@@ -24,7 +24,7 @@ Requires-Dist: watchdog
24
24
  Requires-Dist: asttokens
25
25
  Requires-Dist: setuptools
26
26
  Requires-Dist: build
27
- Requires-Dist: fastgit
27
+ Requires-Dist: fastgit>=0.0.7
28
28
  Requires-Dist: pyyaml
29
29
  Requires-Dist: tomli; python_version < "3.11"
30
30
  Provides-Extra: dev
@@ -36,7 +36,7 @@ Requires-Dist: matplotlib; extra == "dev"
36
36
  Requires-Dist: black; extra == "dev"
37
37
  Requires-Dist: svg.py; extra == "dev"
38
38
  Requires-Dist: nbclassic; extra == "dev"
39
- Requires-Dist: pysymbol_llm; extra == "dev"
39
+ Requires-Dist: pysym2md>=0.0.6; extra == "dev"
40
40
  Requires-Dist: llms-txt; extra == "dev"
41
41
  Requires-Dist: sphinx; extra == "dev"
42
42
  Requires-Dist: plum-dispatch; extra == "dev"
@@ -51,55 +51,25 @@ Dynamic: license-file
51
51
 
52
52
  ## 🛑**Jan 2026 Major Version Update – Breaking Change**🛑
53
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 `nbdev-migrate-config` in your project
62
- root to automatically convert your `settings.ini` to `pyproject.toml`
63
- and update your GitHub Actions workflows to use nbdev3-compatible
64
- versions. Your existing notebooks and code don’t need any changes.
65
-
66
- `nbdev` is a notebook-driven development platform. Simply write
67
- notebooks with lightweight markup and get high-quality documentation,
68
- tests, continuous integration, and packaging for free!
69
-
70
- `nbdev` makes debugging and refactoring your code much easier than in
71
- traditional programming environments since you always have live objects
72
- at your fingertips. `nbdev` also promotes software engineering best
73
- practices because tests and documentation are first class.
74
-
75
- - **Documentation** is automatically generated using
76
- [Quarto](https://quarto.org/) and hosted on [GitHub
77
- Pages](https://pages.github.com/). Docs support LaTeX, are searchable,
78
- and are automatically hyperlinked (including out-of-the-box support
79
- for many packages via
80
- [`nbdev-index`](https://github.com/fastai/nbdev-index))
81
- - **Publish packages to PyPI and conda** as well as tools to simplify
82
- package releases. Python best practices are automatically followed,
83
- for example, only exported objects are included in `__all__`
84
- - **Two-way sync between notebooks and plaintext source code** allowing
85
- you to use your IDE for code navigation or quick edits. Sync is
86
- robust: each exported cell is tagged with its unique notebook cell ID,
87
- so `nbdev-update` always updates the correct cell
88
- - **Tests** written as ordinary notebook cells are run in parallel with
89
- a single command
90
- - **Continuous integration** out-of-the-box with [GitHub
91
- Actions](https://github.com/features/actions) that run your tests and
92
- rebuild your docs
93
- - **Git-friendly notebooks** with [Jupyter/Git
94
- hooks](https://nbdev.fast.ai/tutorials/git_friendly_jupyter.html) that
95
- clean unwanted metadata and render merge conflicts in a human-readable
96
- format
54
+ **nbdev3 is here!** As many of you have been requesting, configuration has moved from `settings.ini` to `pyproject.toml`, following modern Python packaging standards ([PEP 621](https://peps.python.org/pep-0621/)). Your project metadata now lives in the standard `[project]` section, while nbdev-specific settings go in `[tool.nbdev]`.
55
+
56
+ **Migrating from nbdev2:** Run `nbdev-migrate-config` in your project root to automatically convert your `settings.ini` to `pyproject.toml` and update your GitHub Actions workflows to use nbdev3-compatible versions. Your existing notebooks and code don’t need any changes.
57
+
58
+ `nbdev` is a notebook-driven development platform. Simply write notebooks with lightweight markup and get high-quality documentation, tests, continuous integration, and packaging for free!
59
+
60
+ `nbdev` makes debugging and refactoring your code much easier than in traditional programming environments since you always have live objects at your fingertips. `nbdev` also promotes software engineering best practices because tests and documentation are first class.
61
+
62
+ - **Documentation** is automatically generated using [Quarto](https://quarto.org/) and hosted on [GitHub Pages](https://pages.github.com/). Docs support LaTeX, are searchable, and are automatically hyperlinked (including out-of-the-box support for many packages via [`nbdev-index`](https://github.com/fastai/nbdev-index))
63
+ - **Publish packages to PyPI and conda** as well as tools to simplify package releases. Python best practices are automatically followed, for example, only exported objects are included in `__all__`
64
+ - **Two-way sync between notebooks and plaintext source code** allowing you to use your IDE for code navigation or quick edits. Sync is robust: each exported cell is tagged with its unique notebook cell ID, so `nbdev-update` always updates the correct cell
65
+ - **Tests** written as ordinary notebook cells are run in parallel with a single command
66
+ - **Continuous integration** out-of-the-box with [GitHub Actions](https://github.com/features/actions) that run your tests and rebuild your docs
67
+ - **Git-friendly notebooks** with [Jupyter/Git hooks](https://nbdev.fast.ai/tutorials/git_friendly_jupyter.html) that clean unwanted metadata and render merge conflicts in a human-readable format
97
68
  - … and much more!
98
69
 
99
70
  ## Install
100
71
 
101
- nbdev works on macOS, Linux, and most Unix-style operating systems. It
102
- works on Windows under WSL, but not under cmd or Powershell.
72
+ nbdev works on macOS, Linux, and most Unix-style operating systems. It works on Windows under WSL, but not under cmd or Powershell.
103
73
 
104
74
  You can install nbdev with pip:
105
75
 
@@ -107,27 +77,17 @@ You can install nbdev with pip:
107
77
  pip install nbdev
108
78
  ```
109
79
 
110
- Note that `nbdev` must be installed into the same Python environment
111
- that you use for both Jupyter and your project.
80
+ Note that `nbdev` must be installed into the same Python environment that you use for both Jupyter and your project.
112
81
 
113
82
  ## How to use nbdev
114
83
 
115
- The best way to learn how to use nbdev is to complete either the
116
- [written walkthrough](https://nbdev.fast.ai/tutorials/tutorial.html) or
117
- video walkthrough:
84
+ The best way to learn how to use nbdev is to complete either the [written walkthrough](https://nbdev.fast.ai/tutorials/tutorial.html) or video walkthrough:
118
85
 
119
- <a href="http://www.youtube.com/watch?v=l7zS8Ld4_iA" target="_blank"
120
- title="nbdev walkthrough"><img
121
- src="https://github.com/fastai/logos/raw/main/nbdev_walkthrough.png"
122
- style="border-radius: 10px" width="560" height="315" /></a>
86
+ <a href="http://www.youtube.com/watch?v=l7zS8Ld4_iA" target="_blank" title="nbdev walkthrough"><img src="https://github.com/fastai/logos/raw/main/nbdev_walkthrough.png" style="border-radius: 10px" width="560" height="315" /></a>
123
87
 
124
- Alternatively, there’s a [shortened version of the video
125
- walkthrough](https://youtu.be/67FdzLSt4aA) with coding sections sped up
126
- using the `unsilence` Python library – it’s 27 minutes faster, but a bit
127
- harder to follow.
88
+ Alternatively, there’s a [shortened version of the video walkthrough](https://youtu.be/67FdzLSt4aA) with coding sections sped up using the `unsilence` Python library – it’s 27 minutes faster, but a bit harder to follow.
128
89
 
129
- You can also run `nbdev-help` from the terminal to see the full list of
130
- available commands:
90
+ You can also run `nbdev-help` from the terminal to see the full list of available commands:
131
91
 
132
92
  ``` python
133
93
  !nbdev-help
@@ -172,45 +132,26 @@ available commands:
172
132
 
173
133
  ### Q: What is the warning “Found a cell containing mix of imports and computations. Please use separate cells”?
174
134
 
175
- A: You should not have cells that are not exported, *and* contain a mix
176
- of `import` statements along with other code. For instance, don’t do
177
- this in a single cell:
135
+ A: You should not have cells that are not exported, *and* contain a mix of `import` statements along with other code. For instance, don’t do this in a single cell:
178
136
 
179
137
  ``` python
180
138
  import some_module
181
139
  some_module.something()
182
140
  ```
183
141
 
184
- Instead, split this into two cells, one which does `import some_module`,
185
- and the other which does `some_module.something()`.
142
+ Instead, split this into two cells, one which does `import some_module`, and the other which does `some_module.something()`.
186
143
 
187
- Only top-level statements count: `try: import` blocks and imports inside
188
- function definitions are fine.
144
+ Only top-level statements count: `try: import` blocks and imports inside function definitions are fine.
189
145
 
190
- The reason for this is that when we create your documentation website,
191
- we ensure that all of the signatures for functions you document are up
192
- to date, by running the imports, exported cells, and
193
- [`show_doc`](https://nbdev.fast.ai/api/showdoc.html#show_doc) functions
194
- in your notebooks. When you mix imports with other code, that other code
195
- will be run too, which can cause errors (or at least slowdowns) when
196
- creating your website.
146
+ The reason for this is that when we create your documentation website, we ensure that all of the signatures for functions you document are up to date, by running the imports, exported cells, and [`show_doc`](https://nbdev.fast.ai/api/showdoc.html#show_doc) functions in your notebooks. When you mix imports with other code, that other code will be run too, which can cause errors (or at least slowdowns) when creating your website.
197
147
 
198
148
  ### Q: Why is nbdev asking for root access? How do I install Quarto without root access?
199
149
 
200
- A: When you setup your first project, nbdev will attempt to
201
- automatically download and install [Quarto](https://quarto.org/) for
202
- you. This is the program that we use to create your documentation
203
- website.
150
+ A: When you setup your first project, nbdev will attempt to automatically download and install [Quarto](https://quarto.org/) for you. This is the program that we use to create your documentation website.
204
151
 
205
- Quarto’s standard installation process requires root access, and nbdev
206
- will therefore ask for your root password during installation. For most
207
- people, this will work fine and everything will be handled automatically
208
- – if so, you can skip over the rest of this section, which talks about
209
- installing without root access.
152
+ Quarto’s standard installation process requires root access, and nbdev will therefore ask for your root password during installation. For most people, this will work fine and everything will be handled automatically – if so, you can skip over the rest of this section, which talks about installing without root access.
210
153
 
211
- If you need to install Quarto without root access on Linux, first `cd`
212
- to wherever you want to store it, then [download
213
- Quarto](https://quarto.org/docs/get-started/), and type:
154
+ If you need to install Quarto without root access on Linux, first `cd` to wherever you want to store it, then [download Quarto](https://quarto.org/docs/get-started/), and type:
214
155
 
215
156
  ``` bash
216
157
  dpkg -x quarto*.deb .
@@ -220,39 +161,18 @@ mkdir -p ~/.local/bin
220
161
  ln -s "$(pwd)"/quarto/bin/quarto ~/.local/bin
221
162
  ```
222
163
 
223
- To use this non-root version of Quarto, you’ll need `~/.local/bin` in
224
- your [`PATH` environment
225
- variable](https://linuxize.com/post/how-to-add-directory-to-path-in-linux/).
226
- (Alternatively, change the `ln -s` step to place the symlink somewhere
227
- else in your path.)
164
+ To use this non-root version of Quarto, you’ll need `~/.local/bin` in your [`PATH` environment variable](https://linuxize.com/post/how-to-add-directory-to-path-in-linux/). (Alternatively, change the `ln -s` step to place the symlink somewhere else in your path.)
228
165
 
229
166
  ### Q: Someone told me not to use notebooks for “serious” software development!
230
167
 
231
- A: [Watch this video](https://youtu.be/9Q6sLbz37gk). Don’t worry, we
232
- still get this too, despite having used `nbdev` for a wide range of
233
- “very serious” software projects over the last three years, including
234
- [deep learning libraries](https://github.com/fastai/fastai), [API
235
- clients](https://github.com/fastai/ghapi), [Python language
236
- extensions](https://github.com/fastai/fastcore), [terminal user
237
- interfaces](https://github.com/nat/ghtop), and more!
168
+ A: [Watch this video](https://youtu.be/9Q6sLbz37gk). Don’t worry, we still get this too, despite having used `nbdev` for a wide range of “very serious” software projects over the last three years, including [deep learning libraries](https://github.com/fastai/fastai), [API clients](https://github.com/fastai/ghapi), [Python language extensions](https://github.com/fastai/fastcore), [terminal user interfaces](https://github.com/nat/ghtop), and more!
238
169
 
239
170
  ## Contributing
240
171
 
241
- If you want to contribute to `nbdev`, be sure to review the
242
- [contributions
243
- guidelines](https://github.com/fastai/nbdev/blob/master/CONTRIBUTING.md).
244
- This project adheres to fastai’s [code of
245
- conduct](https://github.com/fastai/nbdev/blob/master/CODE_OF_CONDUCT.md).
246
- By participating, you are expected to uphold this code. In general, we
247
- strive to abide by generally accepted best practices in open-source
248
- software development.
172
+ If you want to contribute to `nbdev`, be sure to review the [contributions guidelines](https://github.com/fastai/nbdev/blob/master/CONTRIBUTING.md). This project adheres to fastai’s [code of conduct](https://github.com/fastai/nbdev/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. In general, we strive to abide by generally accepted best practices in open-source software development.
249
173
 
250
- Make sure you have `nbdev`’s git hooks installed by running
251
- `nbdev-install-hooks` in the cloned repository.
174
+ Make sure you have `nbdev`’s git hooks installed by running `nbdev-install-hooks` in the cloned repository.
252
175
 
253
176
  ## Copyright
254
177
 
255
- Copyright © 2019 onward fast.ai, Inc. Licensed under the Apache License,
256
- Version 2.0 (the “License”); you may not use this project’s files except
257
- in compliance with the License. A copy of the License is provided in the
258
- LICENSE file in this repository.
178
+ Copyright © 2019 onward fast.ai, Inc. Licensed under the Apache License, Version 2.0 (the “License”); you may not use this project’s files except in compliance with the License. A copy of the License is provided in the LICENSE file in this repository.
@@ -7,55 +7,25 @@
7
7
 
8
8
  ## 🛑**Jan 2026 Major Version Update – Breaking Change**🛑
9
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 `nbdev-migrate-config` in your project
18
- root to automatically convert your `settings.ini` to `pyproject.toml`
19
- and update your GitHub Actions workflows to use nbdev3-compatible
20
- versions. Your existing notebooks and code don’t need any changes.
21
-
22
- `nbdev` is a notebook-driven development platform. Simply write
23
- notebooks with lightweight markup and get high-quality documentation,
24
- tests, continuous integration, and packaging for free!
25
-
26
- `nbdev` makes debugging and refactoring your code much easier than in
27
- traditional programming environments since you always have live objects
28
- at your fingertips. `nbdev` also promotes software engineering best
29
- practices because tests and documentation are first class.
30
-
31
- - **Documentation** is automatically generated using
32
- [Quarto](https://quarto.org/) and hosted on [GitHub
33
- Pages](https://pages.github.com/). Docs support LaTeX, are searchable,
34
- and are automatically hyperlinked (including out-of-the-box support
35
- for many packages via
36
- [`nbdev-index`](https://github.com/fastai/nbdev-index))
37
- - **Publish packages to PyPI and conda** as well as tools to simplify
38
- package releases. Python best practices are automatically followed,
39
- for example, only exported objects are included in `__all__`
40
- - **Two-way sync between notebooks and plaintext source code** allowing
41
- you to use your IDE for code navigation or quick edits. Sync is
42
- robust: each exported cell is tagged with its unique notebook cell ID,
43
- so `nbdev-update` always updates the correct cell
44
- - **Tests** written as ordinary notebook cells are run in parallel with
45
- a single command
46
- - **Continuous integration** out-of-the-box with [GitHub
47
- Actions](https://github.com/features/actions) that run your tests and
48
- rebuild your docs
49
- - **Git-friendly notebooks** with [Jupyter/Git
50
- hooks](https://nbdev.fast.ai/tutorials/git_friendly_jupyter.html) that
51
- clean unwanted metadata and render merge conflicts in a human-readable
52
- format
10
+ **nbdev3 is here!** As many of you have been requesting, configuration has moved from `settings.ini` to `pyproject.toml`, following modern Python packaging standards ([PEP 621](https://peps.python.org/pep-0621/)). Your project metadata now lives in the standard `[project]` section, while nbdev-specific settings go in `[tool.nbdev]`.
11
+
12
+ **Migrating from nbdev2:** Run `nbdev-migrate-config` in your project root to automatically convert your `settings.ini` to `pyproject.toml` and update your GitHub Actions workflows to use nbdev3-compatible versions. Your existing notebooks and code don’t need any changes.
13
+
14
+ `nbdev` is a notebook-driven development platform. Simply write notebooks with lightweight markup and get high-quality documentation, tests, continuous integration, and packaging for free!
15
+
16
+ `nbdev` makes debugging and refactoring your code much easier than in traditional programming environments since you always have live objects at your fingertips. `nbdev` also promotes software engineering best practices because tests and documentation are first class.
17
+
18
+ - **Documentation** is automatically generated using [Quarto](https://quarto.org/) and hosted on [GitHub Pages](https://pages.github.com/). Docs support LaTeX, are searchable, and are automatically hyperlinked (including out-of-the-box support for many packages via [`nbdev-index`](https://github.com/fastai/nbdev-index))
19
+ - **Publish packages to PyPI and conda** as well as tools to simplify package releases. Python best practices are automatically followed, for example, only exported objects are included in `__all__`
20
+ - **Two-way sync between notebooks and plaintext source code** allowing you to use your IDE for code navigation or quick edits. Sync is robust: each exported cell is tagged with its unique notebook cell ID, so `nbdev-update` always updates the correct cell
21
+ - **Tests** written as ordinary notebook cells are run in parallel with a single command
22
+ - **Continuous integration** out-of-the-box with [GitHub Actions](https://github.com/features/actions) that run your tests and rebuild your docs
23
+ - **Git-friendly notebooks** with [Jupyter/Git hooks](https://nbdev.fast.ai/tutorials/git_friendly_jupyter.html) that clean unwanted metadata and render merge conflicts in a human-readable format
53
24
  - … and much more!
54
25
 
55
26
  ## Install
56
27
 
57
- nbdev works on macOS, Linux, and most Unix-style operating systems. It
58
- works on Windows under WSL, but not under cmd or Powershell.
28
+ nbdev works on macOS, Linux, and most Unix-style operating systems. It works on Windows under WSL, but not under cmd or Powershell.
59
29
 
60
30
  You can install nbdev with pip:
61
31
 
@@ -63,27 +33,17 @@ You can install nbdev with pip:
63
33
  pip install nbdev
64
34
  ```
65
35
 
66
- Note that `nbdev` must be installed into the same Python environment
67
- that you use for both Jupyter and your project.
36
+ Note that `nbdev` must be installed into the same Python environment that you use for both Jupyter and your project.
68
37
 
69
38
  ## How to use nbdev
70
39
 
71
- The best way to learn how to use nbdev is to complete either the
72
- [written walkthrough](https://nbdev.fast.ai/tutorials/tutorial.html) or
73
- video walkthrough:
40
+ The best way to learn how to use nbdev is to complete either the [written walkthrough](https://nbdev.fast.ai/tutorials/tutorial.html) or video walkthrough:
74
41
 
75
- <a href="http://www.youtube.com/watch?v=l7zS8Ld4_iA" target="_blank"
76
- title="nbdev walkthrough"><img
77
- src="https://github.com/fastai/logos/raw/main/nbdev_walkthrough.png"
78
- style="border-radius: 10px" width="560" height="315" /></a>
42
+ <a href="http://www.youtube.com/watch?v=l7zS8Ld4_iA" target="_blank" title="nbdev walkthrough"><img src="https://github.com/fastai/logos/raw/main/nbdev_walkthrough.png" style="border-radius: 10px" width="560" height="315" /></a>
79
43
 
80
- Alternatively, there’s a [shortened version of the video
81
- walkthrough](https://youtu.be/67FdzLSt4aA) with coding sections sped up
82
- using the `unsilence` Python library – it’s 27 minutes faster, but a bit
83
- harder to follow.
44
+ Alternatively, there’s a [shortened version of the video walkthrough](https://youtu.be/67FdzLSt4aA) with coding sections sped up using the `unsilence` Python library – it’s 27 minutes faster, but a bit harder to follow.
84
45
 
85
- You can also run `nbdev-help` from the terminal to see the full list of
86
- available commands:
46
+ You can also run `nbdev-help` from the terminal to see the full list of available commands:
87
47
 
88
48
  ``` python
89
49
  !nbdev-help
@@ -128,45 +88,26 @@ available commands:
128
88
 
129
89
  ### Q: What is the warning “Found a cell containing mix of imports and computations. Please use separate cells”?
130
90
 
131
- A: You should not have cells that are not exported, *and* contain a mix
132
- of `import` statements along with other code. For instance, don’t do
133
- this in a single cell:
91
+ A: You should not have cells that are not exported, *and* contain a mix of `import` statements along with other code. For instance, don’t do this in a single cell:
134
92
 
135
93
  ``` python
136
94
  import some_module
137
95
  some_module.something()
138
96
  ```
139
97
 
140
- Instead, split this into two cells, one which does `import some_module`,
141
- and the other which does `some_module.something()`.
98
+ Instead, split this into two cells, one which does `import some_module`, and the other which does `some_module.something()`.
142
99
 
143
- Only top-level statements count: `try: import` blocks and imports inside
144
- function definitions are fine.
100
+ Only top-level statements count: `try: import` blocks and imports inside function definitions are fine.
145
101
 
146
- The reason for this is that when we create your documentation website,
147
- we ensure that all of the signatures for functions you document are up
148
- to date, by running the imports, exported cells, and
149
- [`show_doc`](https://nbdev.fast.ai/api/showdoc.html#show_doc) functions
150
- in your notebooks. When you mix imports with other code, that other code
151
- will be run too, which can cause errors (or at least slowdowns) when
152
- creating your website.
102
+ The reason for this is that when we create your documentation website, we ensure that all of the signatures for functions you document are up to date, by running the imports, exported cells, and [`show_doc`](https://nbdev.fast.ai/api/showdoc.html#show_doc) functions in your notebooks. When you mix imports with other code, that other code will be run too, which can cause errors (or at least slowdowns) when creating your website.
153
103
 
154
104
  ### Q: Why is nbdev asking for root access? How do I install Quarto without root access?
155
105
 
156
- A: When you setup your first project, nbdev will attempt to
157
- automatically download and install [Quarto](https://quarto.org/) for
158
- you. This is the program that we use to create your documentation
159
- website.
106
+ A: When you setup your first project, nbdev will attempt to automatically download and install [Quarto](https://quarto.org/) for you. This is the program that we use to create your documentation website.
160
107
 
161
- Quarto’s standard installation process requires root access, and nbdev
162
- will therefore ask for your root password during installation. For most
163
- people, this will work fine and everything will be handled automatically
164
- – if so, you can skip over the rest of this section, which talks about
165
- installing without root access.
108
+ Quarto’s standard installation process requires root access, and nbdev will therefore ask for your root password during installation. For most people, this will work fine and everything will be handled automatically – if so, you can skip over the rest of this section, which talks about installing without root access.
166
109
 
167
- If you need to install Quarto without root access on Linux, first `cd`
168
- to wherever you want to store it, then [download
169
- Quarto](https://quarto.org/docs/get-started/), and type:
110
+ If you need to install Quarto without root access on Linux, first `cd` to wherever you want to store it, then [download Quarto](https://quarto.org/docs/get-started/), and type:
170
111
 
171
112
  ``` bash
172
113
  dpkg -x quarto*.deb .
@@ -176,39 +117,18 @@ mkdir -p ~/.local/bin
176
117
  ln -s "$(pwd)"/quarto/bin/quarto ~/.local/bin
177
118
  ```
178
119
 
179
- To use this non-root version of Quarto, you’ll need `~/.local/bin` in
180
- your [`PATH` environment
181
- variable](https://linuxize.com/post/how-to-add-directory-to-path-in-linux/).
182
- (Alternatively, change the `ln -s` step to place the symlink somewhere
183
- else in your path.)
120
+ To use this non-root version of Quarto, you’ll need `~/.local/bin` in your [`PATH` environment variable](https://linuxize.com/post/how-to-add-directory-to-path-in-linux/). (Alternatively, change the `ln -s` step to place the symlink somewhere else in your path.)
184
121
 
185
122
  ### Q: Someone told me not to use notebooks for “serious” software development!
186
123
 
187
- A: [Watch this video](https://youtu.be/9Q6sLbz37gk). Don’t worry, we
188
- still get this too, despite having used `nbdev` for a wide range of
189
- “very serious” software projects over the last three years, including
190
- [deep learning libraries](https://github.com/fastai/fastai), [API
191
- clients](https://github.com/fastai/ghapi), [Python language
192
- extensions](https://github.com/fastai/fastcore), [terminal user
193
- interfaces](https://github.com/nat/ghtop), and more!
124
+ A: [Watch this video](https://youtu.be/9Q6sLbz37gk). Don’t worry, we still get this too, despite having used `nbdev` for a wide range of “very serious” software projects over the last three years, including [deep learning libraries](https://github.com/fastai/fastai), [API clients](https://github.com/fastai/ghapi), [Python language extensions](https://github.com/fastai/fastcore), [terminal user interfaces](https://github.com/nat/ghtop), and more!
194
125
 
195
126
  ## Contributing
196
127
 
197
- If you want to contribute to `nbdev`, be sure to review the
198
- [contributions
199
- guidelines](https://github.com/fastai/nbdev/blob/master/CONTRIBUTING.md).
200
- This project adheres to fastai’s [code of
201
- conduct](https://github.com/fastai/nbdev/blob/master/CODE_OF_CONDUCT.md).
202
- By participating, you are expected to uphold this code. In general, we
203
- strive to abide by generally accepted best practices in open-source
204
- software development.
128
+ If you want to contribute to `nbdev`, be sure to review the [contributions guidelines](https://github.com/fastai/nbdev/blob/master/CONTRIBUTING.md). This project adheres to fastai’s [code of conduct](https://github.com/fastai/nbdev/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. In general, we strive to abide by generally accepted best practices in open-source software development.
205
129
 
206
- Make sure you have `nbdev`’s git hooks installed by running
207
- `nbdev-install-hooks` in the cloned repository.
130
+ Make sure you have `nbdev`’s git hooks installed by running `nbdev-install-hooks` in the cloned repository.
208
131
 
209
132
  ## Copyright
210
133
 
211
- Copyright © 2019 onward fast.ai, Inc. Licensed under the Apache License,
212
- Version 2.0 (the “License”); you may not use this project’s files except
213
- in compliance with the License. A copy of the License is provided in the
214
- LICENSE file in this repository.
134
+ Copyright © 2019 onward fast.ai, Inc. Licensed under the Apache License, Version 2.0 (the “License”); you may not use this project’s files except in compliance with the License. A copy of the License is provided in the LICENSE file in this repository.
@@ -1,4 +1,4 @@
1
- __version__ = "3.2.0"
1
+ __version__ = "3.2.2"
2
2
 
3
3
  from .doclinks import nbdev_export
4
4
  from .showdoc import show_doc
@@ -283,6 +283,7 @@ d = { 'settings': { 'branch': 'main',
283
283
  'nbdev.quarto._copytree': ('api/quarto.html#_copytree', 'nbdev/quarto.py'),
284
284
  'nbdev.quarto._doc_mtime_not_older': ('api/quarto.html#_doc_mtime_not_older', 'nbdev/quarto.py'),
285
285
  'nbdev.quarto._ensure_quarto': ('api/quarto.html#_ensure_quarto', 'nbdev/quarto.py'),
286
+ 'nbdev.quarto._fix_quarto_nav': ('api/quarto.html#_fix_quarto_nav', 'nbdev/quarto.py'),
286
287
  'nbdev.quarto._install_linux': ('api/quarto.html#_install_linux', 'nbdev/quarto.py'),
287
288
  'nbdev.quarto._install_mac': ('api/quarto.html#_install_mac', 'nbdev/quarto.py'),
288
289
  'nbdev.quarto._nbglob_docs': ('api/quarto.html#_nbglob_docs', 'nbdev/quarto.py'),
@@ -312,11 +313,17 @@ d = { 'settings': { 'branch': 'main',
312
313
  'nbdev.release.Release.changelog': ('api/release.html#release.changelog', 'nbdev/release.py'),
313
314
  'nbdev.release.Release.latest_notes': ('api/release.html#release.latest_notes', 'nbdev/release.py'),
314
315
  'nbdev.release.Release.release': ('api/release.html#release.release', 'nbdev/release.py'),
316
+ 'nbdev.release._check_changelog_base': ('api/release.html#_check_changelog_base', 'nbdev/release.py'),
315
317
  'nbdev.release._find_config': ('api/release.html#_find_config', 'nbdev/release.py'),
316
318
  'nbdev.release._get_conda_meta': ('api/release.html#_get_conda_meta', 'nbdev/release.py'),
319
+ 'nbdev.release._is_ancestor': ('api/release.html#_is_ancestor', 'nbdev/release.py'),
317
320
  'nbdev.release._issue_txt': ('api/release.html#_issue_txt', 'nbdev/release.py'),
318
321
  'nbdev.release._issues_txt': ('api/release.html#_issues_txt', 'nbdev/release.py'),
319
322
  'nbdev.release._load_json': ('api/release.html#_load_json', 'nbdev/release.py'),
323
+ 'nbdev.release._release_branch': ('api/release.html#_release_branch', 'nbdev/release.py'),
324
+ 'nbdev.release._release_head': ('api/release.html#_release_head', 'nbdev/release.py'),
325
+ 'nbdev.release._remote_shas': ('api/release.html#_remote_shas', 'nbdev/release.py'),
326
+ 'nbdev.release._require_release_branch': ('api/release.html#_require_release_branch', 'nbdev/release.py'),
320
327
  'nbdev.release._run': ('api/release.html#_run', 'nbdev/release.py'),
321
328
  'nbdev.release._write_yaml': ('api/release.html#_write_yaml', 'nbdev/release.py'),
322
329
  'nbdev.release.anaconda_upload': ('api/release.html#anaconda_upload', 'nbdev/release.py'),
@@ -338,6 +345,7 @@ d = { 'settings': { 'branch': 'main',
338
345
  'nbdev.release.write_requirements': ('api/release.html#write_requirements', 'nbdev/release.py')},
339
346
  'nbdev.scrubmagics': {},
340
347
  'nbdev.serve': { 'nbdev.serve._is_qpy': ('api/serve.html#_is_qpy', 'nbdev/serve.py'),
348
+ 'nbdev.serve._keep_file': ('api/serve.html#_keep_file', 'nbdev/serve.py'),
341
349
  'nbdev.serve._proc_file': ('api/serve.html#_proc_file', 'nbdev/serve.py'),
342
350
  'nbdev.serve.proc_nbs': ('api/serve.html#proc_nbs', 'nbdev/serve.py')},
343
351
  'nbdev.serve_drv': {},
@@ -25,7 +25,7 @@ def read_nb_from_git(
25
25
  path = Path(path)
26
26
  if path.is_absolute(): path = path.relative_to(g.top())
27
27
  if ref is None: return read_nb(g.top()/path)
28
- raw = g.show(f'{ref}:{path}', split=False)
28
+ raw = g.show(f'{ref}:{path}')
29
29
  return dict2nb(json.loads(raw))
30
30
 
31
31
  # %% ../nbs/api/19_diff.ipynb #3ac25702
@@ -174,6 +174,11 @@ website:
174
174
  description: "{description}"
175
175
  repo-branch: {branch}
176
176
  repo-url: "{git_url}"
177
+
178
+ format-links:
179
+ - html
180
+ - format: commonmark
181
+ text: Markdown
177
182
  """
178
183
 
179
184
  # %% ../nbs/api/14_quarto.ipynb #38124450
@@ -269,17 +274,18 @@ def _save_cached_readme(cache, cfg):
269
274
  def nbdev_readme(
270
275
  path:str=None, # Path to notebooks
271
276
  chk_time:bool=False): # Only build if out of date
272
- "Create README.md from readme_nb (index.ipynb by default)"
277
+ "Create README.md from readme_nb (index.ipynb by default). Skips if the file doesn't exist."
273
278
  cfg = get_config()
274
279
  path = Path(path) if path else cfg.nbs_path
280
+ if not (path/cfg.readme_nb).exists(): return
275
281
  _chk_nbdev_yml(path)
276
282
  if chk_time and _doc_mtime_not_older(cfg.config_path/'README.md', path/cfg.readme_nb): return
277
283
 
278
284
  with _SidebarYmlRemoved(path): # to avoid rendering whole website
279
- cache = proc_nbs(path)
285
+ cache = proc_nbs(path, file_glob=Path(cfg.readme_nb).name)
280
286
  for f in _readme_cands(cache, cfg):
281
287
  if f.exists(): f.unlink() # remove stale renders from either quarto layout
282
- _sprun(f'cd "{cache}" && quarto render "{cache/cfg.readme_nb}" -o README.md -t gfm --no-execute')
288
+ _sprun(f'cd "{cache}" && quarto render "{cache/cfg.readme_nb}" -o README.md -t gfm --no-execute -M wrap:preserve')
283
289
 
284
290
  _save_cached_readme(cache, cfg)
285
291
 
@@ -310,11 +316,17 @@ def nbdev_contributing(
310
316
  if chk_time and _doc_mtime_not_older(cfg.config_path / 'CONTRIBUTING.md' , contrib_nb_path): return
311
317
 
312
318
  with _SidebarYmlRemoved(path): # to avoid rendering whole website
313
- cache = proc_nbs(path)
314
- _sprun(f'cd "{cache}" && quarto render "{cache/contrib_nb_name}" -o CONTRIBUTING.md -t gfm --no-execute')
319
+ cache = proc_nbs(path, file_glob=Path(contrib_nb_name).name)
320
+ _sprun(f'cd "{cache}" && quarto render "{cache/contrib_nb_name}" -o CONTRIBUTING.md -t gfm --no-execute -M wrap:preserve')
315
321
 
316
322
  _save_cached_contributing(cache, cfg, contrib_nb_name)
317
323
 
324
+ # %% ../nbs/api/14_quarto.ipynb #8e1627d3
325
+ def _fix_quarto_nav(doc_path):
326
+ "Anchor quarto-nav.js's clean-URL regex, which otherwise breaks `index.html.md` alternate-format links (quarto-dev/quarto-cli#14667)"
327
+ p = Path(doc_path)/'site_libs/quarto-nav/quarto-nav.js'
328
+ if p.exists(): p.write_text(p.read_text().replace(r'.replace(/\/index\.html/, "/")', r'.replace(/\/index\.html(?=[?#]|$)/, "/")'))
329
+
318
330
  # %% ../nbs/api/14_quarto.ipynb #37d16049
319
331
  @call_parse
320
332
  @delegates(_nbglob_docs)
@@ -329,6 +341,7 @@ def nbdev_docs(
329
341
  _sprun(f'cd "{cache}" && quarto render --no-cache')
330
342
  shutil.rmtree(cfg.doc_path, ignore_errors=True)
331
343
  move(cache/cfg.doc_path.name, cfg.config_path)
344
+ _fix_quarto_nav(cfg.doc_path)
332
345
 
333
346
  # %% ../nbs/api/14_quarto.ipynb #23886f9c
334
347
  @call_parse
@@ -29,9 +29,7 @@ def _find_config(): return get_config()
29
29
  def _issue_txt(issue):
30
30
  res = '- {} ([#{}]({}))'.format(issue.title.strip(), issue.number, issue.html_url)
31
31
  if hasattr(issue, 'pull_request'): res += ', thanks to [@{}]({})'.format(issue.user.login, issue.user.html_url)
32
- res += '\n'
33
- if not issue.body: return res
34
- return res + f" - {issue.body.strip()}\n"
32
+ return res
35
33
 
36
34
  def _issues_txt(iss, label):
37
35
  if not iss: return ''
@@ -42,6 +40,25 @@ def _load_json(cfg, k):
42
40
  try: return json.loads(cfg[k])
43
41
  except json.JSONDecodeError as e: raise Exception(f"Key: `{k}` in .ini file is not a valid JSON string: {e}")
44
42
 
43
+ # %% ../nbs/api/18_release.ipynb #e5861010
44
+ def _require_release_branch(branch):
45
+ if not branch: raise SystemExit('Cannot release from detached HEAD; create a maintenance branch first')
46
+ return branch
47
+
48
+ def _release_branch(): return _require_release_branch(run('git branch --show-current').strip())
49
+ def _is_ancestor(ref): return subprocess.run(['git', 'merge-base', '--is-ancestor', ref, 'HEAD'], capture_output=True).returncode == 0
50
+ def _remote_shas(s): return {o.split()[0] for o in s.splitlines()}
51
+
52
+ def _check_changelog_base(tag):
53
+ if _is_ancestor(tag): return
54
+ raise SystemExit(f'HEAD does not contain the latest release ({tag}). Write CHANGELOG.md manually, then run with --no_changelog.')
55
+
56
+ def _release_head():
57
+ _release_branch()
58
+ head = run('git rev-parse HEAD').strip()
59
+ if head not in _remote_shas(run('git ls-remote --heads origin')): raise SystemExit(f'Release commit {head[:7]} is not on origin; push the current branch first')
60
+ return head
61
+
45
62
  # %% ../nbs/api/18_release.ipynb #dcaba486
46
63
  def update_changelog(txt, ver, notes, marker='<!-- do not remove -->\n'):
47
64
  "Insert `notes` into changelog `txt` after `marker`, replacing any existing section for `ver`"
@@ -82,12 +99,16 @@ async def changelog(self:Release,
82
99
  except APIError as e:
83
100
  if e.status_code != 404: raise
84
101
  lr,self.commit_date = None,'2000-01-01T00:00:004Z'
85
- if lr and (Version(self.cfg.version) <= Version(lr.tag_name)):
86
- print(f'Error: Version bump required: expected: >{lr.tag_name}, got: {self.cfg.version}.')
87
- raise SystemExit(1)
88
- res = f"\n## {self.cfg.version}\n"
102
+ if lr:
103
+ run('git fetch --tags --quiet')
104
+ _check_changelog_base(lr.tag_name)
105
+ if Version(self.cfg.version) <= Version(lr.tag_name):
106
+ print(f'Error: Version bump required: expected: >{lr.tag_name}, got: {self.cfg.version}.')
107
+ raise SystemExit(1)
108
+ res = f"\n## {self.cfg.version}\n\n"
89
109
  issues = await self._issue_groups()
90
- res += '\n'.join(_issues_txt(*o) for o in zip(issues, self.groups.values()))
110
+ sections = (_issues_txt(*o) for o in zip(issues, self.groups.values()))
111
+ res += '\n\n'.join(filter(None, sections))
91
112
  if debug: return res
92
113
  res = update_changelog(self.changefile.read_text(), self.cfg.version, res, marker)
93
114
  shutil.copy(self.changefile, self.changefile.with_suffix(".bak"))
@@ -100,7 +121,7 @@ async def release(self:Release):
100
121
  "Tag and create a release in GitHub for the current version"
101
122
  ver = self.cfg.version
102
123
  notes = self.latest_notes()
103
- await self.gh.create_release(ver, branch=self.cfg.branch, body=notes)
124
+ await self.gh.create_release(ver, branch=_release_head(), body=notes)
104
125
  return ver
105
126
 
106
127
  # %% ../nbs/api/18_release.ipynb #22101171
@@ -139,15 +160,18 @@ async def release_git(token:str=None):
139
160
  async def release_gh(
140
161
  token:str=None, # Optional GitHub token (otherwise `token` file is used)
141
162
  repo:str=None, # "repo" or "owner/repo" to use instead of pyproject.toml values
142
- no_changelog:store_true=False # Skip changelog creation (assumes CHANGELOG.md is up to date)
163
+ no_changelog:store_true=False, # Skip changelog creation (assumes CHANGELOG.md is up to date)
164
+ no_editor:store_true=False, # Skip opening CHANGELOG.md in an editor
165
+ yes:store_true=False # Release without asking for confirmation
143
166
  ):
144
- "Calls `nbdev-changelog`, lets you edit the result, then pushes to git and calls `nbdev-release-git`"
167
+ "Create the changelog, optionally edit it, then push and create the GitHub release"
145
168
  cfg = _find_config()
169
+ _release_branch()
146
170
  if not no_changelog: await Release(repo=repo).changelog()
147
- subprocess.run([os.environ.get('EDITOR','nano'), cfg.config_path/'CHANGELOG.md'])
148
- if not input("Make release now? (y/n) ").lower().startswith('y'): sys.exit(1)
171
+ if not no_editor: subprocess.run([os.environ.get('EDITOR','nano'), cfg.config_path/'CHANGELOG.md'])
172
+ if not yes and not input("Make release now? (y/n) ").lower().startswith('y'): sys.exit(1)
149
173
  run('git commit -am release')
150
- run('git push')
174
+ run('git push --set-upstream origin HEAD')
151
175
  print(f"Released {await push_release(token, repo=repo)}")
152
176
 
153
177
  # %% ../nbs/api/18_release.ipynb #5b4d4aa2
@@ -10,6 +10,7 @@ __all__ = ['proc_nbs']
10
10
  # %% ../nbs/api/17_serve.ipynb #6899a335
11
11
  import ast,subprocess,threading,sys
12
12
  from shutil import rmtree,copy2
13
+ from fnmatch import fnmatch
13
14
 
14
15
  from fastcore.utils import *
15
16
  from fastcore.parallel import parallel
@@ -53,20 +54,27 @@ def _proc_file(s, cache, path, mtime=None):
53
54
  if md is not None: return s,d,md.strip()
54
55
  else: copy2(s,d)
55
56
 
57
+ # %% ../nbs/api/17_serve.ipynb #eac159fb
58
+ def _keep_file(f:Path, file_glob='', file_re=''):
59
+ "Keep all non-notebook files; keep notebooks matching `file_glob` and `file_re` (empty patterns match all)"
60
+ if f.suffix!='.ipynb': return True
61
+ return (not file_glob or fnmatch(f.name, file_glob)) and (not file_re or bool(re.search(file_re, f.name)))
62
+
56
63
  # %% ../nbs/api/17_serve.ipynb #14463227
57
64
  @delegates(nbglob_cli)
58
65
  def proc_nbs(
59
66
  path:str='', # Path to notebooks
60
67
  n_workers:int=defaults.cpus, # Number of workers
61
68
  force:bool=False, # Ignore cache and build all
62
- file_glob:str='', # Only include files matching glob
63
- file_re:str='', # Only include files matching glob
69
+ file_glob:str='', # Only process notebooks matching glob (other files are always included)
70
+ file_re:str='', # Only process notebooks matching regex (other files are always included)
64
71
  **kwargs):
65
72
  "Process notebooks in `path` for docs rendering"
66
73
  cfg = get_config()
67
74
  cache = cfg.config_path/'_proc'
68
75
  path = Path(path or cfg.nbs_path)
69
76
  files = nbglob(path, func=Path, file_glob='', file_re='', **kwargs)
77
+ if file_glob or file_re: files = files.filter(_keep_file, file_glob=file_glob, file_re=file_re)
70
78
  if (path/'_quarto.yml').exists(): files.append(path/'_quarto.yml')
71
79
  if (path/'_brand.yml').exists(): files.append(path/'_brand.yml')
72
80
  if (path/'_extensions').exists(): files.extend(nbglob(path/'_extensions', func=Path, file_glob='', file_re='', skip_file_re='^[.]'))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdev
3
- Version: 3.2.0
3
+ Version: 3.2.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
@@ -24,7 +24,7 @@ Requires-Dist: watchdog
24
24
  Requires-Dist: asttokens
25
25
  Requires-Dist: setuptools
26
26
  Requires-Dist: build
27
- Requires-Dist: fastgit
27
+ Requires-Dist: fastgit>=0.0.7
28
28
  Requires-Dist: pyyaml
29
29
  Requires-Dist: tomli; python_version < "3.11"
30
30
  Provides-Extra: dev
@@ -36,7 +36,7 @@ Requires-Dist: matplotlib; extra == "dev"
36
36
  Requires-Dist: black; extra == "dev"
37
37
  Requires-Dist: svg.py; extra == "dev"
38
38
  Requires-Dist: nbclassic; extra == "dev"
39
- Requires-Dist: pysymbol_llm; extra == "dev"
39
+ Requires-Dist: pysym2md>=0.0.6; extra == "dev"
40
40
  Requires-Dist: llms-txt; extra == "dev"
41
41
  Requires-Dist: sphinx; extra == "dev"
42
42
  Requires-Dist: plum-dispatch; extra == "dev"
@@ -51,55 +51,25 @@ Dynamic: license-file
51
51
 
52
52
  ## 🛑**Jan 2026 Major Version Update – Breaking Change**🛑
53
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 `nbdev-migrate-config` in your project
62
- root to automatically convert your `settings.ini` to `pyproject.toml`
63
- and update your GitHub Actions workflows to use nbdev3-compatible
64
- versions. Your existing notebooks and code don’t need any changes.
65
-
66
- `nbdev` is a notebook-driven development platform. Simply write
67
- notebooks with lightweight markup and get high-quality documentation,
68
- tests, continuous integration, and packaging for free!
69
-
70
- `nbdev` makes debugging and refactoring your code much easier than in
71
- traditional programming environments since you always have live objects
72
- at your fingertips. `nbdev` also promotes software engineering best
73
- practices because tests and documentation are first class.
74
-
75
- - **Documentation** is automatically generated using
76
- [Quarto](https://quarto.org/) and hosted on [GitHub
77
- Pages](https://pages.github.com/). Docs support LaTeX, are searchable,
78
- and are automatically hyperlinked (including out-of-the-box support
79
- for many packages via
80
- [`nbdev-index`](https://github.com/fastai/nbdev-index))
81
- - **Publish packages to PyPI and conda** as well as tools to simplify
82
- package releases. Python best practices are automatically followed,
83
- for example, only exported objects are included in `__all__`
84
- - **Two-way sync between notebooks and plaintext source code** allowing
85
- you to use your IDE for code navigation or quick edits. Sync is
86
- robust: each exported cell is tagged with its unique notebook cell ID,
87
- so `nbdev-update` always updates the correct cell
88
- - **Tests** written as ordinary notebook cells are run in parallel with
89
- a single command
90
- - **Continuous integration** out-of-the-box with [GitHub
91
- Actions](https://github.com/features/actions) that run your tests and
92
- rebuild your docs
93
- - **Git-friendly notebooks** with [Jupyter/Git
94
- hooks](https://nbdev.fast.ai/tutorials/git_friendly_jupyter.html) that
95
- clean unwanted metadata and render merge conflicts in a human-readable
96
- format
54
+ **nbdev3 is here!** As many of you have been requesting, configuration has moved from `settings.ini` to `pyproject.toml`, following modern Python packaging standards ([PEP 621](https://peps.python.org/pep-0621/)). Your project metadata now lives in the standard `[project]` section, while nbdev-specific settings go in `[tool.nbdev]`.
55
+
56
+ **Migrating from nbdev2:** Run `nbdev-migrate-config` in your project root to automatically convert your `settings.ini` to `pyproject.toml` and update your GitHub Actions workflows to use nbdev3-compatible versions. Your existing notebooks and code don’t need any changes.
57
+
58
+ `nbdev` is a notebook-driven development platform. Simply write notebooks with lightweight markup and get high-quality documentation, tests, continuous integration, and packaging for free!
59
+
60
+ `nbdev` makes debugging and refactoring your code much easier than in traditional programming environments since you always have live objects at your fingertips. `nbdev` also promotes software engineering best practices because tests and documentation are first class.
61
+
62
+ - **Documentation** is automatically generated using [Quarto](https://quarto.org/) and hosted on [GitHub Pages](https://pages.github.com/). Docs support LaTeX, are searchable, and are automatically hyperlinked (including out-of-the-box support for many packages via [`nbdev-index`](https://github.com/fastai/nbdev-index))
63
+ - **Publish packages to PyPI and conda** as well as tools to simplify package releases. Python best practices are automatically followed, for example, only exported objects are included in `__all__`
64
+ - **Two-way sync between notebooks and plaintext source code** allowing you to use your IDE for code navigation or quick edits. Sync is robust: each exported cell is tagged with its unique notebook cell ID, so `nbdev-update` always updates the correct cell
65
+ - **Tests** written as ordinary notebook cells are run in parallel with a single command
66
+ - **Continuous integration** out-of-the-box with [GitHub Actions](https://github.com/features/actions) that run your tests and rebuild your docs
67
+ - **Git-friendly notebooks** with [Jupyter/Git hooks](https://nbdev.fast.ai/tutorials/git_friendly_jupyter.html) that clean unwanted metadata and render merge conflicts in a human-readable format
97
68
  - … and much more!
98
69
 
99
70
  ## Install
100
71
 
101
- nbdev works on macOS, Linux, and most Unix-style operating systems. It
102
- works on Windows under WSL, but not under cmd or Powershell.
72
+ nbdev works on macOS, Linux, and most Unix-style operating systems. It works on Windows under WSL, but not under cmd or Powershell.
103
73
 
104
74
  You can install nbdev with pip:
105
75
 
@@ -107,27 +77,17 @@ You can install nbdev with pip:
107
77
  pip install nbdev
108
78
  ```
109
79
 
110
- Note that `nbdev` must be installed into the same Python environment
111
- that you use for both Jupyter and your project.
80
+ Note that `nbdev` must be installed into the same Python environment that you use for both Jupyter and your project.
112
81
 
113
82
  ## How to use nbdev
114
83
 
115
- The best way to learn how to use nbdev is to complete either the
116
- [written walkthrough](https://nbdev.fast.ai/tutorials/tutorial.html) or
117
- video walkthrough:
84
+ The best way to learn how to use nbdev is to complete either the [written walkthrough](https://nbdev.fast.ai/tutorials/tutorial.html) or video walkthrough:
118
85
 
119
- <a href="http://www.youtube.com/watch?v=l7zS8Ld4_iA" target="_blank"
120
- title="nbdev walkthrough"><img
121
- src="https://github.com/fastai/logos/raw/main/nbdev_walkthrough.png"
122
- style="border-radius: 10px" width="560" height="315" /></a>
86
+ <a href="http://www.youtube.com/watch?v=l7zS8Ld4_iA" target="_blank" title="nbdev walkthrough"><img src="https://github.com/fastai/logos/raw/main/nbdev_walkthrough.png" style="border-radius: 10px" width="560" height="315" /></a>
123
87
 
124
- Alternatively, there’s a [shortened version of the video
125
- walkthrough](https://youtu.be/67FdzLSt4aA) with coding sections sped up
126
- using the `unsilence` Python library – it’s 27 minutes faster, but a bit
127
- harder to follow.
88
+ Alternatively, there’s a [shortened version of the video walkthrough](https://youtu.be/67FdzLSt4aA) with coding sections sped up using the `unsilence` Python library – it’s 27 minutes faster, but a bit harder to follow.
128
89
 
129
- You can also run `nbdev-help` from the terminal to see the full list of
130
- available commands:
90
+ You can also run `nbdev-help` from the terminal to see the full list of available commands:
131
91
 
132
92
  ``` python
133
93
  !nbdev-help
@@ -172,45 +132,26 @@ available commands:
172
132
 
173
133
  ### Q: What is the warning “Found a cell containing mix of imports and computations. Please use separate cells”?
174
134
 
175
- A: You should not have cells that are not exported, *and* contain a mix
176
- of `import` statements along with other code. For instance, don’t do
177
- this in a single cell:
135
+ A: You should not have cells that are not exported, *and* contain a mix of `import` statements along with other code. For instance, don’t do this in a single cell:
178
136
 
179
137
  ``` python
180
138
  import some_module
181
139
  some_module.something()
182
140
  ```
183
141
 
184
- Instead, split this into two cells, one which does `import some_module`,
185
- and the other which does `some_module.something()`.
142
+ Instead, split this into two cells, one which does `import some_module`, and the other which does `some_module.something()`.
186
143
 
187
- Only top-level statements count: `try: import` blocks and imports inside
188
- function definitions are fine.
144
+ Only top-level statements count: `try: import` blocks and imports inside function definitions are fine.
189
145
 
190
- The reason for this is that when we create your documentation website,
191
- we ensure that all of the signatures for functions you document are up
192
- to date, by running the imports, exported cells, and
193
- [`show_doc`](https://nbdev.fast.ai/api/showdoc.html#show_doc) functions
194
- in your notebooks. When you mix imports with other code, that other code
195
- will be run too, which can cause errors (or at least slowdowns) when
196
- creating your website.
146
+ The reason for this is that when we create your documentation website, we ensure that all of the signatures for functions you document are up to date, by running the imports, exported cells, and [`show_doc`](https://nbdev.fast.ai/api/showdoc.html#show_doc) functions in your notebooks. When you mix imports with other code, that other code will be run too, which can cause errors (or at least slowdowns) when creating your website.
197
147
 
198
148
  ### Q: Why is nbdev asking for root access? How do I install Quarto without root access?
199
149
 
200
- A: When you setup your first project, nbdev will attempt to
201
- automatically download and install [Quarto](https://quarto.org/) for
202
- you. This is the program that we use to create your documentation
203
- website.
150
+ A: When you setup your first project, nbdev will attempt to automatically download and install [Quarto](https://quarto.org/) for you. This is the program that we use to create your documentation website.
204
151
 
205
- Quarto’s standard installation process requires root access, and nbdev
206
- will therefore ask for your root password during installation. For most
207
- people, this will work fine and everything will be handled automatically
208
- – if so, you can skip over the rest of this section, which talks about
209
- installing without root access.
152
+ Quarto’s standard installation process requires root access, and nbdev will therefore ask for your root password during installation. For most people, this will work fine and everything will be handled automatically – if so, you can skip over the rest of this section, which talks about installing without root access.
210
153
 
211
- If you need to install Quarto without root access on Linux, first `cd`
212
- to wherever you want to store it, then [download
213
- Quarto](https://quarto.org/docs/get-started/), and type:
154
+ If you need to install Quarto without root access on Linux, first `cd` to wherever you want to store it, then [download Quarto](https://quarto.org/docs/get-started/), and type:
214
155
 
215
156
  ``` bash
216
157
  dpkg -x quarto*.deb .
@@ -220,39 +161,18 @@ mkdir -p ~/.local/bin
220
161
  ln -s "$(pwd)"/quarto/bin/quarto ~/.local/bin
221
162
  ```
222
163
 
223
- To use this non-root version of Quarto, you’ll need `~/.local/bin` in
224
- your [`PATH` environment
225
- variable](https://linuxize.com/post/how-to-add-directory-to-path-in-linux/).
226
- (Alternatively, change the `ln -s` step to place the symlink somewhere
227
- else in your path.)
164
+ To use this non-root version of Quarto, you’ll need `~/.local/bin` in your [`PATH` environment variable](https://linuxize.com/post/how-to-add-directory-to-path-in-linux/). (Alternatively, change the `ln -s` step to place the symlink somewhere else in your path.)
228
165
 
229
166
  ### Q: Someone told me not to use notebooks for “serious” software development!
230
167
 
231
- A: [Watch this video](https://youtu.be/9Q6sLbz37gk). Don’t worry, we
232
- still get this too, despite having used `nbdev` for a wide range of
233
- “very serious” software projects over the last three years, including
234
- [deep learning libraries](https://github.com/fastai/fastai), [API
235
- clients](https://github.com/fastai/ghapi), [Python language
236
- extensions](https://github.com/fastai/fastcore), [terminal user
237
- interfaces](https://github.com/nat/ghtop), and more!
168
+ A: [Watch this video](https://youtu.be/9Q6sLbz37gk). Don’t worry, we still get this too, despite having used `nbdev` for a wide range of “very serious” software projects over the last three years, including [deep learning libraries](https://github.com/fastai/fastai), [API clients](https://github.com/fastai/ghapi), [Python language extensions](https://github.com/fastai/fastcore), [terminal user interfaces](https://github.com/nat/ghtop), and more!
238
169
 
239
170
  ## Contributing
240
171
 
241
- If you want to contribute to `nbdev`, be sure to review the
242
- [contributions
243
- guidelines](https://github.com/fastai/nbdev/blob/master/CONTRIBUTING.md).
244
- This project adheres to fastai’s [code of
245
- conduct](https://github.com/fastai/nbdev/blob/master/CODE_OF_CONDUCT.md).
246
- By participating, you are expected to uphold this code. In general, we
247
- strive to abide by generally accepted best practices in open-source
248
- software development.
172
+ If you want to contribute to `nbdev`, be sure to review the [contributions guidelines](https://github.com/fastai/nbdev/blob/master/CONTRIBUTING.md). This project adheres to fastai’s [code of conduct](https://github.com/fastai/nbdev/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. In general, we strive to abide by generally accepted best practices in open-source software development.
249
173
 
250
- Make sure you have `nbdev`’s git hooks installed by running
251
- `nbdev-install-hooks` in the cloned repository.
174
+ Make sure you have `nbdev`’s git hooks installed by running `nbdev-install-hooks` in the cloned repository.
252
175
 
253
176
  ## Copyright
254
177
 
255
- Copyright © 2019 onward fast.ai, Inc. Licensed under the Apache License,
256
- Version 2.0 (the “License”); you may not use this project’s files except
257
- in compliance with the License. A copy of the License is provided in the
258
- LICENSE file in this repository.
178
+ Copyright © 2019 onward fast.ai, Inc. Licensed under the Apache License, Version 2.0 (the “License”); you may not use this project’s files except in compliance with the License. A copy of the License is provided in the LICENSE file in this repository.
@@ -6,7 +6,7 @@ watchdog
6
6
  asttokens
7
7
  setuptools
8
8
  build
9
- fastgit
9
+ fastgit>=0.0.7
10
10
  pyyaml
11
11
 
12
12
  [:python_version < "3.11"]
@@ -21,7 +21,7 @@ matplotlib
21
21
  black
22
22
  svg.py
23
23
  nbclassic
24
- pysymbol_llm
24
+ pysym2md>=0.0.6
25
25
  llms-txt
26
26
  sphinx
27
27
  plum-dispatch
@@ -20,11 +20,11 @@ classifiers = [
20
20
  ]
21
21
  dynamic = ["version"]
22
22
  dependencies = [ "fastcore>=1.14.6", "execnb>=0.2.4", "astunparse", "ghapi>=2.0.0", "watchdog", "asttokens",
23
- "setuptools", "build", "fastgit", "pyyaml", "tomli; python_version < '3.11'", ]
23
+ "setuptools", "build", "fastgit>=0.0.7", "pyyaml", "tomli; python_version < '3.11'", ]
24
24
 
25
25
  [project.optional-dependencies]
26
26
  dev = [ "ipywidgets", "nbdev-numpy", "nbdev-stdlib", "pandas", "matplotlib", "black", "svg.py", "nbclassic",
27
- "pysymbol_llm", "llms-txt", "sphinx", "plum-dispatch", ]
27
+ "pysym2md>=0.0.6", "llms-txt", "sphinx", "plum-dispatch", ]
28
28
 
29
29
  [project.urls]
30
30
  Repository = "https://github.com/AnswerDotAI/nbdev"
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