|
1 | 1 | {
|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 |
| - "attachments": {}, |
5 | 4 | "cell_type": "markdown",
|
6 | 5 | "id": "ff4908a6",
|
7 | 6 | "metadata": {},
|
|
67 | 66 | ]
|
68 | 67 | },
|
69 | 68 | {
|
70 |
| - "attachments": {}, |
71 | 69 | "cell_type": "markdown",
|
72 | 70 | "id": "e9fc60a8",
|
73 | 71 | "metadata": {},
|
|
119 | 117 | ]
|
120 | 118 | },
|
121 | 119 | {
|
122 |
| - "attachments": {}, |
123 | 120 | "cell_type": "markdown",
|
124 | 121 | "id": "3e7e76f7-7b19-4347-a52b-c33ad15d2178",
|
125 | 122 | "metadata": {},
|
|
191 | 188 | " nbdev_create_config.__wrapped__(**kwargs)\n",
|
192 | 189 | " cfg = get_config()\n",
|
193 | 190 | " _update_repo_meta(cfg)\n",
|
194 |
| - "\n", |
195 | 191 | " path = Path()\n",
|
196 | 192 | "\n",
|
197 |
| - " _ORG_OR_USR = 'fastai'\n", |
198 |
| - " _REPOSITORY = 'nbdev-template'\n", |
| 193 | + " _ORG_OR_USR,_REPOSITORY = 'fastai','nbdev-template'\n", |
199 | 194 | " _TEMPLATE = f'{_ORG_OR_USR}/{_REPOSITORY}'\n",
|
200 | 195 | " template = kwargs.get('template', _TEMPLATE)\n",
|
201 |
| - " try:\n", |
202 |
| - " org_or_usr, repo = template.split('/')\n", |
203 |
| - " except ValueError:\n", |
204 |
| - " org_or_usr, repo = _ORG_OR_USR, _REPOSITORY\n", |
205 |
| - "\n", |
| 196 | + " try: org_or_usr, repo = template.split('/')\n", |
| 197 | + " except ValueError: org_or_usr, repo = _ORG_OR_USR, _REPOSITORY\n", |
206 | 198 | "\n",
|
207 | 199 | " tag = kwargs.get('tag', None)\n",
|
208 | 200 | " if tag is None:\n",
|
209 | 201 | " with warnings.catch_warnings():\n",
|
210 | 202 | " warnings.simplefilter('ignore', UserWarning)\n",
|
211 |
| - "\n", |
212 | 203 | " tag = GhApi(gh_host='https://api.github.com', authenticate=False).repos.get_latest_release(org_or_usr, repo).tag_name\n",
|
213 | 204 | "\n",
|
214 | 205 | " url = f\"https://github.com/{org_or_usr}/{repo}/archive/{tag}.tar.gz\"\n",
|
215 | 206 | " extract_tgz(url)\n",
|
216 | 207 | " tmpl_path = path/f'{repo}-{tag}'\n",
|
217 |
| - " \n", |
| 208 | + "\n", |
218 | 209 | " cfg.nbs_path.mkdir(exist_ok=True)\n",
|
219 | 210 | " nbexists = bool(first(cfg.nbs_path.glob('*.ipynb')))\n",
|
220 | 211 | " _nbs_path_sufs = ('.ipynb','.css')\n",
|
|
227 | 218 | " rmtree(tmpl_path)\n",
|
228 | 219 | "\n",
|
229 | 220 | " refresh_quarto_yml()\n",
|
230 |
| - "\n", |
231 | 221 | " nbdev_export.__wrapped__()\n",
|
232 | 222 | " nbdev_readme.__wrapped__()"
|
233 | 223 | ]
|
234 | 224 | },
|
235 | 225 | {
|
236 |
| - "attachments": {}, |
237 | 226 | "cell_type": "markdown",
|
238 | 227 | "id": "2239c092",
|
239 | 228 | "metadata": {},
|
|
311 | 300 | ]
|
312 | 301 | },
|
313 | 302 | {
|
314 |
| - "attachments": {}, |
315 | 303 | "cell_type": "markdown",
|
316 | 304 | "id": "280e0d6d-6559-4fc3-9478-320ce5eff0dc",
|
317 | 305 | "metadata": {},
|
|
381 | 369 | ]
|
382 | 370 | },
|
383 | 371 | {
|
384 |
| - "attachments": {}, |
385 | 372 | "cell_type": "markdown",
|
386 | 373 | "id": "aa35b010",
|
387 | 374 | "metadata": {},
|
|
0 commit comments