Files
wehub-resource-sync bb5c75ce05
Component Security Validation / Security Audit (push) Has been cancelled
Deploy to Cloudflare Pages / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:58 +08:00

751 B

Notebook Structure

Jupyter notebooks are JSON documents with this high-level shape:

  • nbformat and nbformat_minor
  • metadata
  • cells (a list of markdown and code cells)

When editing .ipynb files programmatically:

  • Preserve nbformat and nbformat_minor from the template.
  • Keep cells as an ordered list; do not reorder unless intentional.
  • For code cells, set execution_count to null when unknown.
  • For code cells, set outputs to an empty list when scaffolding.
  • For markdown cells, keep cell_type="markdown" and metadata={}.

Prefer scaffolding from the bundled templates or new_notebook.py (for example, $CODEX_HOME/skills/jupyter-notebook/scripts/new_notebook.py) instead of hand-authoring raw notebook JSON.