Skip to content

Commit

Permalink
Merge pull request #1071 from fastai/del-deploy
Browse files Browse the repository at this point in the history
get rid of `nbdev_deploy`
  • Loading branch information
jph00 authored Sep 15, 2022
2 parents c450343 + 4da1669 commit 73929f7
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 69 deletions.
1 change: 0 additions & 1 deletion nbdev/_modidx.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@
'nbdev.quarto._pre_docs': ('api/quarto.html#_pre_docs', 'nbdev/quarto.py'),
'nbdev.quarto._sort': ('api/quarto.html#_sort', 'nbdev/quarto.py'),
'nbdev.quarto._sprun': ('api/quarto.html#_sprun', 'nbdev/quarto.py'),
'nbdev.quarto.deploy': ('api/quarto.html#deploy', 'nbdev/quarto.py'),
'nbdev.quarto.fs_watchdog': ('api/quarto.html#fs_watchdog', 'nbdev/quarto.py'),
'nbdev.quarto.install': ('api/quarto.html#install', 'nbdev/quarto.py'),
'nbdev.quarto.install_quarto': ('api/quarto.html#install_quarto', 'nbdev/quarto.py'),
Expand Down
19 changes: 3 additions & 16 deletions nbdev/quarto.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# %% auto 0
__all__ = ['BASE_QUARTO_URL', 'install_quarto', 'install', 'nbdev_sidebar', 'refresh_quarto_yml', 'nbdev_readme', 'nbdev_docs',
'deploy', 'prepare', 'fs_watchdog', 'nbdev_preview']
'prepare', 'fs_watchdog', 'nbdev_preview']

