def nbdev_filter( 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?):
def nbdev_new( repo:str=None, # Repo name branch:str='main', # 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='', # Short summary of the package path:str='.', # Path to create config file min_python:str='3.10', # Minimum Python version license:str='Apache-2.0', # License (SPDX identifier)):
Create an nbdev project.
It works by copying contents from the latest tagged nbdev-template release, and rendering template variables using the created pyproject.toml. Settings can be passed via command line args; missing settings are inferred from the current git/GitHub repo.
def nb_export_cli( nbname, debug:store_true=False, # Debug flag lib_path:str=None, # Path to destination library. If not in a nbdev project, defaults to current directory. name:str=None, # Name of python script {name}.py to create. solo_nb:bool=False, # Export single notebook outside of an nbdev project.):
Export a single nbdev notebook to a python script.
def watch_export( nbs:str=None, # Nb directory to watch for changes lib:str=None, # Export directory to write py files to force:bool=False, # Ignore nbdev config if in nbdev project):
Use nb_export on ipynb files in nbs directory on changes using nbdev config if available
nb-export Export a single nbdev notebook to a python script.
nbdev-bump-version Increment version in __init__.py 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-contributing Create CONTRIBUTING.md from contributing_nb (defaults to 'contributing.ipynb' if present). Skips if the file doesn't exist.
nbdev-create-config Create a pyproject.toml 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-migrate-config Migrate settings.ini to pyproject.toml
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 Create README.md from readme_nb (index.ipynb by default)
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-requirements Writes a `requirements.txt` file to `directory` based on pyproject.toml.
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
nbdev-update-license Allows you to update the license of your project.
watch-export Use `nb_export` on ipynb files in `nbs` directory on changes using nbdev config if available