cli

CLI commands

source

nbdev_filter

 nbdev_filter (nb_txt:str=None, fname:str=None, printit:<function
               bool_arg>=True)

A notebook filter for Quarto

Type Default Details
nb_txt str None Notebook text (uses stdin if not provided)
fname str None Notebook to read (uses nb_txt if not provided)
printit bool_arg True Print to stdout?

source

extract_tgz

 extract_tgz (url, dest='.')

source

nbdev_new

 nbdev_new (repo:str=None, branch:str=None, user:str=None,
            author:str=None, author_email:str=None, description:str=None,
            path:str='.', cfg_name:str='settings.ini',
            lib_name='%(repo)s',
            git_url='https://github.com/%(user)s/%(repo)s',
            custom_sidebar:<function bool_arg>=False,
            nbs_path:pathlib.Path='nbs', lib_path:pathlib.Path=None,
            doc_path:pathlib.Path='_docs', tst_flags='notest',
            version='0.0.1', doc_host='https://%(user)s.github.io',
            doc_baseurl='/%(repo)s', keywords='nbdev jupyter notebook
            python', license='apache2', copyright:str=None, status='3',
            min_python='3.7', audience='Developers', language='English',
            recursive:<function bool_arg>=True, black_formatting:<function
            bool_arg>=False, readme_nb='index.ipynb',
            title='%(lib_name)s', allowed_metadata_keys='',
            allowed_cell_metadata_keys='', jupyter_hooks:<function
            bool_arg>=True, clean_ids:<function bool_arg>=True,
            clear_all:<function bool_arg>=False,
            put_version_in_init:<function bool_arg>=True)

Create an nbdev project.

Type Default Details
repo str None Repo name
branch str None Repo default branch
user str None Repo username
author str None Package author’s name
author_email str None Package author’s email address
description str None Short summary of the package
path str . Path to create config file
cfg_name str settings.ini Name of config file to create
lib_name str %(repo)s Package name
git_url str https://github.com/%(user)s/%(repo)s Repo URL
custom_sidebar bool_arg False Use a custom sidebar.yml?
nbs_path Path nbs Path to notebooks
lib_path Path None Path to package root (default: repo with - replaced by _)
doc_path Path _docs Path to rendered docs
tst_flags str notest Test flags
version str 0.0.1 Version of this release
doc_host str https://%(user)s.github.io Hostname for docs
doc_baseurl str /%(repo)s Base URL for docs
keywords str nbdev jupyter notebook python Package keywords
license str apache2 License for the package
copyright str None Copyright for the package, defaults to ‘current_year onwards, author
status str 3 Development status PyPI classifier
min_python str 3.7 Minimum Python version PyPI classifier
audience str Developers Intended audience PyPI classifier
language str English Language PyPI classifier
recursive bool_arg True Include subfolders in notebook globs?
black_formatting bool_arg False Format libraries with black?
readme_nb str index.ipynb Notebook to export as repo readme
title str %(lib_name)s Quarto website title
allowed_metadata_keys str Preserve the list of keys in the main notebook metadata
allowed_cell_metadata_keys str Preserve the list of keys in cell level metadata
jupyter_hooks bool_arg True Run Jupyter hooks?
clean_ids bool_arg True Remove ids from plaintext reprs?
clear_all bool_arg False Remove all cell metadata and cell outputs?
put_version_in_init bool_arg True Add the version to the main init.py in nbdev_export

It works by copying contents from the latest tagged nbdev-template release, and rendering termplate variables using the created settings.ini file. Settings can be passed via command line args; missing settings are inferred from the current git/GitHub repo, otherwise prompted for.

Help


source

chelp

 chelp ()

Show help for all console scripts

chelp()
nbdev_bump_version        Increment version in settings.ini by one
nbdev_changelog           Create a CHANGELOG.md file from closed and labeled GitHub issues
nbdev_clean               Clean all notebooks in `fname` to avoid merge conflicts
nbdev_conda               Create a `meta.yaml` file ready to be built into a package, and optionally build and upload it
nbdev_create_config       Create a config file.
nbdev_docs                Create Quarto docs and README.md
nbdev_export              Export notebooks in `path` to Python modules
nbdev_filter              A notebook filter for Quarto
nbdev_fix                 Create working notebook from conflicted notebook `nbname`
nbdev_help                Show help for all console scripts
nbdev_install             Install Quarto and the current library
nbdev_install_hooks       Install Jupyter and git hooks to automatically clean, trust, and fix merge conflicts in notebooks
nbdev_install_quarto      Install latest Quarto on macOS or Linux, prints instructions for Windows
nbdev_merge               Git merge driver for notebooks
nbdev_migrate             Convert all markdown and notebook files in `path` from v1 to v2
nbdev_new                 Create an nbdev project.
nbdev_prepare             Export, test, and clean notebooks, and render README if needed
nbdev_preview             Preview docs locally
nbdev_proc_nbs            Process notebooks in `path` for docs rendering
nbdev_pypi                Create and upload Python package to PyPI
nbdev_readme              None
nbdev_release_both        Release both conda and PyPI packages
nbdev_release_gh          Calls `nbdev_changelog`, lets you edit the result, then pushes to git and calls `nbdev_release_git`
nbdev_release_git         Tag and create a release in GitHub for the current version
nbdev_sidebar             Create sidebar.yml
nbdev_test                Test in parallel notebooks matching `path`, passing along `flags`
nbdev_trust               Trust notebooks matching `fname`
nbdev_update              Propagate change in modules matching `fname` to notebooks that created them