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

Function convertMarimoAppToBlocks

packages/convert/src/marimo-to-deepnote.ts:347–356  ·  view source on GitHub ↗
(app: MarimoApp, options?: ConvertMarimoAppOptions)

Source from the content-addressed store, hash-verified

345 * @returns Array of DeepnoteBlock objects
346 */
347export function convertMarimoAppToBlocks(app: MarimoApp, options?: ConvertMarimoAppOptions): DeepnoteBlock[] {
348 const idGenerator = options?.idGenerator ?? randomUUID
349 const outputs = options?.outputs
350 return app.cells.map((cell, index) => {
351 // Compute code hash of cell content to match against session cache
352 const codeHash = computeCodeHash(cell.content)
353 const cellOutputs = outputs?.get(codeHash)
354 return convertCellToBlock(cell, index, idGenerator, cellOutputs)
355 })
356}
357
358export interface ConvertMarimoAppToDeepnoteOptions {
359 /** Project name for the Deepnote file */

Calls 2

computeCodeHashFunction · 0.85
convertCellToBlockFunction · 0.70

Tested by

no test coverage detected