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

Function createStatsAction

packages/cli/src/commands/stats.ts:23–35  ·  view source on GitHub ↗
(
  _program: Command
)

Source from the content-addressed store, hash-verified

21 * Creates the stats action - displays statistics about a .deepnote file.
22 */
23export function createStatsAction(
24 _program: Command
25): (path: string | undefined, options: StatsOptions) => Promise<void> {
26 return async (path, options) => {
27 try {
28 debug(`Analyzing stats for: ${path}`)
29 const stats = await computeStats(path, options)
30 outputStats(stats, options)
31 } catch (error) {
32 handleError(error, options)
33 }
34 }
35}
36
37async function computeStats(path: string | undefined, options: StatsOptions): Promise<StatsFileResult> {
38 const { absolutePath } = await resolvePathToDeepnoteFile(path)

Callers 2

registerCommandsFunction · 0.90
stats.test.tsFile · 0.90

Calls 4

debugFunction · 0.90
outputStatsFunction · 0.85
computeStatsFunction · 0.70
handleErrorFunction · 0.70

Tested by

no test coverage detected