.ipynb nbformat inlines binary data outputs from e.g. _repr_png_() as base64 data, rather than delimiting code and binary data in .py files.
One file zipapp PEX Python Executables are buildable with Twitter Pants build, Buck, and Bazel. PEX files are executable ZIP files with a Python header.
There's a GitHub issue about a Markdown format for notebooks because percent format (`# %%`) and myst-nb formats don't include outputs.
There's also GitHub issue about Jupytext storing outputs
Containers are sandboxes. repo2docker with repo2podman sandboxes a git repo with notebooks by creating a container with a recent version of the notebook software on top.
How does your solution differ from ipyflow and rxpy, for example? Are ipywidgets supported or supportable?
This at the top of a notebook is less reproducible and less secure than a requirements.txt with checksums or better:
%pip install ipytest pytest-cov jupyterlab-miami-nights
%pip install -q -r requirements.txt
%pip?
%pip --help
But you don't need to run pip every time you run a notebook, so it's better to comment out the install steps. But then it requires manual input to run the notebook in a CI task, if it doesn't install everything in a requirements.txt and/or environment.yml or [Jupyter REES] first before running the notebook like repo2docker: #%pip install -r requirements.txt
#!pip --help
#!mamba env update -f environment.yml
#!pixi install --manifest-path pyproject.toml_or_pixi.tomlThis increases reproducibility and helps prevent environment pollution. If your notebook has inline script metadata, marimo will automatically install the enumerated packages before running the notebook; if it doesn't, marimo will prompt you to install the missing packages on notebook startup.