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

Function applyInputOverrides

packages/cli/src/commands/run.ts:597–610  ·  view source on GitHub ↗
(file: DeepnoteFile, inputs: Record<string, unknown>)

Source from the content-addressed store, hash-verified

595 * instead of their saved values.
596 */
597export function applyInputOverrides(file: DeepnoteFile, inputs: Record<string, unknown>): void {
598 if (Object.keys(inputs).length === 0) return
599
600 for (const notebook of file.project.notebooks) {
601 for (const block of notebook.blocks) {
602 if (!block.type.startsWith('input-')) continue
603 const metadata = block.metadata as Record<string, unknown>
604 const varName = metadata.deepnote_variable_name as string | undefined
605 if (varName && Object.hasOwn(inputs, varName)) {
606 metadata.deepnote_variable_value = inputs[varName]
607 }
608 }
609 }
610}
611
612/** Information about an input block */
613interface InputInfo {

Callers 2

run.test.tsFile · 0.90
runDeepnoteProjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected