-
Notifications
You must be signed in to change notification settings - Fork 4
fix: init notebook execution on windows #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughModified the init notebook runner to handle cross-platform compatibility. Added two new constants distinguishing Deepnote cloud and VSCode initialization block contents. When executing notebook blocks on Windows, the system detects if a block contains Deepnote cloud initialization content, replaces it with VSCode-compatible Python content, and proceeds with execution. This allows dependency installation to work on Windows in addition to Linux/macOS environments. Sequence DiagramsequenceDiagram
participant runner as Init Notebook Runner
participant block as Code Block
participant logger as Logger
runner->>block: Retrieve block content
runner->>runner: Check if Windows platform
alt Windows & Deepnote Cloud Init Content
runner->>runner: Replace with VSCode Python content
runner->>logger: Log content replacement
rect rgb(240, 248, 255)
Note over runner: Platform adaptation
end
end
runner->>runner: Execute blockContent (original or replaced)
alt Execution Success
runner->>logger: Log success
else Execution Error
runner->>logger: Log error & continue
end
Pre-merge checks✅ Passed checks (4 passed)
Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
=====================================
- Coverage 73% 73% -1%
=====================================
Files 574 574
Lines 46677 46684 +7
Branches 5512 5513 +1
=====================================
+ Hits 34213 34215 +2
- Misses 10652 10657 +5
Partials 1812 1812
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/notebooks/deepnote/deepnoteInitNotebookRunner.node.ts(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/notebooks/deepnote/deepnoteInitNotebookRunner.node.ts (1)
src/platform/logging/index.ts (1)
logger(35-48)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build & Test
🔇 Additional comments (1)
src/notebooks/deepnote/deepnoteInitNotebookRunner.node.ts (1)
272-285: Code is correct; brittleness concern doesn't apply.The exact string match is sound because
DEEPNOTE_CLOUD_INIT_NOTEBOOK_BLOCK_CONTENTis a fixed constant from a single location, properly trimmed, with no competing bash-based init blocks in the codebase. The Windows-specific replacement logic is appropriate.
|
@coderabbitai resolve |
✅ Actions performedComments resolved and changes approved. |
Deepnote Cloud creates init notebooks with pre-defined bash script for installation of dependencies. The problem is that bash doesn't run on Windows by default.
The solution is to replace the pre-defined bash script with cross-platform python script.
Summary by CodeRabbit
Bug Fixes
New Features