Skip to content

Commit e920c5b

Browse files
committed
migrate
1 parent d89fc49 commit e920c5b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

nbdev/migrate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ def nbdev_migrate_config(path:str='.'): # Project root containing settings.ini
202202
doc_baseurl = d.get('doc_baseurl', '')
203203
doc_url = (doc_host.rstrip('/') + doc_baseurl) if doc_host else (f"https://{user}.github.io/{repo}/" if user else '')
204204
set_version(path/lib_path, d.get('version', '0.0.1'))
205-
txt = pyproject_tmpl.format(name=repo, lib_path=lib_path, description=d.get('description', ''),
205+
lib_name = d.get('lib_name', repo)
206+
txt = pyproject_tmpl.format(name=lib_name, lib_path=lib_path, description=d.get('description', ''),
206207
min_python=d.get('min_python', '3.9'), license=_license_map.get(d.get('license', ''), d.get('license', 'Apache-2.0')),
207208
author=d.get('author', ''), author_email=d.get('author_email', ''),
208209
keywords=d.get('keywords', 'nbdev').split(), git_url=git_url, doc_url=doc_url, branch=branch)

nbs/api/16_migrate.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,8 @@
11561156
" doc_baseurl = d.get('doc_baseurl', '')\n",
11571157
" doc_url = (doc_host.rstrip('/') + doc_baseurl) if doc_host else (f\"https://{user}.github.io/{repo}/\" if user else '')\n",
11581158
" set_version(path/lib_path, d.get('version', '0.0.1'))\n",
1159-
" txt = pyproject_tmpl.format(name=repo, lib_path=lib_path, description=d.get('description', ''),\n",
1159+
" lib_name = d.get('lib_name', repo)\n",
1160+
" txt = pyproject_tmpl.format(name=lib_name, lib_path=lib_path, description=d.get('description', ''),\n",
11601161
" min_python=d.get('min_python', '3.9'), license=_license_map.get(d.get('license', ''), d.get('license', 'Apache-2.0')),\n",
11611162
" author=d.get('author', ''), author_email=d.get('author_email', ''),\n",
11621163
" keywords=d.get('keywords', 'nbdev').split(), git_url=git_url, doc_url=doc_url, branch=branch)\n",

0 commit comments

Comments
 (0)