jupyter_toolchain

Rules

jupyter_toolchain

load("@rules_jupyter//jupyter:jupyter_toolchain.bzl", "jupyter_toolchain")

jupyter_toolchain(name, cwd_mode, exporter_args, jupyter, jupytext, kernel, pandoc,
                  playwright_browsers_dir, playwright_ld_library_dir)

Defines a Jupyter toolchain that provides Jupyter, Jupytext, Pandoc, and Playwright browser support.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
cwd_modeThe default working directory mode for notebook execution. This value is used when cwd_mode is not specified in jupyter_report or jupyter_notebook_test rules. workspace_root sets the working directory to the workspace root, while notebook_root sets it to the notebook's parent directory. This affects how relative paths in notebooks are resolved.Stringoptional"execution_root"
exporter_argsDefault traitlets-style flags forwarded to nbconvert exporters for all rules using this toolchain (e.g. --WebPDFExporter.exclude_input=true). Per-rule exporter_args are appended after these defaults, allowing overrides.List of stringsoptional[]
jupyterThe Jupyter Python package providing notebook execution capabilities.Labelrequired
jupytextThe Jupytext Python package for converting between notebook formats (e.g., .py to .ipynb).Labelrequired
kernelDefault kernel name to use for notebook execution if not specified in the notebook (e.g., 'python3', 'rust').Stringoptional""
pandocThe Pandoc executable for converting notebooks to various output formats (HTML, LaTeX, PDF, etc.).LabeloptionalNone
playwright_browsers_dirA directory containing the results of playwright install.LabeloptionalNone
playwright_ld_library_dirA directory of shared libraries to prepend to LD_LIBRARY_PATH when launching browsers.LabeloptionalNone