nbdev 3.0.8__tar.gz → 3.0.10__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.0.8/nbdev.egg-info → nbdev-3.0.10}/PKG-INFO +43 -47
  2. {nbdev-3.0.8 → nbdev-3.0.10}/README.md +42 -46
  3. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/__init__.py +1 -1
  4. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/cli.py +3 -3
  5. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/config.py +3 -3
  6. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/doclinks.py +2 -2
  7. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/export.py +1 -1
  8. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/quarto.py +1 -1
  9. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/release.py +1 -1
  10. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/sync.py +1 -1
  11. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/test.py +5 -3
  12. {nbdev-3.0.8 → nbdev-3.0.10/nbdev.egg-info}/PKG-INFO +43 -47
  13. {nbdev-3.0.8 → nbdev-3.0.10}/CONTRIBUTING.md +0 -0
  14. {nbdev-3.0.8 → nbdev-3.0.10}/LICENSE +0 -0
  15. {nbdev-3.0.8 → nbdev-3.0.10}/MANIFEST.in +0 -0
  16. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/_modidx.py +0 -0
  17. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/clean.py +0 -0
  18. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/diff.py +0 -0
  19. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/extract_attachments.py +0 -0
  20. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/frontmatter.py +0 -0
  21. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/imports.py +0 -0
  22. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/maker.py +0 -0
  23. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/merge.py +0 -0
  24. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/migrate.py +0 -0
  25. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/process.py +0 -0
  26. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/processors.py +0 -0
  27. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/qmd.py +0 -0
  28. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/scrubmagics.py +0 -0
  29. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/serve.py +0 -0
  30. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/serve_drv.py +0 -0
  31. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev/showdoc.py +0 -0
  32. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev.egg-info/SOURCES.txt +0 -0
  33. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev.egg-info/dependency_links.txt +0 -0
  34. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev.egg-info/entry_points.txt +0 -0
  35. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev.egg-info/requires.txt +0 -0
  36. {nbdev-3.0.8 → nbdev-3.0.10}/nbdev.egg-info/top_level.txt +0 -0
  37. {nbdev-3.0.8 → nbdev-3.0.10}/pyproject.toml +0 -0
  38. {nbdev-3.0.8 → nbdev-3.0.10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdev
3
- Version: 3.0.8
3
+ Version: 3.0.10
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
@@ -58,12 +58,10 @@ Python packaging standards ([PEP
58
58
  lives in the standard `[project]` section, while nbdev-specific settings
59
59
  go in `[tool.nbdev]`.
60
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.
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.
67
65
 
68
66
  `nbdev` is a notebook-driven development platform. Simply write
69
67
  notebooks with lightweight markup and get high-quality documentation,
@@ -86,8 +84,7 @@ practices because tests and documentation are first class.
86
84
  - **Two-way sync between notebooks and plaintext source code** allowing
87
85
  you to use your IDE for code navigation or quick edits. Sync is
88
86
  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
87
+ so `nbdev-update` always updates the correct cell
91
88
  - **Tests** written as ordinary notebook cells are run in parallel with
92
89
  a single command
93
90
  - **Continuous integration** out-of-the-box with [GitHub
@@ -129,47 +126,47 @@ walkthrough](https://youtu.be/67FdzLSt4aA) with coding sections sped up
129
126
  using the `unsilence` Python library – it’s 27 minutes faster, but a bit
130
127
  harder to follow.
131
128
 
132
- You can also run `nbdev_help` from the terminal to see the full list of
129
+ You can also run `nbdev-help` from the terminal to see the full list of
133
130
  available commands:
134
131
 
135
132
  ``` python
136
- !nbdev_help
133
+ !nbdev-help
137
134
  ```
138
135
 
139
- nb_export Export a single nbdev notebook to a python script.
140
- nbdev_bump_version Increment version in __init__.py by one
141
- nbdev_changelog Create a CHANGELOG.md file from closed and labeled GitHub issues
142
- nbdev_clean Clean all notebooks in `fname` to avoid merge conflicts
143
- nbdev_conda Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it
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.
146
- nbdev_docs Create Quarto docs and README.md
147
- nbdev_export Export notebooks in `path` to Python modules
148
- nbdev_filter A notebook filter for Quarto
149
- nbdev_fix Create working notebook from conflicted notebook `nbname`
150
- nbdev_help Show help for all console scripts
151
- nbdev_install Install Quarto and the current library
152
- nbdev_install_hooks Install Jupyter and git hooks to automatically clean, trust, and fix merge conflicts in notebooks
153
- nbdev_install_quarto Install latest Quarto on macOS or Linux, prints instructions for Windows
154
- nbdev_merge Git merge driver for notebooks
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
157
- nbdev_new Create an nbdev project.
158
- nbdev_prepare Export, test, and clean notebooks, and render README if needed
159
- nbdev_preview Preview docs locally
160
- nbdev_proc_nbs Process notebooks in `path` for docs rendering
161
- nbdev_pypi Create and upload Python package to PyPI
162
- nbdev_readme Create README.md from readme_nb (index.ipynb by default)
163
- nbdev_release_both Release both conda and PyPI packages
164
- nbdev_release_gh Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`
165
- nbdev_release_git Tag and create a release in GitHub for the current version
166
- nbdev_requirements Writes a `requirements.txt` file to `directory` based on pyproject.toml.
167
- nbdev_sidebar Create sidebar.yml
168
- nbdev_test Test in parallel notebooks matching `path`, passing along `flags`
169
- nbdev_trust Trust notebooks matching `fname`.
170
- nbdev_update Propagate change in modules matching `fname` to notebooks that created them
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
136
+ nb-export Export a single nbdev notebook to a python script.
137
+ nbdev-bump-version Increment version in __init__.py by one
138
+ nbdev-changelog Create a CHANGELOG.md file from closed and labeled GitHub issues
139
+ nbdev-clean Clean all notebooks in `fname` to avoid merge conflicts
140
+ nbdev-conda Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it
141
+ nbdev-contributing Create CONTRIBUTING.md from contributing_nb (defaults to 'contributing.ipynb' if present). Skips if the file doesn't exist.
142
+ nbdev-create-config Create a pyproject.toml config file.
143
+ nbdev-docs Create Quarto docs and README.md
144
+ nbdev-export Export notebooks in `path` to Python modules
145
+ nbdev-filter A notebook filter for Quarto
146
+ nbdev-fix Create working notebook from conflicted notebook `nbname`
147
+ nbdev-help Show help for all console scripts
148
+ nbdev-install Install Quarto and the current library
149
+ nbdev-install-hooks Install Jupyter and git hooks to automatically clean, trust, and fix merge conflicts in notebooks
150
+ nbdev-install-quarto Install latest Quarto on macOS or Linux, prints instructions for Windows
151
+ nbdev-merge Git merge driver for notebooks
152
+ nbdev-migrate Convert all markdown and notebook files in `path` from v1 to v2
153
+ nbdev-migrate-config Migrate settings.ini to pyproject.toml
154
+ nbdev-new Create an nbdev project.
155
+ nbdev-prepare Export, test, and clean notebooks, and render README if needed
156
+ nbdev-preview Preview docs locally
157
+ nbdev-proc-nbs Process notebooks in `path` for docs rendering
158
+ nbdev-pypi Create and upload Python package to PyPI
159
+ nbdev-readme Create README.md from readme_nb (index.ipynb by default)
160
+ nbdev-release-both Release both conda and PyPI packages
161
+ nbdev-release-gh Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`
162
+ nbdev-release-git Tag and create a release in GitHub for the current version
163
+ nbdev-requirements Writes a `requirements.txt` file to `directory` based on pyproject.toml.
164
+ nbdev-sidebar Create sidebar.yml
165
+ nbdev-test Test in parallel notebooks matching `path`, passing along `flags`
166
+ nbdev-trust Trust notebooks matching `fname`.
167
+ nbdev-update Propagate change in modules matching `fname` to notebooks that created them
168
+ nbdev-update-license Allows you to update the license of your project.
169
+ watch-export Use `nb_export` on ipynb files in `nbs` directory on changes using nbdev config if available
173
170
 
174
171
  ## FAQ
175
172
 
@@ -248,8 +245,7 @@ strive to abide by generally accepted best practices in open-source
248
245
  software development.
249
246
 
250
247
  Make sure you have `nbdev`’s git hooks installed by running
251
- [`nbdev_install_hooks`](https://nbdev.fast.ai/api/clean.html#nbdev_install_hooks)
252
- in the cloned repository.
248
+ `nbdev-install-hooks` in the cloned repository.
253
249
 
254
250
  ## Copyright
255
251
 
@@ -14,12 +14,10 @@ Python packaging standards ([PEP
14
14
  lives in the standard `[project]` section, while nbdev-specific settings
15
15
  go in `[tool.nbdev]`.
16
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.
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.
23
21
 
24
22
  `nbdev` is a notebook-driven development platform. Simply write
25
23
  notebooks with lightweight markup and get high-quality documentation,
@@ -42,8 +40,7 @@ practices because tests and documentation are first class.
42
40
  - **Two-way sync between notebooks and plaintext source code** allowing
43
41
  you to use your IDE for code navigation or quick edits. Sync is
44
42
  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
43
+ so `nbdev-update` always updates the correct cell
47
44
  - **Tests** written as ordinary notebook cells are run in parallel with
48
45
  a single command
49
46
  - **Continuous integration** out-of-the-box with [GitHub
@@ -85,47 +82,47 @@ walkthrough](https://youtu.be/67FdzLSt4aA) with coding sections sped up
85
82
  using the `unsilence` Python library – it’s 27 minutes faster, but a bit
86
83
  harder to follow.
87
84
 
88
- You can also run `nbdev_help` from the terminal to see the full list of
85
+ You can also run `nbdev-help` from the terminal to see the full list of
89
86
  available commands:
90
87
 
91
88
  ``` python
92
- !nbdev_help
89
+ !nbdev-help
93
90
  ```
94
91
 
95
- nb_export Export a single nbdev notebook to a python script.
96
- nbdev_bump_version Increment version in __init__.py by one
97
- nbdev_changelog Create a CHANGELOG.md file from closed and labeled GitHub issues
98
- nbdev_clean Clean all notebooks in `fname` to avoid merge conflicts
99
- nbdev_conda Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it
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.
102
- nbdev_docs Create Quarto docs and README.md
103
- nbdev_export Export notebooks in `path` to Python modules
104
- nbdev_filter A notebook filter for Quarto
105
- nbdev_fix Create working notebook from conflicted notebook `nbname`
106
- nbdev_help Show help for all console scripts
107
- nbdev_install Install Quarto and the current library
108
- nbdev_install_hooks Install Jupyter and git hooks to automatically clean, trust, and fix merge conflicts in notebooks
109
- nbdev_install_quarto Install latest Quarto on macOS or Linux, prints instructions for Windows
110
- nbdev_merge Git merge driver for notebooks
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
113
- nbdev_new Create an nbdev project.
114
- nbdev_prepare Export, test, and clean notebooks, and render README if needed
115
- nbdev_preview Preview docs locally
116
- nbdev_proc_nbs Process notebooks in `path` for docs rendering
117
- nbdev_pypi Create and upload Python package to PyPI
118
- nbdev_readme Create README.md from readme_nb (index.ipynb by default)
119
- nbdev_release_both Release both conda and PyPI packages
120
- nbdev_release_gh Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`
121
- nbdev_release_git Tag and create a release in GitHub for the current version
122
- nbdev_requirements Writes a `requirements.txt` file to `directory` based on pyproject.toml.
123
- nbdev_sidebar Create sidebar.yml
124
- nbdev_test Test in parallel notebooks matching `path`, passing along `flags`
125
- nbdev_trust Trust notebooks matching `fname`.
126
- nbdev_update Propagate change in modules matching `fname` to notebooks that created them
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
92
+ nb-export Export a single nbdev notebook to a python script.
93
+ nbdev-bump-version Increment version in __init__.py by one
94
+ nbdev-changelog Create a CHANGELOG.md file from closed and labeled GitHub issues
95
+ nbdev-clean Clean all notebooks in `fname` to avoid merge conflicts
96
+ nbdev-conda Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it
97
+ nbdev-contributing Create CONTRIBUTING.md from contributing_nb (defaults to 'contributing.ipynb' if present). Skips if the file doesn't exist.
98
+ nbdev-create-config Create a pyproject.toml config file.
99
+ nbdev-docs Create Quarto docs and README.md
100
+ nbdev-export Export notebooks in `path` to Python modules
101
+ nbdev-filter A notebook filter for Quarto
102
+ nbdev-fix Create working notebook from conflicted notebook `nbname`
103
+ nbdev-help Show help for all console scripts
104
+ nbdev-install Install Quarto and the current library
105
+ nbdev-install-hooks Install Jupyter and git hooks to automatically clean, trust, and fix merge conflicts in notebooks
106
+ nbdev-install-quarto Install latest Quarto on macOS or Linux, prints instructions for Windows
107
+ nbdev-merge Git merge driver for notebooks
108
+ nbdev-migrate Convert all markdown and notebook files in `path` from v1 to v2
109
+ nbdev-migrate-config Migrate settings.ini to pyproject.toml
110
+ nbdev-new Create an nbdev project.
111
+ nbdev-prepare Export, test, and clean notebooks, and render README if needed
112
+ nbdev-preview Preview docs locally
113
+ nbdev-proc-nbs Process notebooks in `path` for docs rendering
114
+ nbdev-pypi Create and upload Python package to PyPI
115
+ nbdev-readme Create README.md from readme_nb (index.ipynb by default)
116
+ nbdev-release-both Release both conda and PyPI packages
117
+ nbdev-release-gh Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`
118
+ nbdev-release-git Tag and create a release in GitHub for the current version
119
+ nbdev-requirements Writes a `requirements.txt` file to `directory` based on pyproject.toml.
120
+ nbdev-sidebar Create sidebar.yml
121
+ nbdev-test Test in parallel notebooks matching `path`, passing along `flags`
122
+ nbdev-trust Trust notebooks matching `fname`.
123
+ nbdev-update Propagate change in modules matching `fname` to notebooks that created them
124
+ nbdev-update-license Allows you to update the license of your project.
125
+ watch-export Use `nb_export` on ipynb files in `nbs` directory on changes using nbdev config if available
129
126
 
130
127
  ## FAQ
131
128
 
@@ -204,8 +201,7 @@ strive to abide by generally accepted best practices in open-source
204
201
  software development.
205
202
 
206
203
  Make sure you have `nbdev`’s git hooks installed by running
207
- [`nbdev_install_hooks`](https://nbdev.fast.ai/api/clean.html#nbdev_install_hooks)
208
- in the cloned repository.
204
+ `nbdev-install-hooks` in the cloned repository.
209
205
 
210
206
  ## Copyright
211
207
 
@@ -1,4 +1,4 @@
1
- __version__ = "3.0.8"
1
+ __version__ = "3.0.10"
2
2
 
3
3
  from .doclinks import nbdev_export
4
4
  from .showdoc import show_doc
@@ -184,16 +184,16 @@ def watch_export(nbs:str=None, # Nb directory to watch for changes
184
184
  lib = lib or (cfg.lib_path if cfg else '.')
185
185
  if cfg and (nbs != cfg.nbs_path or lib != cfg.lib_path) and not force:
186
186
  raise ValueError("In nbdev project. Use --force to override config.")
187
- run(f'nbdev_export')
187
+ run('nbdev-export')
188
188
  def _export(e,lib=lib):
189
189
  p = e.src_path
190
190
  if (not '.ipynb_checkpoints' in p and p.endswith('.ipynb') and not Path(p).name.startswith(('tmp','.~'))):
191
191
  if e.event_type == 'modified':
192
192
  time.sleep(0.1)
193
- try: run(f'nb_export --lib_path {lib} "{p}"')
193
+ try: run(f'nb-export --lib_path {lib} "{p}"')
194
194
  except IOError:
195
195
  time.sleep(0.3)
196
- run(f'nb_export --lib_path {lib} "{p}"')
196
+ run(f'nb-export --lib_path {lib} "{p}"')
197
197
  with fs_watchdog(_export, nbs):
198
198
  while True: time.sleep(1)
199
199
 
@@ -152,7 +152,7 @@ def _load_toml(p):
152
152
 
153
153
  def _has_nbdev(p):
154
154
  "True if pyproject.toml at `p` has [tool.nbdev]"
155
- try: return bool(_load_toml(p).get('tool', {}).get('nbdev', {}))
155
+ try: return _load_toml(p).get('tool', {}).get('nbdev') is not None
156
156
  except Exception: return False
157
157
 
158
158
  def _find_nbdev_pyproject(path=None):
@@ -163,11 +163,11 @@ def _find_nbdev_pyproject(path=None):
163
163
  if f.exists() and _has_nbdev(f): return f
164
164
  for d in [p] + list(p.parents):
165
165
  if (d/'settings.ini').exists():
166
- raise ValueError(f"Found old settings.ini. Migrate to pyproject.toml using `nbdev_migrate_config`. See https://nbdev.fast.ai/getting_started.html")
166
+ raise ValueError(f"Found old settings.ini. Migrate to pyproject.toml using `nbdev-migrate-config`. See https://nbdev.fast.ai/getting_started.html")
167
167
 
168
168
  # %% ../nbs/api/01_config.ipynb #3dac70e0
169
169
  nbdev_defaults = dict(nbs_path='nbs', doc_path='_docs', tst_flags='notest', recursive=True, readme_nb='index.ipynb',
170
- clean_ids=True, clear_all=False, put_version_in_init=True, jupyter_hooks=False, branch='main',
170
+ clean_ids=True, clear_all=False, put_version_in_init=True, jupyter_hooks=False, custom_sidebar=False, branch='main',
171
171
  doc_procs=[], export_procs=[])
172
172
 
173
173
  _path_keys = 'lib_path', 'nbs_path', 'doc_path'
@@ -64,7 +64,7 @@ def _iter_py_cells(p):
64
64
  nb = ' '.join(parts[:-1])
65
65
  else:
66
66
  raise ValueError(f"Cell ID required but not found in '{p}' at:\n```\n# %% {top}\n```\n"
67
- "Run `nbdev_export` to regenerate .py files with cell IDs.")
67
+ "Run `nbdev-export` to regenerate .py files with cell IDs.")
68
68
  if nb=='auto': continue # Skip auto-generated __all__ cell
69
69
  nb_path = (p.parent/nb).resolve() # NB paths are stored relative to .py file
70
70
  if code.endswith('\n'): code=code[:-1]
@@ -147,7 +147,7 @@ def nbdev_export(
147
147
  **kwargs):
148
148
  "Export notebooks in `path` to Python modules"
149
149
  if os.environ.get('IN_TEST',0): return
150
- if not is_nbdev(): raise Exception('`nbdev_export` must be called from a directory within a nbdev project.')
150
+ if not is_nbdev(): raise Exception('`nbdev-export` must be called from a directory within a nbdev project.')
151
151
  cfg = get_config()
152
152
  procs = procs.split() if procs else cfg.get('export_procs', [])
153
153
  procs = [import_obj(p) for p in procs] if procs else None
@@ -53,7 +53,7 @@ def nb_export(nbname:str, # Filename of notebook
53
53
  nm = ifnone(name, getattr(exp, 'default_exp', None) if mod=='#' else mod)
54
54
  if not nm:
55
55
  warn(f"Notebook '{nbname}' uses `#| export` without `#| default_exp` cell.\n"
56
- "Note nbdev2 no longer supports nbdev1 syntax. Run `nbdev_migrate` to upgrade.\n"
56
+ "Note nbdev2 no longer supports nbdev1 syntax. Run `nbdev-migrate` to upgrade.\n"
57
57
  "See https://nbdev.fast.ai/getting_started.html for more information.")
58
58
  return
59
59
  mm = mod_maker(dest=lib_path, name=nm, nb_path=nbname, is_new=bool(name) or mod=='#', solo_nb=solo_nb)
@@ -223,7 +223,7 @@ def _doc_mtime_not_older(readme_path, readme_nb_path):
223
223
 
224
224
  # %% ../nbs/api/14_quarto.ipynb #7b70b5c8
225
225
  class _SidebarYmlRemoved:
226
- "Context manager for `nbdev_readme` to avoid rendering whole docs website"
226
+ "Context manager for `nbdev-readme` to avoid rendering whole docs website"
227
227
  def __init__(self,path): self._path=path
228
228
  def __enter__(self):
229
229
  self._yml_path = self._path/'sidebar.yml'
@@ -127,7 +127,7 @@ def release_git(token:str=None):
127
127
  def release_gh(
128
128
  token:str=None # Optional GitHub token (otherwise `token` file is used)
129
129
  ):
130
- "Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`"
130
+ "Calls `nbdev-changelog`, lets you edit the result, then pushes to git and calls `nbdev-release-git`"
131
131
  cfg = _find_config()
132
132
  Release().changelog()
133
133
  subprocess.run([os.environ.get('EDITOR','nano'), cfg.config_path/'CHANGELOG.md'])
@@ -73,7 +73,7 @@ def _update_mod(py_path, lib_dir):
73
73
  @call_parse
74
74
  def nbdev_update(fname:str=None): # A Python file name to update
75
75
  "Propagate change in modules matching `fname` to notebooks that created them"
76
- if fname and fname.endswith('.ipynb'): raise ValueError("`nbdev_update` operates on .py files. If you wish to convert notebooks instead, see `nbdev_export`.")
76
+ if fname and fname.endswith('.ipynb'): raise ValueError("`nbdev-update` operates on .py files. If you wish to convert notebooks instead, see `nbdev-export`.")
77
77
  if os.environ.get('IN_TEST',0): return
78
78
  cfg = get_config()
79
79
  fname = Path(fname or cfg.lib_path)
@@ -28,7 +28,8 @@ def test_nb(fn, # file name of notebook to test
28
28
  force_flags=None, # list of flags marking cells to always run
29
29
  do_print=False, # print completion?
30
30
  showerr=True, # print errors to stderr?
31
- basepath=None): # path to add to sys.path
31
+ basepath=None, # path to add to sys.path
32
+ verbose=False): # stream stdout/stderr from cells to console?
32
33
  "Execute tests in notebook in `fn` except those with `skip_flags`"
33
34
  if basepath: sys.path.insert(0, str(basepath))
34
35
  if not IN_NOTEBOOK: os.environ["IN_TEST"] = '1'
@@ -49,7 +50,7 @@ def test_nb(fn, # file name of notebook to test
49
50
  if do_print: print(f'Starting {fn}')
50
51
  try:
51
52
  with working_directory(fn.parent):
52
- k.run_all(nb, exc_stop=True, preproc=_no_eval)
53
+ k.run_all(nb, exc_stop=True, preproc=_no_eval, verbose=verbose)
53
54
  res = True
54
55
  except:
55
56
  if showerr: sys.stderr.write(k.prettytb(fname=fn)+'\n')
@@ -76,6 +77,7 @@ def nbdev_test(
76
77
  do_print:bool=False, # Print start and end of each notebook
77
78
  pause:float=0.01, # Pause time (in seconds) between notebooks to avoid race conditions
78
79
  ignore_fname:str='.notest', # Filename that will result in siblings being ignored
80
+ verbose:bool=False, # Print stdout/stderr from notebook cells?
79
81
  **kwargs):
80
82
  "Test in parallel notebooks matching `path`, passing along `flags`"
81
83
  skip_flags = get_config().tst_flags
@@ -90,7 +92,7 @@ def nbdev_test(
90
92
  wd_pth = get_config().nbs_path
91
93
  with working_directory(wd_pth if (wd_pth and wd_pth.exists()) else os.getcwd()):
92
94
  results = parallel(test_nb, files, skip_flags=skip_flags, force_flags=force_flags, n_workers=n_workers,
93
- basepath=get_config().config_path, pause=pause, do_print=do_print, **kw)
95
+ basepath=get_config().config_path, pause=pause, do_print=do_print, verbose=verbose, **kw)
94
96
  passed,times = zip(*results)
95
97
  if all(passed): print("Success.")
96
98
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nbdev
3
- Version: 3.0.8
3
+ Version: 3.0.10
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
@@ -58,12 +58,10 @@ Python packaging standards ([PEP
58
58
  lives in the standard `[project]` section, while nbdev-specific settings
59
59
  go in `[tool.nbdev]`.
60
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.
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.
67
65
 
68
66
  `nbdev` is a notebook-driven development platform. Simply write
69
67
  notebooks with lightweight markup and get high-quality documentation,
@@ -86,8 +84,7 @@ practices because tests and documentation are first class.
86
84
  - **Two-way sync between notebooks and plaintext source code** allowing
87
85
  you to use your IDE for code navigation or quick edits. Sync is
88
86
  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
87
+ so `nbdev-update` always updates the correct cell
91
88
  - **Tests** written as ordinary notebook cells are run in parallel with
92
89
  a single command
93
90
  - **Continuous integration** out-of-the-box with [GitHub
@@ -129,47 +126,47 @@ walkthrough](https://youtu.be/67FdzLSt4aA) with coding sections sped up
129
126
  using the `unsilence` Python library – it’s 27 minutes faster, but a bit
130
127
  harder to follow.
131
128
 
132
- You can also run `nbdev_help` from the terminal to see the full list of
129
+ You can also run `nbdev-help` from the terminal to see the full list of
133
130
  available commands:
134
131
 
135
132
  ``` python
136
- !nbdev_help
133
+ !nbdev-help
137
134
  ```
138
135
 
139
- nb_export Export a single nbdev notebook to a python script.
140
- nbdev_bump_version Increment version in __init__.py by one
141
- nbdev_changelog Create a CHANGELOG.md file from closed and labeled GitHub issues
142
- nbdev_clean Clean all notebooks in `fname` to avoid merge conflicts
143
- nbdev_conda Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it
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.
146
- nbdev_docs Create Quarto docs and README.md
147
- nbdev_export Export notebooks in `path` to Python modules
148
- nbdev_filter A notebook filter for Quarto
149
- nbdev_fix Create working notebook from conflicted notebook `nbname`
150
- nbdev_help Show help for all console scripts
151
- nbdev_install Install Quarto and the current library
152
- nbdev_install_hooks Install Jupyter and git hooks to automatically clean, trust, and fix merge conflicts in notebooks
153
- nbdev_install_quarto Install latest Quarto on macOS or Linux, prints instructions for Windows
154
- nbdev_merge Git merge driver for notebooks
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
157
- nbdev_new Create an nbdev project.
158
- nbdev_prepare Export, test, and clean notebooks, and render README if needed
159
- nbdev_preview Preview docs locally
160
- nbdev_proc_nbs Process notebooks in `path` for docs rendering
161
- nbdev_pypi Create and upload Python package to PyPI
162
- nbdev_readme Create README.md from readme_nb (index.ipynb by default)
163
- nbdev_release_both Release both conda and PyPI packages
164
- nbdev_release_gh Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`
165
- nbdev_release_git Tag and create a release in GitHub for the current version
166
- nbdev_requirements Writes a `requirements.txt` file to `directory` based on pyproject.toml.
167
- nbdev_sidebar Create sidebar.yml
168
- nbdev_test Test in parallel notebooks matching `path`, passing along `flags`
169
- nbdev_trust Trust notebooks matching `fname`.
170
- nbdev_update Propagate change in modules matching `fname` to notebooks that created them
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
136
+ nb-export Export a single nbdev notebook to a python script.
137
+ nbdev-bump-version Increment version in __init__.py by one
138
+ nbdev-changelog Create a CHANGELOG.md file from closed and labeled GitHub issues
139
+ nbdev-clean Clean all notebooks in `fname` to avoid merge conflicts
140
+ nbdev-conda Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it
141
+ nbdev-contributing Create CONTRIBUTING.md from contributing_nb (defaults to 'contributing.ipynb' if present). Skips if the file doesn't exist.
142
+ nbdev-create-config Create a pyproject.toml config file.
143
+ nbdev-docs Create Quarto docs and README.md
144
+ nbdev-export Export notebooks in `path` to Python modules
145
+ nbdev-filter A notebook filter for Quarto
146
+ nbdev-fix Create working notebook from conflicted notebook `nbname`
147
+ nbdev-help Show help for all console scripts
148
+ nbdev-install Install Quarto and the current library
149
+ nbdev-install-hooks Install Jupyter and git hooks to automatically clean, trust, and fix merge conflicts in notebooks
150
+ nbdev-install-quarto Install latest Quarto on macOS or Linux, prints instructions for Windows
151
+ nbdev-merge Git merge driver for notebooks
152
+ nbdev-migrate Convert all markdown and notebook files in `path` from v1 to v2
153
+ nbdev-migrate-config Migrate settings.ini to pyproject.toml
154
+ nbdev-new Create an nbdev project.
155
+ nbdev-prepare Export, test, and clean notebooks, and render README if needed
156
+ nbdev-preview Preview docs locally
157
+ nbdev-proc-nbs Process notebooks in `path` for docs rendering
158
+ nbdev-pypi Create and upload Python package to PyPI
159
+ nbdev-readme Create README.md from readme_nb (index.ipynb by default)
160
+ nbdev-release-both Release both conda and PyPI packages
161
+ nbdev-release-gh Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`
162
+ nbdev-release-git Tag and create a release in GitHub for the current version
163
+ nbdev-requirements Writes a `requirements.txt` file to `directory` based on pyproject.toml.
164
+ nbdev-sidebar Create sidebar.yml
165
+ nbdev-test Test in parallel notebooks matching `path`, passing along `flags`
166
+ nbdev-trust Trust notebooks matching `fname`.
167
+ nbdev-update Propagate change in modules matching `fname` to notebooks that created them
168
+ nbdev-update-license Allows you to update the license of your project.
169
+ watch-export Use `nb_export` on ipynb files in `nbs` directory on changes using nbdev config if available
173
170
 
174
171
  ## FAQ
175
172
 
@@ -248,8 +245,7 @@ strive to abide by generally accepted best practices in open-source
248
245
  software development.
249
246
 
250
247
  Make sure you have `nbdev`’s git hooks installed by running
251
- [`nbdev_install_hooks`](https://nbdev.fast.ai/api/clean.html#nbdev_install_hooks)
252
- in the cloned repository.
248
+ `nbdev-install-hooks` in the cloned repository.
253
249
 
254
250
  ## Copyright
255
251
 
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