Skip to content

feat: Create the @deepnote/convert package for converting Jupyter notebooks to Deepnote notebooks. - #46

Merged
Artmann merged 16 commits into
mainfrom
chris/create-deepnote-convert
Oct 16, 2025
Merged

Artmann merged 16 commits into
mainfrom
chris/create-deepnote-convert

Conversation

@Artmann

@Artmann Artmann commented Oct 16, 2025 •

Copy link
Copy Markdown
Contributor

We'll use this in the VS Code extension to help users migrate from Jupyter notebooks.

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a new conversion package enabling CLI and programmatic conversion of Jupyter notebooks to Deepnote format.
  • Documentation

    • Added comprehensive documentation for the conversion package, including installation, CLI usage, and examples.
  • Chores

    • Updated CI workflow with explicit build steps before typechecking and testing.
    • Enhanced gitignore patterns and spell-check dictionary.

Summary by CodeRabbit

  • New Features

    • Added a new convert package with CLI and programmatic APIs to convert Jupyter notebooks into Deepnote projects.
  • Documentation

    • Added a comprehensive README with installation, CLI usage, options, and examples.
  • Tests

    • Added extensive test suites and notebook fixtures covering single/multi-file conversion, edge cases, deterministic IDs/timestamps, outputs, and end-to-end behavior.
  • Chores

    • CI now builds packages before typechecking/tests; updated ignore patterns, spell-check dictionary, package publish config, and coverage exclusions.

@coderabbitai

coderabbitai Bot commented Oct 16, 2025 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Adds a new package @deepnote/convert that converts Jupyter .ipynb files into Deepnote YAML project files via a CLI and programmatic API. Introduces conversion logic (cells → Deepnote blocks with deterministic sorting keys, UUIDs/timestamps), YAML serialization, file I/O, error handling, tests, fixtures, README, and package metadata (.npmignore, package.json, codecov). Adds a CLI entry (bin.ts) and exports convertIpynbFilesToDeepnoteFile and related types. Also updates CI to run package build steps before typechecking and testing, expands cspell dictionary, and reorders .gitignore entries.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Bin as deepnote-convert (bin.ts)
    participant CLI as convert(options) (cli.ts)
    participant FS as FileSystem
    participant Conv as jupyter-to-deepnote
    participant YAML as YAML Serializer

    User->>Bin: run deepnote-convert <path> [--projectName] [-o output]
    Bin->>CLI: parse flags & call convert(options)

    alt input is directory
        CLI->>FS: read directory, list .ipynb files
        FS-->>CLI: ipynb paths
    else input is single .ipynb
        CLI->>FS: stat/resolve file
        FS-->>CLI: ipynb path
    end

    CLI->>Conv: convertIpynbFilesToDeepnoteFile(paths, opts)
    Conv->>FS: read each .ipynb JSON
    FS-->>Conv: notebook JSON

    loop per notebook
        Conv->>Conv: map cells -> Deepnote blocks (id, sortingKey, executionCount, outputs)
    end

    Conv->>YAML: serialize DeepnoteFile to YAML
    YAML-->>FS: write .deepnote output
    FS-->>CLI: output path
    CLI-->>User: print success and path
Loading
sequenceDiagram
    participant Conv as jupyter-to-deepnote
    participant Cell as IPYNB Cell
    participant Block as Deepnote Block

    Conv->>Cell: iterate cell
    alt markdown
        Cell->>Block: produce markdown block (content)
    else code
        Cell->>Block: produce code block (content, executionCount, outputs)
    end
    Block-->>Conv: block with id + sortingKey
    Conv->>Conv: assemble notebook & project metadata
Loading

Possibly related PRs

Suggested reviewers

  • andyjakubowski
  • saltenasl

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely reflects the primary change by stating the creation of the @deepnote/convert package and its purpose of converting Jupyter notebooks to Deepnote format, matching the scope of the pull request.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b4c6655 and 26bdf4c.

📒 Files selected for processing (1)
  • packages/convert/src/jupyter-to-deepnote.test.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
