MCPcopy
hub / github.com/deepnote/deepnote / resolveAndConvertToDeepnote

Function resolveAndConvertToDeepnote

packages/cli/src/utils/format-converter.ts:21–40  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

19 * @returns The converted DeepnoteFile with metadata about the conversion
20 */
21export async function resolveAndConvertToDeepnote(path: string): Promise<LoadedRunnableFile> {
22 const { absolutePath, isDirectory } = await resolvePath(path)
23
24 if (isDirectory) {
25 throw new FileResolutionError(
26 'Directory paths are not supported for run.\n\nProvide a path to a specific file (.deepnote, .ipynb, .py, .qmd).'
27 )
28 }
29
30 debug(`Resolved path for run: ${absolutePath}`)
31
32 try {
33 return await loadRunnableFile(absolutePath)
34 } catch (error) {
35 if (error instanceof LoadRunnableFileError) {
36 throw new FileResolutionError(error.message)
37 }
38 throw error
39 }
40}

Callers 3

setupProjectFunction · 0.90
listInputsFunction · 0.90

Calls 3

resolvePathFunction · 0.90
debugFunction · 0.90
loadRunnableFileFunction · 0.90

Tested by

no test coverage detected