Reader#

(nbrefactor.fileops.reader)

File reader

read_notebook(notebook_path)[source]#

Reads the notebook into UnparsedCell objects, separating the code cells from markdown cells.

Parameters:

notebook_path (str) – relative path to the Jupyter notebook.

Returns:

a list of UnparsedCell objects containing both the code cells and markdown cells.

Return type:

list

Raises:
  • FileNotFoundError – If notebook_path does not exist.

  • ValueError – If notebook_path does not point to an .ipynb file.