|
269 | 269 | " path.mkdir(exist_ok=True, parents=True)\n", |
270 | 270 | " \n", |
271 | 271 | " # Infer from git if not provided\n", |
272 | | - " inf = _fetch_from_git()\n", |
| 272 | + " inf,ucfg = _fetch_from_git(),_user_config()\n", |
273 | 273 | " repo = repo or inf.get('repo') or path.resolve().name\n", |
274 | | - " user = user or inf.get('user', '')\n", |
| 274 | + " user = user or inf.get('user') or ucfg.get('user', '')\n", |
275 | 275 | " if not user: raise ValueError(\"Could not infer `user` from git. Please pass --user explicitly.\")\n", |
276 | | - " author = author or inf.get('author', '')\n", |
| 276 | + " author = author or inf.get('author') or ucfg.get('author', '')\n", |
277 | 277 | " if not author: raise ValueError(\"Could not infer `author` from git. Please pass --author explicitly.\")\n", |
278 | | - " author_email = author_email or inf.get('author_email', '')\n", |
| 278 | + " author_email = author_email or inf.get('author_email') or ucfg.get('author_email', '')\n", |
279 | 279 | " if not author_email: raise ValueError(\"Could not infer `author_email` from git. Please pass --author-email explicitly.\")\n", |
280 | 280 | " branch = branch or inf.get('branch', 'main')\n", |
281 | 281 | " description = description or inf.get('description', '')\n", |
|
356 | 356 | "#| export\n", |
357 | 357 | "nbdev_defaults = dict(nbs_path='nbs', doc_path='_docs', tst_flags='notest', recursive=True, readme_nb='index.ipynb',\n", |
358 | 358 | " clean_ids=True, clear_all=False, put_version_in_init=True, jupyter_hooks=False, custom_sidebar=False, branch='main',\n", |
359 | | - " doc_procs=[], export_procs=[], exec_profile=True)\n", |
| 359 | + " doc_procs=[], export_procs=[], exec_profile=True, cell_timeout=600)\n", |
360 | 360 | "\n", |
361 | 361 | "_path_keys = 'lib_path', 'nbs_path', 'doc_path'" |
362 | 362 | ] |
|
558 | 558 | "id": "78056483", |
559 | 559 | "metadata": {}, |
560 | 560 | "source": [ |
561 | | - "You can customize nbdev for all your projects by creating a `~/.config/nbdev/config.toml` file (or following the [XDG specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html)). For example, you could globally disable nbdev's Jupyter hooks with `jupyter_hooks = false`." |
| 561 | + "You can customize nbdev for all your projects by creating a `~/.config/nbdev/config.toml` file (or following the [XDG specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html)). Any `[tool.nbdev]` key can go there, with the project's own setting winning: for example, `jupyter_hooks = false` globally disables nbdev's Jupyter hooks, and `cell_timeout = 60` gives `nbdev-test` a default cell timeout. `nbdev-create-config` also reads `user`, `author`, and `author_email` from it when neither the arguments nor the git remote supply them." |
562 | 562 | ] |
563 | 563 | }, |
564 | 564 | { |
|
0 commit comments