packages/*/src/**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/*/src/**/*.test.{ts,tsx}: Place test files next to the source files with .test.ts or .test.tsx extension
Use Vitest as the testing framework for all tests
Import { describe, expect, it } from 'vitest' in tests
Use dedent from ts-dedent for multiline string comparisons in tests
Follow existing test patterns (see packages/blocks/src/blocks/*.test.ts); write clear names, group with describe(), cover edge cases, errors, special characters, and verify exact output for code-generation functions

Files:

  • packages/convert/src/jupyter-to-deepnote.test.ts
packages/*/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/*/src/**/*.{ts,tsx}: Use strict type checking and prefer type safety over convenience
Use const for immutable values
Avoid any; use proper type definitions and type guards

Files:

  • packages/convert/src/jupyter-to-deepnote.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Follow Biome's lint rules as configured in biome.json
Use literal keys (dot notation) instead of bracket notation when possible
Prefer single quotes for strings (except when avoiding escapes)

Files:

  • packages/convert/src/jupyter-to-deepnote.test.ts
packages/*/src/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Place source code under packages/*/src/

Files:

  • packages/convert/src/jupyter-to-deepnote.test.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteDataConverter.ts : deepnoteDataConverter.ts performs Deepnote data transformations
🔇 Additional comments (1)
packages/convert/src/jupyter-to-deepnote.test.ts (1)

9-25: UUID counter fix implemented correctly.

The __resetCounter function is now attached to the mock (lines 17-20) and invoked in beforeEach (line 119), resolving the test isolation issue flagged previously.


Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Oct 16, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.75904% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.91%. Comparing base (b381064) to head (26bdf4c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/convert/src/jupyter-to-deepnote.ts 89.01% 10 Missing ⚠️
packages/convert/src/cli.ts 90.54% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
- Coverage   93.77%   92.91%   -0.86%     
==========================================
  Files          21       24       +3     
  Lines         610      776     +166     
  Branches      182      222      +40     
==========================================
+ Hits          572      721     +149     
- Misses         38       55      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread .github/workflows/ci.yml
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build packages

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required as we have dependecies between the packages in the mono repo.

@Artmann
Artmann marked this pull request as ready for review October 16, 2025 12:22

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 71be5b5 and 48344ed.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • .github/workflows/ci.yml (2 hunks)
  • .gitignore (1 hunks)
  • cspell.json (1 hunks)
  • packages/convert/.npmignore (1 hunks)
  • packages/convert/README.md (1 hunks)
  • packages/convert/package.json (1 hunks)
  • packages/convert/src/__fixtures__/notebook1.ipynb (1 hunks)
  • packages/convert/src/__fixtures__/notebook2.ipynb (1 hunks)
  • packages/convert/src/__fixtures__/simple.ipynb (1 hunks)
  • packages/convert/src/__fixtures__/titanic-tutorial.ipynb (1 hunks)
  • packages/convert/src/cli.test.ts (1 hunks)
  • packages/convert/src/cli.ts (1 hunks)
  • packages/convert/src/index.ts (1 hunks)
  • packages/convert/src/jupyter-to-deepnote.test.ts (1 hunks)
  • packages/convert/src/jupyter-to-deepnote.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
packages/*/src/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Place source code under packages/*/src/

Files:

  • packages/convert/src/__fixtures__/notebook2.ipynb
  • packages/convert/src/index.ts
  • packages/convert/src/__fixtures__/notebook1.ipynb
  • packages/convert/src/__fixtures__/simple.ipynb
  • packages/convert/src/cli.ts
  • packages/convert/src/jupyter-to-deepnote.ts
  • packages/convert/src/cli.test.ts
  • packages/convert/src/__fixtures__/titanic-tutorial.ipynb
  • packages/convert/src/jupyter-to-deepnote.test.ts
packages/*/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/*/src/**/*.{ts,tsx}: Use strict type checking and prefer type safety over convenience
Use const for immutable values
Avoid any; use proper type definitions and type guards

Files:

  • packages/convert/src/index.ts
  • packages/convert/src/cli.ts
  • packages/convert/src/jupyter-to-deepnote.ts
  • packages/convert/src/cli.test.ts
  • packages/convert/src/jupyter-to-deepnote.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Follow Biome's lint rules as configured in biome.json
Use literal keys (dot notation) instead of bracket notation when possible
Prefer single quotes for strings (except when avoiding escapes)

Files:

  • packages/convert/src/index.ts
  • packages/convert/src/cli.ts
  • packages/convert/src/jupyter-to-deepnote.ts
  • packages/convert/src/cli.test.ts
  • packages/convert/src/jupyter-to-deepnote.test.ts
**/*.{md,yml,yaml}

📄 CodeRabbit inference engine (CLAUDE.md)

Use Prettier formatting for Markdown and YAML files

Files:

  • packages/convert/README.md
packages/*/src/**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/*/src/**/*.test.{ts,tsx}: Place test files next to the source files with .test.ts or .test.tsx extension
Use Vitest as the testing framework for all tests
Import { describe, expect, it } from 'vitest' in tests
Use dedent from ts-dedent for multiline string comparisons in tests
Follow existing test patterns (see packages/blocks/src/blocks/*.test.ts); write clear names, group with describe(), cover edge cases, errors, special characters, and verify exact output for code-generation functions

Files:

  • packages/convert/src/cli.test.ts
  • packages/convert/src/jupyter-to-deepnote.test.ts
🧠 Learnings (4)
📚 Learning: 2025-09-03T12:59:14.489Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/notebooks.instructions.md:0-0
Timestamp: 2025-09-03T12:59:14.489Z
Learning: Applies to src/notebooks/export/**/*.ts : Update FileConverter to handle the new export format

Applied to files:

  • packages/convert/src/index.ts
  • packages/convert/src/cli.ts
  • packages/convert/src/jupyter-to-deepnote.ts
  • packages/convert/src/jupyter-to-deepnote.test.ts
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteDataConverter.ts : deepnoteDataConverter.ts performs Deepnote data transformations

Applied to files:

  • packages/convert/src/index.ts
  • packages/convert/README.md
  • packages/convert/src/cli.ts
  • packages/convert/src/jupyter-to-deepnote.ts
  • packages/convert/src/jupyter-to-deepnote.test.ts
📚 Learning: 2025-09-03T12:54:35.368Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/interactiveWindow.instructions.md:0-0
Timestamp: 2025-09-03T12:54:35.368Z
Learning: Applies to src/interactive-window/**/*.ts : Add unit and integration tests for new features and modifications; include performance and cross-platform test coverage

Applied to files:

  • packages/convert/src/cli.test.ts
📚 Learning: 2025-10-14T13:43:36.364Z
Learnt from: CR
PR: deepnote/deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-14T13:43:36.364Z
Learning: Applies to packages/*/src/**/*.test.{ts,tsx} : Follow existing test patterns (see packages/blocks/src/blocks/*.test.ts); write clear names, group with describe(), cover edge cases, errors, special characters, and verify exact output for code-generation functions

Applied to files:

  • packages/convert/src/cli.test.ts
  • packages/convert/src/jupyter-to-deepnote.test.ts
🧬 Code graph analysis (2)
packages/convert/src/cli.ts (2)
packages/convert/src/index.ts (1)
  • convertIpynbFilesToDeepnoteFile (1-1)
packages/convert/src/jupyter-to-deepnote.ts (1)
  • convertIpynbFilesToDeepnoteFile (26-84)
packages/convert/src/jupyter-to-deepnote.test.ts (1)
packages/convert/src/jupyter-to-deepnote.ts (1)
  • convertIpynbFilesToDeepnoteFile (26-84)
🔇 Additional comments (27)
cspell.json (1)

56-61: Dictionary additions LGTM

No issues; useful additions for this repo’s domain.

packages/convert/.npmignore (1)

1-9: Confirm sourcemaps vs excluding src/

If dist .map files reference ../src, publishing without src/ breaks debugging. Either inline sources in maps, disable maps, or include src/.

packages/convert/package.json (1)

23-25: CLI shebang

Ensure dist/cli.js preserves a shebang (#!/usr/bin/env node). Without it, the bin may not be executable from PATH.

packages/convert/src/__fixtures__/notebook2.ipynb (1)

1-19: Fixture LGTM

Clear minimal notebook for tests.

packages/convert/src/__fixtures__/notebook1.ipynb (1)

1-19: Fixture LGTM

No issues.

packages/convert/src/__fixtures__/simple.ipynb (1)

1-26: Fixture LGTM

Good variety for conversion tests.

.github/workflows/ci.yml (1)

102-104: Build script scope verified
pnpm run build invokes the recursive build (pnpm -r run build) and covers all workspaces.

packages/convert/src/cli.ts (1)

4-7: Verify ESM/CJS entrypoints in package.json

  • packages/convert/package.json sets "type": "module" but main points at dist/index.cjs, and dependencies chalk@5, ora@9, uuid@13 are ESM-only → a require() on them will ERR_REQUIRE_ESM. Remove or rebuild the CJS entry (or switch main to the ESM build) to ensure runtime compatibility.
packages/convert/src/jupyter-to-deepnote.ts (7)

1-5: LGTM!

Imports follow ESM conventions and use named exports correctly.


7-24: LGTM!

Interface definitions correctly model Jupyter notebook structure. The biome-ignore for outputs is appropriate given the varied nature of Jupyter cell outputs.


30-43: LGTM!

DeepnoteFile initialization is correct with appropriate defaults.


53-69: LGTM!

Cell-to-block conversion correctly handles source arrays, execution counts, and outputs. Type mapping is accurate.


71-78: LGTM!

Notebook structure is correctly assembled with appropriate defaults.


81-83: LGTM!

YAML serialization and file writing are correct.


86-111: LGTM!

Bijective base-36 implementation is correct with proper validation and overflow protection.

packages/convert/src/jupyter-to-deepnote.test.ts (12)

1-20: LGTM!

Test setup correctly mocks UUID generation for deterministic tests while preserving actual UUID functions.


22-95: LGTM!

Sorting key tests comprehensively verify bijective base-36 behavior and uniqueness across a range of indices.


110-159: LGTM!

Basic conversion test thoroughly validates file structure, notebook metadata, and block content with precise assertions.


161-176: LGTM!

Dedicated test for array source handling makes the edge case explicit.


178-209: LGTM!

Null execution_count handling is correctly tested with inline fixture.


211-242: LGTM!

Multi-notebook conversion test validates correct merging and content preservation.


244-279: LGTM!

Real-world notebook test validates practical conversion with appropriate spot-checks rather than exhaustive assertions.


281-306: LGTM!

UUID generation test ensures all entities receive identifiers.


308-324: LGTM!

Timestamp validation with round-trip check ensures ISO format compliance.


326-345: LGTM!

YAML validity test ensures deserializer can parse the output.


347-390: LGTM!

Output preservation test validates exact structure retention for code cell outputs.


392-422: LGTM!

Markdown cell test correctly validates output field omission.

Comment thread .gitignore Resolved
Comment thread packages/convert/package.json Resolved
Comment thread packages/convert/README.md Resolved
Comment thread packages/convert/src/cli.test.ts Resolved
Comment thread packages/convert/src/cli.ts Resolved
Comment thread packages/convert/src/cli.ts Resolved
Comment thread packages/convert/src/index.ts Resolved
@Artmann
Artmann marked this pull request as draft October 16, 2025 12:24
@Artmann

Artmann commented Oct 16, 2025 •

Copy link
Copy Markdown
Contributor Author

@coderabbitai Can you review this again with the latest changes?

@coderabbitai

coderabbitai Bot commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

@Artmann: I'll review the latest changes in this PR.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

1 similar comment
@coderabbitai

coderabbitai Bot commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

@Artmann: I'll review the latest changes in this PR.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Artmann Artmann closed this Oct 16, 2025
@Artmann Artmann reopened this Oct 16, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8697d42 and 6e8258f.

📒 Files selected for processing (1)
  • .gitignore (1 hunks)
🔇 Additional comments (1)
.gitignore (1)

1-10: Deduplication resolved. LGTM.

Entries are now canonical and non-duplicated.

Comment thread .gitignore Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e8258f and 63566e3.

📒 Files selected for processing (2)
  • packages/convert/src/cli.ts (1 hunks)
  • packages/convert/src/jupyter-to-deepnote.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
packages/*/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/*/src/**/*.{ts,tsx}: Use strict type checking and prefer type safety over convenience
Use const for immutable values
Avoid any; use proper type definitions and type guards

Files:

  • packages/convert/src/jupyter-to-deepnote.ts
  • packages/convert/src/cli.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Follow Biome's lint rules as configured in biome.json
Use literal keys (dot notation) instead of bracket notation when possible
Prefer single quotes for strings (except when avoiding escapes)

Files:

  • packages/convert/src/jupyter-to-deepnote.ts
  • packages/convert/src/cli.ts
packages/*/src/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Place source code under packages/*/src/

Files:

  • packages/convert/src/jupyter-to-deepnote.ts
  • packages/convert/src/cli.ts
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteDataConverter.ts : deepnoteDataConverter.ts performs Deepnote data transformations
📚 Learning: 2025-10-09T11:21:57.494Z
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteDataConverter.ts : deepnoteDataConverter.ts performs Deepnote data transformations

Applied to files:

  • packages/convert/src/jupyter-to-deepnote.ts
  • packages/convert/src/cli.ts
📚 Learning: 2025-09-03T12:59:14.489Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/notebooks.instructions.md:0-0
Timestamp: 2025-09-03T12:59:14.489Z
Learning: Applies to src/notebooks/export/**/*.ts : Update FileConverter to handle the new export format

Applied to files:

  • packages/convert/src/jupyter-to-deepnote.ts
📚 Learning: 2025-09-03T12:59:14.489Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/notebooks.instructions.md:0-0
Timestamp: 2025-09-03T12:59:14.489Z
Learning: Applies to src/notebooks/export/**/*.ts : On conversion failures, provide detailed error reporting with suggested fixes

Applied to files:

  • packages/convert/src/jupyter-to-deepnote.ts
📚 Learning: 2025-09-03T12:56:39.535Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/kernel-jupyter.instructions.md:0-0
Timestamp: 2025-09-03T12:56:39.535Z
Learning: Applies to src/kernels/jupyter/interpreter/**/*.ts : Verify nbconvert availability for export features, handling platform-specific requirements

Applied to files:

  • packages/convert/src/jupyter-to-deepnote.ts
📚 Learning: 2025-09-03T12:59:14.489Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/notebooks.instructions.md:0-0
Timestamp: 2025-09-03T12:59:14.489Z
Learning: Applies to src/notebooks/export/**/*.ts : Gracefully handle file system issues (permissions/space) during export operations

Applied to files:

  • packages/convert/src/jupyter-to-deepnote.ts
🧬 Code graph analysis (1)
packages/convert/src/cli.ts (2)
packages/convert/src/jupyter-to-deepnote.ts (1)
  • convertIpynbFilesToDeepnoteFile (26-82)
packages/convert/src/index.ts (1)
  • convertIpynbFilesToDeepnoteFile (2-2)

Comment thread packages/convert/src/cli.ts Resolved
Comment thread packages/convert/src/cli.ts Resolved
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 16, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e18ff0a and b4c6655.

📒 Files selected for processing (2)
  • cspell.json (1 hunks)
  • packages/convert/src/jupyter-to-deepnote.test.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
packages/*/src/**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/*/src/**/*.test.{ts,tsx}: Place test files next to the source files with .test.ts or .test.tsx extension
Use Vitest as the testing framework for all tests
Import { describe, expect, it } from 'vitest' in tests
Use dedent from ts-dedent for multiline string comparisons in tests
Follow existing test patterns (see packages/blocks/src/blocks/*.test.ts); write clear names, group with describe(), cover edge cases, errors, special characters, and verify exact output for code-generation functions

Files:

  • packages/convert/src/jupyter-to-deepnote.test.ts
packages/*/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/*/src/**/*.{ts,tsx}: Use strict type checking and prefer type safety over convenience
Use const for immutable values
Avoid any; use proper type definitions and type guards

Files:

  • packages/convert/src/jupyter-to-deepnote.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Follow Biome's lint rules as configured in biome.json
Use literal keys (dot notation) instead of bracket notation when possible
Prefer single quotes for strings (except when avoiding escapes)

Files:

  • packages/convert/src/jupyter-to-deepnote.test.ts
packages/*/src/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Place source code under packages/*/src/

Files:

  • packages/convert/src/jupyter-to-deepnote.test.ts
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: deepnote/vscode-deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-09T11:21:57.494Z
Learning: Applies to src/notebooks/deepnote/deepnoteDataConverter.ts : deepnoteDataConverter.ts performs Deepnote data transformations
📚 Learning: 2025-10-14T13:43:36.364Z
Learnt from: CR
PR: deepnote/deepnote#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-14T13:43:36.364Z
Learning: Applies to packages/*/src/**/*.test.{ts,tsx} : Follow existing test patterns (see packages/blocks/src/blocks/*.test.ts); write clear names, group with describe(), cover edge cases, errors, special characters, and verify exact output for code-generation functions

Applied to files:

  • packages/convert/src/jupyter-to-deepnote.test.ts
📚 Learning: 2025-09-03T12:54:35.368Z
Learnt from: CR
PR: deepnote/vscode-extension#0
File: .github/instructions/interactiveWindow.instructions.md:0-0
Timestamp: 2025-09-03T12:54:35.368Z
Learning: Applies to src/interactive-window/**/*.ts : Add unit and integration tests for new features and modifications; include performance and cross-platform test coverage

Applied to files:

  • packages/convert/src/jupyter-to-deepnote.test.ts
🧬 Code graph analysis (1)
packages/convert/src/jupyter-to-deepnote.test.ts (2)
packages/convert/src/index.ts (1)
  • convertIpynbFilesToDeepnoteFile (2-2)
packages/convert/src/jupyter-to-deepnote.ts (1)
  • convertIpynbFilesToDeepnoteFile (29-89)

Comment thread cspell.json Resolved
@Artmann
Artmann marked this pull request as ready for review October 16, 2025 14:59

@saltenasl saltenasl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! one nit

Comment on lines +14 to +15
counter++
return `test-uuid-${counter.toString().padStart(3, '0')}`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't use counter tbf because if i add a new test at the beginning of the file it will require me to regenerate all of the snapshots after that test because the counter would be incremented in those

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants