Skip to content

Commit e15f30d

Browse files
committed
spacing
1 parent 745aa27 commit e15f30d

31 files changed

+421
-421
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@
339339
- fix exporting `patch_to` which is decorated with `staticmethod` ([#1100](https://github.com/fastai/nbdev/pull/1100)), thanks to [@seeM](https://github.com/seeM)
340340
- `show_doc` errors if a dependency in the `nbdev` group has a sub-dependency that isn't installed ([#1097](https://github.com/fastai/nbdev/issues/1097))
341341
- Running `nbdev_migrate` while upgrading removes nbdev2 compatible directives ([#1089](https://github.com/fastai/nbdev/issues/1089))
342-
- respect `#|hide` and `#|include: false` for showdoc ([#1079](https://github.com/fastai/nbdev/pull/1079)), thanks to [@hamelsmu](https://github.com/hamelsmu)
342+
- respect `#| hide` and `#| include: false` for showdoc ([#1079](https://github.com/fastai/nbdev/pull/1079)), thanks to [@hamelsmu](https://github.com/hamelsmu)
343343
- Export class to library but hide from documentation ([#1076](https://github.com/fastai/nbdev/issues/1076))
344344
- `nbdev_clean` removes widget state ([#1069](https://github.com/fastai/nbdev/issues/1069))
345345
- If widget state is present, it means the user had intentionally changed settings in their notebook editor.
@@ -493,7 +493,7 @@
493493

494494
### Bugs Squashed
495495

496-
- Make sure `#|exec_doc` triggers an update even when there is no export or show_doc ([#906](https://github.com/fastai/nbdev/pull/906)), thanks to [@hamelsmu](https://github.com/hamelsmu)
496+
- Make sure `#| exec_doc` triggers an update even when there is no export or show_doc ([#906](https://github.com/fastai/nbdev/pull/906)), thanks to [@hamelsmu](https://github.com/hamelsmu)
497497
- allow nbdev directives to work with cell magic ([#905](https://github.com/fastai/nbdev/pull/905)), thanks to [@hamelsmu](https://github.com/hamelsmu)
498498

499499

@@ -572,7 +572,7 @@
572572

573573
### Bugs Squashed
574574

575-
- #|exports directive does not show source code in the docs ([#822](https://github.com/fastai/nbdev/issues/822))
575+
- #| exports directive does not show source code in the docs ([#822](https://github.com/fastai/nbdev/issues/822))
576576
- nbdev commands fail when `doc_path` contains whitespace ([#813](https://github.com/fastai/nbdev/pull/813)), thanks to [@mone27](https://github.com/mone27)
577577
- `show_doc` html renderer is incorrectly formatted ([#808](https://github.com/fastai/nbdev/issues/808))
578578
- `show_doc` cell output is incorrectly styled ([#807](https://github.com/fastai/nbdev/issues/807))
@@ -595,7 +595,7 @@
595595
- `get_config` works without a settings file ([#768](https://github.com/fastai/nbdev/pull/768)), thanks to [@seeM](https://github.com/seeM)
596596
- add site url ([#767](https://github.com/fastai/nbdev/pull/767)), thanks to [@hamelsmu](https://github.com/hamelsmu)
597597
- add `show_src` to display rich source code ([#763](https://github.com/fastai/nbdev/pull/763)), thanks to [@seeM](https://github.com/seeM)
598-
- add support for `#|exports` ([#762](https://github.com/fastai/nbdev/issues/762))
598+
- add support for `#| exports` ([#762](https://github.com/fastai/nbdev/issues/762))
599599
- `nbdev_merge` prints info like `git merge` ([#753](https://github.com/fastai/nbdev/issues/753))
600600
- helpers to convert fp front matter to quarto front matter ([#750](https://github.com/fastai/nbdev/pull/750)), thanks to [@hamelsmu](https://github.com/hamelsmu)
601601
- Streamline default settings ([#747](https://github.com/fastai/nbdev/issues/747))

nbdev/quarto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _sort(a):
7070
x,y = a
7171
if y.startswith('index.'): return x,'00'
7272
return a
73-
#|export
73+
#| export
7474
_def_file_re = r'\.(?:ipynb|qmd|html)$'
7575

7676
@delegates(nbglob_cli)

nbs/api/01_config.ipynb

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
20-
"#|default_exp config"
20+
"#| default_exp config"
2121
]
2222
},
2323
{
@@ -26,7 +26,7 @@
2626
"metadata": {},
2727
"outputs": [],
2828
"source": [
29-
"#|export\n",
29+
"#| export\n",
3030
"from datetime import datetime\n",
3131
"from fastcore.docments import *\n",
3232
"from fastcore.utils import *\n",
@@ -47,7 +47,7 @@
4747
"metadata": {},
4848
"outputs": [],
4949
"source": [
50-
"#|hide\n",
50+
"#| hide\n",
5151
"from fastcore.test import *\n",
5252
"import tempfile"
5353
]
@@ -84,7 +84,7 @@
8484
"metadata": {},
8585
"outputs": [],
8686
"source": [
87-
"#|export\n",
87+
"#| export\n",
8888
"_nbdev_home_dir = 'nbdev' # sub-directory of xdg base dir\n",
8989
"_nbdev_cfg_name = 'settings.ini'"
9090
]
@@ -95,7 +95,7 @@
9595
"metadata": {},
9696
"outputs": [],
9797
"source": [
98-
"#|export\n",
98+
"#| export\n",
9999
"def _git_repo():\n",
100100
" try: return repo_details(run('git config --get remote.origin.url'))[1]\n",
101101
" except OSError: return"
@@ -107,7 +107,7 @@
107107
"metadata": {},
108108
"outputs": [],
109109
"source": [
110-
"#|hide\n",
110+
"#| hide\n",
111111
"test_eq(_git_repo(), 'nbdev')\n",
112112
"with tempfile.TemporaryDirectory() as d, working_directory(d): test_is(_git_repo(), None)"
113113
]
@@ -118,7 +118,7 @@
118118
"metadata": {},
119119
"outputs": [],
120120
"source": [
121-
"#|export\n",
121+
"#| export\n",
122122
"\n",
123123
"# When adding a named default to the list below, be sure that that name\n",
124124
"# is also added to one of the sections in `_nbdev_cfg_sections` as well,\n",
@@ -176,7 +176,7 @@
176176
"metadata": {},
177177
"outputs": [],
178178
"source": [
179-
"#|export\n",
179+
"#| export\n",
180180
"def _get_info(owner, repo, default_branch='main', default_kw='nbdev'):\n",
181181
" from ghapi.all import GhApi\n",
182182
" api = GhApi(owner=owner, repo=repo, token=os.getenv('GITHUB_TOKEN'))\n",
@@ -199,7 +199,7 @@
199199
"metadata": {},
200200
"outputs": [],
201201
"source": [
202-
"#|hide\n",
202+
"#| hide\n",
203203
"if os.getenv('GITHUB_ACTIONS') != 'true': # GITHUB_TOKEN in actions has limited scope.\n",
204204
" _branch, _tags, _descrip = _get_info('fastai', 'fastai')\n",
205205
" test_eq(_tags, 'colab deep-learning fastai gpu machine-learning notebooks python pytorch')\n",
@@ -213,7 +213,7 @@
213213
"metadata": {},
214214
"outputs": [],
215215
"source": [
216-
"#|export\n",
216+
"#| export\n",
217217
"def _fetch_from_git(raise_err=False):\n",
218218
" \"Get information for settings.ini from the user.\"\n",
219219
" res={}\n",
@@ -236,7 +236,7 @@
236236
"metadata": {},
237237
"outputs": [],
238238
"source": [
239-
"#|hide\n",
239+
"#| hide\n",
240240
"#test_eq(_fetch_from_git(raise_err=True)['lib_name'], 'nbdev')"
241241
]
242242
},
@@ -246,7 +246,7 @@
246246
"metadata": {},
247247
"outputs": [],
248248
"source": [
249-
"#|export\n",
249+
"#| export\n",
250250
"def _prompt_user(cfg, inferred):\n",
251251
" \"Let user input values not in `cfg` or `inferred`.\"\n",
252252
" res = cfg.copy()\n",
@@ -267,7 +267,7 @@
267267
"metadata": {},
268268
"outputs": [],
269269
"source": [
270-
"#|hide\n",
270+
"#| hide\n",
271271
"# `repo` not printed - already exists in `cfg`\n",
272272
"# `user` printed - in `inferred` and not `cfg`\n",
273273
"test_stdout(lambda: _prompt_user({'user':None,'repo':'nbdev'},{'user':'fastai'}),\n",
@@ -280,7 +280,7 @@
280280
"metadata": {},
281281
"outputs": [],
282282
"source": [
283-
"#|export\n",
283+
"#| export\n",
284284
"def _cfg2txt(cfg, head, sections, tail=''):\n",
285285
" \"Render `cfg` with commented sections.\"\n",
286286
" nm = cfg.d.name\n",
@@ -299,7 +299,7 @@
299299
"metadata": {},
300300
"outputs": [],
301301
"source": [
302-
"#|hide\n",
302+
"#| hide\n",
303303
"d = {'user': 'fastai', 'repo': 'nbdev', 'doc_path': '_docs'}\n",
304304
"c = Config('.', 'test_settings.ini', d, save=False)\n",
305305
"txt = '''[DEFAULT]\n",
@@ -321,7 +321,7 @@
321321
"metadata": {},
322322
"outputs": [],
323323
"source": [
324-
"#|export\n",
324+
"#| export\n",
325325
"_nbdev_cfg_head = '''# All sections below are required unless otherwise specified.\n",
326326
"# See https://github.com/AnswerDotAI/nbdev/blob/main/settings.ini for examples.\n",
327327
"\n",
@@ -345,7 +345,7 @@
345345
"metadata": {},
346346
"outputs": [],
347347
"source": [
348-
"#|export\n",
348+
"#| export\n",
349349
"@call_parse\n",
350350
"@delegates(_apply_defaults, but='cfg')\n",
351351
"def nbdev_create_config(\n",
@@ -401,7 +401,7 @@
401401
"metadata": {},
402402
"outputs": [],
403403
"source": [
404-
"#|export\n",
404+
"#| export\n",
405405
"def _nbdev_config_file(cfg_name=_nbdev_cfg_name, path=None):\n",
406406
" cfg_path = Path.cwd() if path is None else Path(path)\n",
407407
" return getattr(Config.find(cfg_name), 'config_file', cfg_path/cfg_name)"
@@ -413,7 +413,7 @@
413413
"metadata": {},
414414
"outputs": [],
415415
"source": [
416-
"#|hide\n",
416+
"#| hide\n",
417417
"test_eq(_nbdev_config_file(), Path.cwd().parent.parent/'settings.ini')"
418418
]
419419
},
@@ -423,7 +423,7 @@
423423
"metadata": {},
424424
"outputs": [],
425425
"source": [
426-
"#|export\n",
426+
"#| export\n",
427427
"def _xdg_config_paths(cfg_name=_nbdev_cfg_name):\n",
428428
" xdg_config_paths = reversed([xdg_config_home()]+xdg_config_dirs())\n",
429429
" return [o/_nbdev_home_dir/cfg_name for o in xdg_config_paths]"
@@ -435,7 +435,7 @@
435435
"metadata": {},
436436
"outputs": [],
437437
"source": [
438-
"#|export\n",
438+
"#| export\n",
439439
"def _type(t): return bool if t==bool_arg else t\n",
440440
"_types = {k:_type(v['anno']) for k,v in docments(_apply_defaults,full=True,returns=False).items() if k != 'cfg'}\n",
441441
"\n",
@@ -463,7 +463,7 @@
463463
"metadata": {},
464464
"outputs": [],
465465
"source": [
466-
"#|hide\n",
466+
"#| hide\n",
467467
"try: _get_config,get_config = get_config,get_config.__wrapped__ # Bypass cache during dev and tests\n",
468468
"except AttributeError: pass"
469469
]
@@ -581,7 +581,7 @@
581581
"metadata": {},
582582
"outputs": [],
583583
"source": [
584-
"#|export\n",
584+
"#| export\n",
585585
"def config_key(c, default=None, path=True, missing_ok=None):\n",
586586
" \"Deprecated: use `get_config().get` or `get_config().path` instead.\"\n",
587587
" warn(\"`config_key` is deprecated. Use `get_config().get` or `get_config().path` instead.\", DeprecationWarning)\n",
@@ -601,7 +601,7 @@
601601
"metadata": {},
602602
"outputs": [],
603603
"source": [
604-
"#|export\n",
604+
"#| export\n",
605605
"def is_nbdev(): return _nbdev_config_file().exists()"
606606
]
607607
},
@@ -611,7 +611,7 @@
611611
"metadata": {},
612612
"outputs": [],
613613
"source": [
614-
"#|hide\n",
614+
"#| hide\n",
615615
"test_eq(is_nbdev(), True)"
616616
]
617617
},
@@ -621,7 +621,7 @@
621621
"metadata": {},
622622
"outputs": [],
623623
"source": [
624-
"#|export\n",
624+
"#| export\n",
625625
"def create_output(txt, mime):\n",
626626
" \"Add a cell output containing `txt` of the `mime` text MIME sub-type\"\n",
627627
" return [{\"data\": { f\"text/{mime}\": str(txt).splitlines(True) },\n",
@@ -634,7 +634,7 @@
634634
"metadata": {},
635635
"outputs": [],
636636
"source": [
637-
"#|export\n",
637+
"#| export\n",
638638
"def show_src(src, lang='python'): return Markdown(f'```{lang}\\n{src}\\n```')"
639639
]
640640
},
@@ -697,7 +697,7 @@
697697
"metadata": {},
698698
"outputs": [],
699699
"source": [
700-
"#|export\n",
700+
"#| export\n",
701701
"_re_version = re.compile(r'^__version__\\s*=.*$', re.MULTILINE)\n",
702702
"_re_proj = re.compile(r'^name\\s*=\\s*\".*$', re.MULTILINE)\n",
703703
"_re_reqpy = re.compile(r'^requires-python\\s*=\\s*\".*$', re.MULTILINE)\n",
@@ -769,7 +769,7 @@
769769
"metadata": {},
770770
"outputs": [],
771771
"source": [
772-
"#|export\n",
772+
"#| export\n",
773773
"def write_cells(cells, hdr, file, offset=0, cell_number=True, solo_nb=False):\n",
774774
" \"Write `cells` to `file` along with header `hdr` starting at index `offset` (mainly for nbdev internal use).\"\n",
775775
" for cell in cells:\n",
@@ -784,7 +784,7 @@
784784
"metadata": {},
785785
"outputs": [],
786786
"source": [
787-
"#|export\n",
787+
"#| export\n",
788788
"def _basic_export_nb(fname, name, dest=None):\n",
789789
" \"Basic exporter to bootstrap nbdev.\"\n",
790790
" if dest is None: dest = get_config().lib_path\n",
@@ -820,7 +820,7 @@
820820
"metadata": {},
821821
"outputs": [],
822822
"source": [
823-
"#|hide\n",
823+
"#| hide\n",
824824
"#| eval: false\n",
825825
"path = Path('../nbdev')\n",
826826
"(path/'config.py').unlink(missing_ok=True)\n",

0 commit comments

Comments
 (0)