# %% ../nbs/api/quarto.ipynb 4
def _sprun(cmd):
Expand Down Expand Up @@ -221,19 +221,6 @@ def nbdev_docs(

# %% ../nbs/api/quarto.ipynb 21
@call_parse
@delegates(nbdev_docs)
def deploy(
path:str=None, # Path to notebooks
skip_build:bool=False, # Don't build docs first
**kwargs):
"Deploy docs to GitHub Pages"
if not skip_build: nbdev_docs.__wrapped__(path, **kwargs)
try: from ghp_import import ghp_import
except: return warnings.warn('Please install ghp-import with `pip install ghp-import`')
ghp_import(get_config().doc_path, push=True, stderr=True, no_history=True)

# %% ../nbs/api/quarto.ipynb 22
@call_parse
def prepare():
"Export, test, and clean notebooks, and render README if needed"
import nbdev.test, nbdev.clean
Expand All @@ -243,7 +230,7 @@ def prepare():
refresh_quarto_yml()
nbdev_readme.__wrapped__(chk_time=True)

# %% ../nbs/api/quarto.ipynb 24
# %% ../nbs/api/quarto.ipynb 23
@contextmanager
def fs_watchdog(func, path, recursive:bool=True):
"File system watchdog dispatching to `func`"
Expand All @@ -259,7 +246,7 @@ class _ProcessHandler(FileSystemEventHandler): dispatch=func
observer.stop()
observer.join()

# %% ../nbs/api/quarto.ipynb 25
# %% ../nbs/api/quarto.ipynb 24
@call_parse
@delegates(_nbglob_docs)
def nbdev_preview(
Expand Down
1 change: 0 additions & 1 deletion nbs/api/cli.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
"\u001b[1m\u001b[94mnbdev_clean\u001b[0m Clean all notebooks in `fname` to avoid merge conflicts\n",
"\u001b[1m\u001b[94mnbdev_conda\u001b[0m Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it\n",
"\u001b[1m\u001b[94mnbdev_create_config\u001b[0m Create a config file.\n",
"\u001b[1m\u001b[94mnbdev_deploy\u001b[0m Deploy docs to GitHub Pages\n",
"\u001b[1m\u001b[94mnbdev_docs\u001b[0m Create Quarto docs and README.md\n",
"\u001b[1m\u001b[94mnbdev_export\u001b[0m Export notebooks in `path` to Python modules\n",
"\u001b[1m\u001b[94mnbdev_filter\u001b[0m A notebook filter for Quarto\n",
Expand Down
21 changes: 0 additions & 21 deletions nbs/api/quarto.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -399,27 +399,6 @@
"# nbdev_docs.__wrapped__()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a5c29641",
"metadata": {},
"outputs": [],
"source": [
"#|export\n",
"@call_parse\n",
"@delegates(nbdev_docs)\n",
"def deploy(\n",
" path:str=None, # Path to notebooks\n",
" skip_build:bool=False, # Don't build docs first\n",
" **kwargs):\n",
" \"Deploy docs to GitHub Pages\"\n",
" if not skip_build: nbdev_docs.__wrapped__(path, **kwargs)\n",
" try: from ghp_import import ghp_import\n",
" except: return warnings.warn('Please install ghp-import with `pip install ghp-import`')\n",
" ghp_import(get_config().doc_path, push=True, stderr=True, no_history=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
58 changes: 29 additions & 29 deletions nbs/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -133,35 +133,35 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1m\u001b[94mnbdev_bump_version\u001b[0m Increment version in settings.ini by one\r\n",
"\u001b[1m\u001b[94mnbdev_changelog\u001b[0m Create a CHANGELOG.md file from closed and labeled GitHub issues\r\n",
"\u001b[1m\u001b[94mnbdev_clean\u001b[0m Clean all notebooks in `fname` to avoid merge conflicts\r\n",
"\u001b[1m\u001b[94mnbdev_conda\u001b[0m Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it\r\n",
"\u001b[1m\u001b[94mnbdev_create_config\u001b[0m Create a config file.\r\n",
"\u001b[1m\u001b[94mnbdev_deploy\u001b[0m Deploy docs to GitHub Pages\r\n",
"\u001b[1m\u001b[94mnbdev_docs\u001b[0m Create Quarto docs and README.md\r\n",
"\u001b[1m\u001b[94mnbdev_export\u001b[0m Export notebooks in `path` to Python modules\r\n",
"\u001b[1m\u001b[94mnbdev_filter\u001b[0m A notebook filter for Quarto\r\n",
"\u001b[1m\u001b[94mnbdev_fix\u001b[0m Create working notebook from conflicted notebook `nbname`\r\n",
"\u001b[1m\u001b[94mnbdev_help\u001b[0m Show help for all console scripts\r\n",
"\u001b[1m\u001b[94mnbdev_install\u001b[0m Install Quarto and the current library\r\n",
"\u001b[1m\u001b[94mnbdev_install_hooks\u001b[0m Install Jupyter and git hooks to automatically clean, trust, and fix merge conflicts in notebooks\r\n",
"\u001b[1m\u001b[94mnbdev_install_quarto\u001b[0m Install latest Quarto on macOS or Linux, prints instructions for Windows\r\n",
"\u001b[1m\u001b[94mnbdev_merge\u001b[0m Git merge driver for notebooks\r\n",
"\u001b[1m\u001b[94mnbdev_migrate\u001b[0m Convert all directives and callouts in `fname` from v1 to v2\r\n",
"\u001b[1m\u001b[94mnbdev_new\u001b[0m Create an nbdev project.\r\n",
"\u001b[1m\u001b[94mnbdev_prepare\u001b[0m Export, test, and clean notebooks, and render README if needed\r\n",
"\u001b[1m\u001b[94mnbdev_preview\u001b[0m Preview docs locally\r\n",
"\u001b[1m\u001b[94mnbdev_proc_nbs\u001b[0m Process notebooks in `path` for docs rendering\r\n",
"\u001b[1m\u001b[94mnbdev_pypi\u001b[0m Create and upload Python package to PyPI\r\n",
"\u001b[1m\u001b[94mnbdev_readme\u001b[0m None\r\n",
"\u001b[1m\u001b[94mnbdev_release_both\u001b[0m Release both conda and PyPI packages\r\n",
"\u001b[1m\u001b[94mnbdev_release_gh\u001b[0m Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`\r\n",
"\u001b[1m\u001b[94mnbdev_release_git\u001b[0m Tag and create a release in GitHub for the current version\r\n",
"\u001b[1m\u001b[94mnbdev_sidebar\u001b[0m Create sidebar.yml\r\n",
"\u001b[1m\u001b[94mnbdev_test\u001b[0m Test in parallel notebooks matching `path`, passing along `flags`\r\n",
"\u001b[1m\u001b[94mnbdev_trust\u001b[0m Trust notebooks matching `fname`\r\n",
"\u001b[1m\u001b[94mnbdev_update\u001b[0m Propagate change in modules matching `fname` to notebooks that created them\r\n"
"\u001b[1m\u001b[94mnbdev_bump_version\u001b[0m Increment version in settings.ini by one\n",
"\u001b[1m\u001b[94mnbdev_changelog\u001b[0m Create a CHANGELOG.md file from closed and labeled GitHub issues\n",
"\u001b[1m\u001b[94mnbdev_clean\u001b[0m Clean all notebooks in `fname` to avoid merge conflicts\n",
"\u001b[1m\u001b[94mnbdev_conda\u001b[0m Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it\n",
"\u001b[1m\u001b[94mnbdev_create_config\u001b[0m Create a config file.\n",
"\u001b[1m\u001b[94mnbdev_deploy\u001b[0m Deploy docs to GitHub Pages\n",
"\u001b[1m\u001b[94mnbdev_docs\u001b[0m Create Quarto docs and README.md\n",
"\u001b[1m\u001b[94mnbdev_export\u001b[0m Export notebooks in `path` to Python modules\n",
"\u001b[1m\u001b[94mnbdev_filter\u001b[0m A notebook filter for Quarto\n",
"\u001b[1m\u001b[94mnbdev_fix\u001b[0m Create working notebook from conflicted notebook `nbname`\n",
"\u001b[1m\u001b[94mnbdev_help\u001b[0m Show help for all console scripts\n",
"\u001b[1m\u001b[94mnbdev_install\u001b[0m Install Quarto and the current library\n",
"\u001b[1m\u001b[94mnbdev_install_hooks\u001b[0m Install Jupyter and git hooks to automatically clean, trust, and fix merge conflicts in notebooks\n",
"\u001b[1m\u001b[94mnbdev_install_quarto\u001b[0m Install latest Quarto on macOS or Linux, prints instructions for Windows\n",
"\u001b[1m\u001b[94mnbdev_merge\u001b[0m Git merge driver for notebooks\n",
"\u001b[1m\u001b[94mnbdev_migrate\u001b[0m Convert all directives and callouts in `fname` from v1 to v2\n",
"\u001b[1m\u001b[94mnbdev_new\u001b[0m Create an nbdev project.\n",
"\u001b[1m\u001b[94mnbdev_prepare\u001b[0m Export, test, and clean notebooks, and render README if needed\n",
"\u001b[1m\u001b[94mnbdev_preview\u001b[0m Preview docs locally\n",
"\u001b[1m\u001b[94mnbdev_proc_nbs\u001b[0m Process notebooks in `path` for docs rendering\n",
"\u001b[1m\u001b[94mnbdev_pypi\u001b[0m Create and upload Python package to PyPI\n",
"\u001b[1m\u001b[94mnbdev_readme\u001b[0m None\n",
"\u001b[1m\u001b[94mnbdev_release_both\u001b[0m Release both conda and PyPI packages\n",
"\u001b[1m\u001b[94mnbdev_release_gh\u001b[0m Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`\n",
"\u001b[1m\u001b[94mnbdev_release_git\u001b[0m Tag and create a release in GitHub for the current version\n",
"\u001b[1m\u001b[94mnbdev_sidebar\u001b[0m Create sidebar.yml\n",
"\u001b[1m\u001b[94mnbdev_test\u001b[0m Test in parallel notebooks matching `path`, passing along `flags`\n",
"\u001b[1m\u001b[94mnbdev_trust\u001b[0m Trust notebooks matching `fname`\n",
"\u001b[1m\u001b[94mnbdev_update\u001b[0m Propagate change in modules matching `fname` to notebooks that created them\n"
]
}
],
Expand Down
1 change: 0 additions & 1 deletion settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ console_scripts = nbdev_create_config=nbdev.config:nbdev_create_config
nbdev_install=nbdev.quarto:install
nbdev_docs=nbdev.quarto:nbdev_docs
nbdev_preview=nbdev.quarto:nbdev_preview
nbdev_deploy=nbdev.quarto:deploy
nbdev_prepare=nbdev.quarto:prepare
nbdev_readme=nbdev.quarto:nbdev_readme
nbdev_release_gh=nbdev.release:release_gh
Expand Down

0 comments on commit 73929f7

Please sign in to comment.