MCPcopy Index your code
hub / github.com/deepnote/deepnote / readAndConvertIpynbFile

Function readAndConvertIpynbFile

packages/convert/src/jupyter-to-deepnote.ts:146–162  ·  view source on GitHub ↗
(
  inputFilePath: string,
  options: ReadAndConvertIpynbFileOptions
)

Source from the content-addressed store, hash-verified

144 * @returns A DeepnoteFile object
145 */
146export async function readAndConvertIpynbFile(
147 inputFilePath: string,
148 options: ReadAndConvertIpynbFileOptions
149): Promise<DeepnoteFile> {
150 const notebook = await parseIpynbFile(inputFilePath)
151
152 return convertJupyterNotebookToDeepnote(
153 {
154 filename: basename(inputFilePath),
155 notebook,
156 },
157 {
158 projectId: options.projectId,
159 projectName: options.projectName,
160 }
161 )
162}
163
164/**
165 * Converts a single Jupyter Notebook (.ipynb) file into a Deepnote project file.

Callers 3

readAndConvertOneFunction · 0.90

Calls 2

parseIpynbFileFunction · 0.85

Tested by

no test coverage detected