jupyter_report

Rules

jupyter_report

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

jupyter_report(name, data, args, cwd_mode, env, exporter_args, notebook, out_html,
               out_html_template_type, out_latex, out_latex_template_type, out_markdown, out_notebook,
               out_rst, out_webpdf)

Executes a Jupyter notebook and generates reports in various formats (HTML, Markdown, LaTeX, PDF, RST, WebPDF).

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
dataAdditional data files required by the notebook (e.g., input data files, images, configuration files).List of labelsoptional[]
argsAdditional command-line arguments to pass to the notebook execution.List of stringsoptional[]
cwd_modeThe working directory mode for notebook execution. If not specified, uses the jupyter_toolchain.cwd.Stringoptional""
envEnvironment variables to set when executing the notebook. Values support location expansion (e.g., $(location :target)).Dictionary: String -> Stringoptional{}
exporter_argsTraitlets-style flags forwarded to nbconvert exporters (e.g. --WebPDFExporter.exclude_input=true).List of stringsoptional[]
notebookThe notebook to execute and convert. Must be a jupyter_notebook target.Labelrequired
out_htmlOutput path for an HTML report. If specified, the notebook will be converted to HTML format.Label; nonconfigurableoptionalNone
out_html_template_typeTemplate type for HTML output.Stringoptional""
out_latexOutput path for a LaTeX report. If specified, the notebook will be converted to LaTeX format.Label; nonconfigurableoptionalNone
out_latex_template_typeTemplate type for LaTeX output.Stringoptional""
out_markdownOutput path for a Markdown report. If specified, the notebook will be converted to Markdown format.Label; nonconfigurableoptionalNone
out_notebookOutput path for the executed notebook (.ipynb file with cell outputs). If not specified, a default name is generated.Label; nonconfigurableoptionalNone
out_rstOutput path for a reStructuredText report. If specified, the notebook will be converted to RST format.Label; nonconfigurableoptionalNone
out_webpdfOutput path for a WebPDF report (generated via Playwright/Chromium). If specified, the notebook will be converted to PDF format using headless browser rendering.Label; nonconfigurableoptionalNone