Jupyter notebook verification, compilation, and DAG-based conversion for the SciTeX ecosystem
Project description
SciTeX Notebook (scitex-notebook)
Jupyter notebook verification, compilation, and DAG-based conversion
Problem
Jupyter notebooks can be executed in any cell order. The on-disk cell sequence often has no relationship to the actual execution dependency graph. Traditional notebook-to-script converters assume linear order and produce broken scripts.
Solution
scitex-notebook records actual execution order via
scitex-clew timestamps, then
reconstructs the dependency DAG afterward. "Do what you want, organize later."
- Verify clew sessions for a notebook (reproducibility check)
- Check for
scitex.iocalls missing@scitex.sessiondecoration - Compile execution history into a Mermaid DAG or topologically-sorted
.py - Convert
.ipynbto a SciTeX Python script (per-cell or unifiedmain())
Installation
Requires Python >= 3.10.
pip install scitex-notebook
Optional extras:
pip install "scitex-notebook[mcp]" # MCP server for AI agents
pip install "scitex-notebook[linter]" # IO-call conversion via scitex-linter
pip install "scitex-notebook[all]" # everything
Quickstart
Python API
import scitex_notebook as notebook
cells = notebook.parse_notebook("experiment.ipynb")
issues = notebook.check_notebook("experiment.ipynb") # untracked IO
results = notebook.verify_notebook("experiment.ipynb") # via clew DB
compiled = notebook.compile_notebook("experiment.ipynb")
print(compiled.to_mermaid()) # Mermaid DAG diagram
print(compiled.to_script()) # DAG-ordered Python script
notebook.convert_notebook(
"experiment.ipynb",
output="experiment.py",
mode="unified", # or "per_cell"
)
CLI
scitex-notebook verify experiment.ipynb
scitex-notebook check experiment.ipynb
scitex-notebook compile experiment.ipynb --format mermaid
scitex-notebook compile experiment.ipynb --format script -o experiment.py
scitex-notebook convert experiment.ipynb --mode unified -o experiment.py
MCP Server — for AI Agents
| Tool | Description |
|---|---|
notebook_verify |
Verify clew sessions for a notebook |
notebook_check |
Flag untracked scitex.io calls |
notebook_compile |
Return Mermaid DAG / script / JSON |
notebook_convert |
Convert .ipynb to .py |
python -m scitex_notebook.mcp_server
Dependencies
- Required:
scitex-clew— execution-order reconstruction via timestamped sessions. - Optional:
scitex-linter— advanced IO-call rewriting during conversion.
Part of SciTeX
SciTeX Notebook is part of SciTeX.
The SciTeX system follows the Four Freedoms for Research below, inspired by the Free Software Definition:
Four Freedoms for Research
- The freedom to run your research anywhere — your machine, your terms.
- The freedom to study how every step works — from raw data to final manuscript.
- The freedom to redistribute your workflows, not just your papers.
- The freedom to modify any module and share improvements with the community.
AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scitex_notebook-0.1.0.tar.gz.
File metadata
- Download URL: scitex_notebook-0.1.0.tar.gz
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa81b93a34efe68851078edb5eeb15af1ef6d3a5a8fa62766fe44d4f1b61abb6
|
|
| MD5 |
4a295f36375b8f5bb45989b38b828def
|
|
| BLAKE2b-256 |
6c1ca1ce051200802bcf50d167440c5ab26ead531f36b38285e8cc787e5fd9fd
|
File details
Details for the file scitex_notebook-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scitex_notebook-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
784fbc7503d7b1d5c74b4df732647156fad0a21e54a8bd73318f211bc5a06d98
|
|
| MD5 |
9ae2abc9446b5f18560e4b9cf16d0c8a
|
|
| BLAKE2b-256 |
8e22317dbb3523f4ab65d3ba1e9f7f623cb09b8940d1d147269894932d1f03a6
|