build

funcbuild.build

Build a Python package from notebooks.

1
2
3
4
def build(
    root='.'  # root directory containing pyproject.toml
) -> str:
    """Build a Python package from notebooks."""
funcbuild.tidy

Remove cache and temporary files (__pycache__, __marimo__, .pytest_cache, etc).

1
2
def tidy():
    """Remove cache and temporary files (__pycache__, __marimo__, .pytest_cache, etc)."""
funcbuild.nuke

Remove all build artifacts (dist, docs, src) and cache files.

1
2
def nuke():
    """Remove all build artifacts (dist, docs, src) and cache files."""
funcbuild.get_pypi_name

Map import name to PyPI package name.

1
2
3
4
def get_pypi_name(
    import_name
):
    """Map import name to PyPI package name."""
funcbuild.extract_import_names

Extract top-level module names from import nodes.

1
2
3
4
def extract_import_names(
    nodes
):
    """Extract top-level module names from import nodes."""
funcbuild.pep723_header

Generate PEP 723 inline script metadata.

1
2
3
4
def pep723_header(
    deps
):
    """Generate PEP 723 inline script metadata."""
funcbuild.bundle

Bundle all notebooks into a single Python file with PEP 723 dependencies.

1
2
3
4
5
def bundle(
    root='.',
    name=None
):
    """Bundle all notebooks into a single Python file with PEP 723 dependencies."""