Skip to main content

cjm-notebook-decompose-core

A Jupyter/nbdev notebook decomposition core for context graphs: a notebook IS a CodeModule whose authored source is an ordered sequence of VERBATIM cells (the lossless source substrate), composing the python decomposer (code cells -> symbols) and the markdown decomposer (markdown cells -> prose) with interleaving edges. The first step toward graph-as-source-of-truth (notebook -> graph).

Modules

  • cjm_notebook_decompose_core.__init__
  • cjm_notebook_decompose_core.compose — Compose a parsed notebook onto dev-graph-schema nodes (the compositor).
  • cjm_notebook_decompose_core.ingest — Flatten decomposed notebooks into graph elements (the queue-free half).
  • cjm_notebook_decompose_core.project — Project a notebook BACK out of the graph (graph -> .ipynb) — the round-trip leg.
  • cjm_notebook_decompose_core.read — Schema-free Jupyter/nbdev notebook parsing (stdlib json).

API

cjm_notebook_decompose_core.compose

  • DecomposedNotebook class — A notebook bound to schema nodes: the module + verbatim cells + code symbols + edges.
  • decompose_notebook function — Bind a parsed notebook onto a notebook CodeModule + verbatim cells + symbols + edges.
  • decompose_notebook_file function — Read + decompose a notebook file (module path from default_exp/package, else the path).
  • module_path_for_notebook function — Pick the notebook module path: the export target when known, else the .ipynb path.

cjm_notebook_decompose_core.ingest

  • notebook_graph_elements function — Collect decomposed notebooks into the node + edge wire-dict lists for extend_graph.

cjm_notebook_decompose_core.project

  • cells_for_module function — Filter queried Cell nodes down to one notebook module (by module_id property).
  • notebook_dict_from_cells function — Rebuild the .ipynb JSON from verbatim cells (ordered by index).
  • render_notebook function — Serialize regenerated cells to .ipynb JSON text.

cjm_notebook_decompose_core.read

  • ParsedCell class — One notebook cell, parsed but not yet schema-bound.
  • ParsedNotebook class — The structural decomposition of one notebook.
  • parse_directives function — Extract nbdev #| directive bodies (the text after #|) from a cell.
  • parse_notebook function — Parse a notebook's JSON into ordered cells + the #| default_exp target.
  • parse_notebook_file function — Read + parse a notebook file (UTF-8).

Dependencies

Depends on: cjm-context-graph-layer, cjm-context-graph-primitives, cjm-dev-graph-schema, cjm-markdown-decompose-core, cjm-python-decompose-core Used by: cjm-context-graph-projection

Metadata

Release files for cjm-notebook-decompose-core 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cjm-notebook-decompose-core 0.0.5
File Size Uploaded Provenance
cjm_notebook_decompose_core-0.0.5.tar.gz 19.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cjm-notebook-decompose-core 0.0.5
File Interpreter ABI Platform
cjm_notebook_decompose_core-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 36.7 kB

Release files / cjm_notebook_decompose_core-0.0.5.tar.gz

Download URL cjm_notebook_decompose_core-0.0.5.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f74d2d8e1e15d6fe7677c653b67be93abe653829f24d27bbd41a9448f7558417
BLAKE2b-256 checksum
How to use checksums
b2e1cb279010cdb9291964fd10adf9344ceb83608db2e3652041271b97c30fef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / cjm_notebook_decompose_core-0.0.5-py3-none-any.whl

Download URL cjm_notebook_decompose_core-0.0.5-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82112b9f4a6ef77af29779a234d72754af3ca4092ed2c2886f9164cf5d746bd7
BLAKE2b-256 checksum
How to use checksums
36a0740fe18eb64c16880c34b53e92533227b28d59866319060557eb9844d2f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for cjm-notebook-decompose-core 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page