-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
259 lines (259 loc) · 9.42 KB
/
Copy pathpackage.json
File metadata and controls
259 lines (259 loc) · 9.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
{
"name": "databricks-notebook-studio",
"displayName": "Databricks Notebook Studio",
"description": "Visualize Databricks .py notebooks with rich DataFrame display, interactive tables, column sorting/resizing, and multi-profile authentication",
"version": "0.4.10",
"license": "MIT",
"type": "commonjs",
"publisher": "Harryngdev",
"repository": {
"type": "git",
"url": "https://github.com/QuangNguyen2609/Databricks-Notebook-Extension.git"
},
"icon": "assets/databricks-icon-latest.png",
"engines": {
"vscode": "^1.80.0"
},
"categories": [
"Notebooks",
"Data Science",
"Visualization"
],
"keywords": [
"databricks",
"notebook",
"spark",
"pyspark",
"data engineering",
"jupyter"
],
"activationEvents": [],
"extensionDependencies": [
"ms-python.python",
"databricks.databricks"
],
"main": "./dist/extension.js",
"contributes": {
"notebooks": [
{
"type": "databricks-notebook",
"displayName": "Databricks Notebook",
"selector": [
{
"filenamePattern": "*.py"
}
],
"priority": "option"
}
],
"commands": [
{
"command": "databricks-notebook.openAsNotebook",
"title": "Open as Databricks Notebook",
"category": "Databricks",
"icon": "$(notebook)"
},
{
"command": "databricks-notebook.openAsText",
"title": "View Source",
"category": "Databricks",
"icon": "$(code)"
},
{
"command": "databricks-notebook.restartKernel",
"title": "Restart Kernel",
"category": "Databricks",
"icon": "$(refresh)"
},
{
"command": "databricks-notebook.interruptKernel",
"title": "Interrupt Kernel",
"category": "Databricks",
"icon": "$(debug-stop)"
},
{
"command": "databricks-notebook.selectProfile",
"title": "Select Databricks Profile",
"category": "Databricks",
"icon": "$(cloud)"
},
{
"command": "databricks-notebook.refreshProfiles",
"title": "Refresh Databricks Profiles",
"category": "Databricks",
"icon": "$(refresh)"
}
],
"menus": {
"explorer/context": [
{
"command": "databricks-notebook.openAsNotebook",
"when": "resourceExtname == .py",
"group": "navigation"
}
],
"editor/title": [
{
"command": "databricks-notebook.openAsNotebook",
"when": "resourceExtname == .py && !notebookEditorFocused",
"group": "navigation"
},
{
"command": "databricks-notebook.openAsText",
"when": "resourceExtname == .py && notebookEditorFocused && notebookType == 'databricks-notebook'",
"group": "navigation"
}
],
"editor/title/context": [
{
"command": "databricks-notebook.openAsNotebook",
"when": "resourceExtname == .py",
"group": "navigation"
}
],
"notebook/toolbar": [
{
"command": "databricks-notebook.restartKernel",
"when": "notebookType == 'databricks-notebook'",
"group": "navigation/execute@1"
},
{
"command": "databricks-notebook.interruptKernel",
"when": "notebookType == 'databricks-notebook' && notebookCellExecuting",
"group": "navigation/execute@2"
}
]
},
"configuration": {
"title": "Databricks Notebook Studio",
"properties": {
"databricks-notebook.autoOpenNotebooks": {
"type": "boolean",
"default": false,
"description": "Automatically open detected Databricks notebooks in notebook view"
},
"databricks-notebook.showNotification": {
"type": "boolean",
"default": true,
"description": "Show notification when Databricks notebook is detected"
},
"databricks-notebook.pythonExecutionTimeout": {
"type": "number",
"default": 180000,
"description": "Timeout for Python cell execution in milliseconds (default: 180000ms / 3 minutes)"
},
"databricks-notebook.kernelStartupTimeout": {
"type": "number",
"default": 30000,
"description": "Timeout for kernel startup in milliseconds. With deferred Spark initialization, the kernel typically starts in 1-2 seconds."
},
"databricks-notebook.enableScrollableOutput": {
"type": "boolean",
"default": true,
"description": "Enable scrollable output for large cell outputs (sets notebook.output.scrolling)"
},
"databricks-notebook.defaultProfile": {
"type": "string",
"default": "",
"description": "Default Databricks profile to use on startup. Leave empty to remember last selection."
},
"databricks-notebook.showProfileInStatusBar": {
"type": "boolean",
"default": true,
"description": "Show the current Databricks profile in the status bar"
},
"databricks-notebook.linting.enabled": {
"type": "boolean",
"default": true,
"description": "Enable cross-cell linting for Databricks notebooks"
},
"databricks-notebook.linting.includeDatabricksTypes": {
"type": "boolean",
"default": true,
"description": "Include type stubs for Databricks objects (spark, dbutils, display)"
},
"databricks-notebook.linting.debounceMs": {
"type": "number",
"default": 500,
"description": "Debounce delay for linting updates in milliseconds"
},
"databricks-notebook.intellisense.enabled": {
"type": "boolean",
"default": true,
"description": "Enable IntelliSense for spark, dbutils, and DataFrame methods"
},
"databricks-notebook.intellisense.sparkLiveCompletions": {
"type": "boolean",
"default": true,
"description": "Query kernel for live spark completions (slower but more accurate). When disabled, no spark completions are provided."
},
"databricks-notebook.intellisense.dataFrameCompletions": {
"type": "boolean",
"default": true,
"description": "Enable live variable completions by querying the kernel for methods and properties of any variable."
},
"databricks-notebook.localImports.enabled": {
"type": "boolean",
"default": true,
"description": "Enable local Python module imports from notebook directory and workspace"
},
"databricks-notebook.localImports.discoverPackageRoots": {
"type": "boolean",
"default": true,
"description": "Automatically discover and add package roots (directories containing packages with __init__.py)"
},
"databricks-notebook.dotenvPath": {
"type": "string",
"default": "",
"description": "Custom path to .env file for kernel environment variables. Can be absolute or relative to workspace. If empty, .env files are loaded from notebook directory and workspace root."
},
"databricks-notebook.dataDisplayLimit": {
"type": "number",
"default": 100,
"minimum": 1,
"maximum": 100000,
"description": "Maximum number of rows to display for DataFrames (Spark and Pandas)",
"markdownDescription": "Maximum number of rows to display when rendering **Spark DataFrames** and **Pandas DataFrames** in notebook output.\n\n- **Default:** 100 rows\n- **Range:** 1 - 100,000 rows\n- **Applies to:** Both Spark and Pandas DataFrames\n\n💡 Lower values improve performance for large datasets."
}
},
"configurationDefaults": {
"notebook.output.scrolling": true
}
}
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "webpack",
"watch": "webpack --watch",
"package": "webpack --mode production --devtool hidden-source-map",
"type-check": "tsc --noEmit",
"lint": "eslint src --ext ts --max-warnings 50",
"lint:fix": "eslint src --ext ts --fix",
"test": "node ./out/test/runTest.js",
"test:unit": "tsc --declaration false --declarationMap false && mocha 'out/test/{parser,profileManager,codeTransform,constants,serializer,requestCache,catalogService,tabManager,cellOperations,notebookDiagnosticProvider,persistentExecutor,kernelManager,pythonKernelController,kernelControls,pythonCompletion,linting,localImports,dotenv}.test.js'",
"test:python": "cd src/python && python3 test_kernel_runner.py && python3 test_spark_auth.py",
"test:coverage": "nyc --reporter=lcov --reporter=text npm run test:unit",
"ci": "npm run type-check && npm run lint && npm run test:unit && npm run test:python && npm run compile"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.6",
"@types/node": "^18.x",
"@types/vscode": "^1.80.0",
"@typescript-eslint/eslint-plugin": "^8.x",
"@typescript-eslint/parser": "^8.x",
"@vscode/test-electron": "^2.3.8",
"@vscode/vsce": "^2.x",
"eslint": "^8.x",
"glob": "^13.0.0",
"mocha": "^10.2.0",
"nyc": "^15.x",
"ts-loader": "^9.x",
"ts-node": "^10.9.2",
"typescript": "^5.x",
"webpack": "^5.x",
"webpack-cli": "^5.x",
"copy-webpack-plugin": "^11.x"
}
}