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
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| cwd_mode | The 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. | String | optional | "execution_root" |
| exporter_args | Default 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 strings | optional | [] |
| jupyter | The Jupyter Python package providing notebook execution capabilities. | Label | required | |
| jupytext | The Jupytext Python package for converting between notebook formats (e.g., .py to .ipynb). | Label | required | |
| kernel | Default kernel name to use for notebook execution if not specified in the notebook (e.g., 'python3', 'rust'). | String | optional | "" |
| pandoc | The Pandoc executable for converting notebooks to various output formats (HTML, LaTeX, PDF, etc.). | Label | optional | None |
| playwright_browsers_dir | A directory containing the results of playwright install. | Label | optional | None |
| playwright_ld_library_dir | A directory of shared libraries to prepend to LD_LIBRARY_PATH when launching browsers. | Label | optional | None |