Skip to content

Commit bfa3c82

Browse files
Merge fixes into July release (#12889)
Co-authored-by: Timothy Ruscica <[email protected]>
1 parent 7bb4c50 commit bfa3c82

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1145
-458
lines changed

build/ci/vscode-python-pr-validation.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ stages:
5656
'DataScience':
5757
TestsToRun: 'testDataScience'
5858
NeedsPythonTestReqs: true
59+
NeedsPythonFunctionalReqs: true
5960
'Smoke':
6061
TestsToRun: 'testSmoke'
6162
NeedsPythonTestReqs: true

gulpfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ gulp.task('webpack', async () => {
177177
await buildWebPackForDevOrProduction('./build/webpack/webpack.datascience-ui-notebooks.config.js', 'production');
178178
await buildWebPackForDevOrProduction('./build/webpack/webpack.datascience-ui-viewers.config.js', 'production');
179179
await buildWebPackForDevOrProduction('./build/webpack/webpack.extension.config.js', 'extension');
180+
await buildWebPackForDevOrProduction('./build/webpack/webpack.datascience-ui-renderers.config.js', 'production');
180181
});
181182

182183
gulp.task('updateBuildNumber', async () => {

news/1 Enhancements/10496.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Opening notebooks in the preview Notebook editor for [Visual Studio Code Insiders](https://code.visualstudio.com/insiders/).
2+
* Install Python extension in the latest [Visual Studio Code Insiders](https://code.visualstudio.com/insiders/).
3+
* Wait for `Python Extension` to get activated (e.g. open a `Python` file).
4+
* Right click on an `*.ipynb (Jupyter Notebook)` file and select `Open in preview Notebook Editor`.

news/3 Code Health/12844.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update categories in `package.json`.

package.json

Lines changed: 108 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"languageServerVersion": "0.5.30",
1010
"publisher": "ms-python",
11-
"enableProposedApi": false,
11+
"enableProposedApi": true,
1212
"author": {
1313
"name": "Microsoft Corporation"
1414
},
@@ -28,7 +28,7 @@
2828
"theme": "dark"
2929
},
3030
"engines": {
31-
"vscode": "^1.46.0"
31+
"vscode": "^1.47.0"
3232
},
3333
"keywords": [
3434
"python",
@@ -43,7 +43,10 @@
4343
"Snippets",
4444
"Formatters",
4545
"Other",
46-
"Extension Packs"
46+
"Extension Packs",
47+
"Data Science",
48+
"Machine Learning",
49+
"Notebooks"
4750
],
4851
"activationEvents": [
4952
"onLanguage:python",
@@ -60,6 +63,7 @@
6063
"onCommand:python.viewTestOutput",
6164
"onCommand:python.viewOutput",
6265
"onCommand:python.datascience.viewJupyterOutput",
66+
"onCOmmand:python.datascience.export",
6367
"onCommand:python.datascience.exportAsPythonScript",
6468
"onCommand:python.datascience.exportToHTML",
6569
"onCommand:python.datascience.exportToPDF",
@@ -358,6 +362,15 @@
358362
"title": "%python.command.python.datascience.viewJupyterOutput.title%",
359363
"category": "Python"
360364
},
365+
{
366+
"command": "python.datascience.export",
367+
"title": "%DataScience.notebookExportAs%",
368+
"category": "Python",
369+
"icon": {
370+
"light": "resources/light/export_to_python.svg",
371+
"dark": "resources/dark/export_to_python.svg"
372+
}
373+
},
361374
{
362375
"command": "python.datascience.exportAsPythonScript",
363376
"title": "%python.command.python.datascience.exportAsPythonScript.title%",
@@ -681,6 +694,25 @@
681694
},
682695
"enablement": "python.datascience.notebookeditor.canrestartNotebookkernel"
683696
},
697+
{
698+
"command": "python.datascience.notebookeditor.trust",
699+
"title": "%DataScience.trustNotebookCommandTitle%",
700+
"category": "Python",
701+
"icon": {
702+
"light": "resources/light/un-trusted.svg",
703+
"dark": "resources/dark/un-trusted.svg"
704+
},
705+
"enablement": "notebookEditorFocused && !python.datascience.isnotebooktrusted && python.datascience.trustfeatureenabled"
706+
},
707+
{
708+
"command": "python.datascience.notebookeditor.trusted",
709+
"title": "%DataScience.notebookIsTrusted%",
710+
"category": "Python",
711+
"icon": {
712+
"light": "resources/light/trusted.svg",
713+
"dark": "resources/dark/trusted.svg"
714+
}
715+
},
684716
{
685717
"command": "python.datascience.notebookeditor.runallcells",
686718
"title": "%python.command.python.datascience.notebookeditor.runallcells.title%",
@@ -846,6 +878,24 @@
846878
"title": "%python.command.python.datascience.restartkernel.title%",
847879
"group": "navigation",
848880
"when": "notebookEditorFocused"
881+
},
882+
{
883+
"command": "python.datascience.notebookeditor.trust",
884+
"title": "%DataScience.trustNotebookCommandTitle%",
885+
"group": "navigation@1",
886+
"when": "notebookEditorFocused && !python.datascience.isnotebooktrusted && python.datascience.trustfeatureenabled"
887+
},
888+
{
889+
"command": "python.datascience.notebookeditor.trusted",
890+
"title": "%DataScience.notebookIsTrusted%",
891+
"group": "navigation@1",
892+
"when": "notebookEditorFocused && python.datascience.isnotebooktrusted && python.datascience.trustfeatureenabled"
893+
},
894+
{
895+
"command": "python.datascience.export",
896+
"title": "%DataScience.notebookExportAs%",
897+
"group": "navigation",
898+
"when": "notebookEditorFocused"
849899
}
850900
],
851901
"explorer/context": [
@@ -1119,6 +1169,18 @@
11191169
"category": "Python",
11201170
"when": "python.datascience.isnativeactive && python.datascience.featureenabled && python.datascience.isnotebooktrusted"
11211171
},
1172+
{
1173+
"command": "python.datascience.notebookeditor.trust",
1174+
"title": "%DataScience.trustNotebookCommandTitle%",
1175+
"category": "Python",
1176+
"when": "python.datascience.featureenabled && notebookEditorFocused && !python.datascience.isnotebooktrusted && python.datascience.trustfeatureenabled"
1177+
},
1178+
{
1179+
"command": "python.datascience.notebookeditor.trusted",
1180+
"title": "%DataScience.notebookIsTrusted%",
1181+
"category": "Python",
1182+
"when": "config.noExists"
1183+
},
11221184
{
11231185
"command": "python.datascience.notebookeditor.runallcells",
11241186
"title": "%python.command.python.datascience.notebookeditor.runallcells.title%",
@@ -1233,6 +1295,12 @@
12331295
"title": "%DataScience.gatherQuality%",
12341296
"category": "Python",
12351297
"when": "false"
1298+
},
1299+
{
1300+
"command": "python.datascience.export",
1301+
"title": "%DataScience.notebookExportAs%",
1302+
"category": "Python",
1303+
"when": "false"
12361304
}
12371305
],
12381306
"view/title": [
@@ -3085,7 +3153,43 @@
30853153
"when": "testsDiscovered"
30863154
}
30873155
]
3088-
}
3156+
},
3157+
"notebookOutputRenderer": [
3158+
{
3159+
"viewType": "jupyter-notebook-renderer",
3160+
"displayName": "Jupyter Notebook Renderer",
3161+
"mimeTypes": [
3162+
"application/geo+json",
3163+
"application/vdom.v1+json",
3164+
"application/vnd.dataresource+json",
3165+
"application/vnd.plotly.v1+json",
3166+
"application/vnd.vega.v2+json",
3167+
"application/vnd.vega.v3+json",
3168+
"application/vnd.vega.v4+json",
3169+
"application/vnd.vega.v5+json",
3170+
"application/vnd.vegalite.v1+json",
3171+
"application/vnd.vegalite.v2+json",
3172+
"application/vnd.vegalite.v3+json",
3173+
"application/vnd.vegalite.v4+json",
3174+
"application/x-nteract-model-debug+json",
3175+
"image/gif",
3176+
"text/latex",
3177+
"text/vnd.plotly.v1+html"
3178+
]
3179+
}
3180+
],
3181+
"notebookProvider": [
3182+
{
3183+
"viewType": "jupyter-notebook",
3184+
"displayName": "Jupyter Notebook (preview)",
3185+
"selector": [
3186+
{
3187+
"filenamePattern": "*.ipynb"
3188+
}
3189+
],
3190+
"priority": "option"
3191+
}
3192+
]
30893193
},
30903194
"scripts": {
30913195
"package": "gulp clean && gulp prePublishBundle && vsce package -o ms-python-insiders.vsix",

package.nls.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"DataScience.checkingIfImportIsSupported": "Checking if import is supported",
2424
"DataScience.installingMissingDependencies": "Installing missing dependencies",
2525
"DataScience.exportNotebookToPython": "Exporting Notebook to Python",
26-
"DataScience.performingExport": "Performing export",
26+
"DataScience.performingExport": "Performing Export",
2727
"DataScience.convertingToPDF": "Converting to PDF",
2828
"DataScience.exportHTMLQuickPickLabel": "HTML",
2929
"DataScience.exportPDFQuickPickLabel": "PDF",
@@ -370,6 +370,7 @@
370370
"DataScience.fetchingDataViewer": "Fetching data ...",
371371
"DataScience.noRowsInDataViewer": "No rows match current filter",
372372
"DataScience.jupyterServer": "Jupyter Server",
373+
"DataScience.trustNotebookCommandTitle": "Trust notebook",
373374
"DataScience.notebookIsTrusted": "Trusted",
374375
"DataScience.notebookIsNotTrusted": "Not Trusted",
375376
"DataScience.noKernel": "No Kernel",
@@ -543,7 +544,7 @@
543544
"DataScience.reloadCustomEditor": "Please reload VS Code to use the custom editor API",
544545
"DataScience.reloadVSCodeNotebookEditor": "Please reload VS Code to use the Notebook Editor",
545546
"DataScience.step": "Run next line (F10)",
546-
"DataScience.usingPreviewNotebookWithOtherNotebookWarning": "Using the Preview Notebook Editor along with the stable Notebook Editor is not recommended. Doing so could result in data loss or corruption of notebooks.",
547+
"DataScience.usingPreviewNotebookWithOtherNotebookWarning": "Opening the same file in the Preview Notebook Editor and stable Notebook Editor is not recommended. Doing so could result in data loss or corruption of notebooks.",
547548
"DataScience.previewNotebookOnlySupportedInVSCInsiders": "The Preview Notebook Editor is supported only in the Insiders version of Visual Studio Code.",
548549
"DataScienceNotebookSurveyBanner.bannerMessage": "Can you please take 2 minutes to tell us how the Preview Notebook Editor is working for you?",
549550
"DataScience.unknownServerUri": "Server URI cannot be used. Did you uninstall an extension that provided a Jupyter server connection?",

resources/dark/export_to_python.svg

Lines changed: 4 additions & 0 deletions
Loading

resources/dark/trusted.svg

Lines changed: 4 additions & 0 deletions
Loading

resources/dark/un-trusted.svg

Lines changed: 4 additions & 0 deletions
Loading

resources/light/export_to_python.svg

Lines changed: 4 additions & 0 deletions
Loading

resources/light/run-file.svg

Lines changed: 3 additions & 2 deletions
Loading

resources/light/trusted.svg

Lines changed: 4 additions & 0 deletions
Loading

resources/light/un-trusted.svg

Lines changed: 4 additions & 0 deletions
Loading

src/client/common/application/commands.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,16 @@ export interface ICommandNameArgumentTypeMapping extends ICommandNameWithoutArgu
173173
[DSCommands.ScrollToCell]: [string, string];
174174
[DSCommands.ViewJupyterOutput]: [];
175175
[DSCommands.ExportAsPythonScript]: [INotebookModel];
176-
[DSCommands.ExportToHTML]: [INotebookModel];
177-
[DSCommands.ExportToPDF]: [INotebookModel];
178-
[DSCommands.Export]: [INotebookModel];
176+
[DSCommands.ExportToHTML]: [INotebookModel, string | undefined];
177+
[DSCommands.ExportToPDF]: [INotebookModel, string | undefined];
178+
[DSCommands.Export]: [Uri | INotebookModel, string | undefined];
179179
[DSCommands.SwitchJupyterKernel]: [INotebook | undefined, 'raw' | 'jupyter'];
180180
[DSCommands.SelectJupyterCommandLine]: [undefined | Uri];
181181
[DSCommands.SaveNotebookNonCustomEditor]: [Uri];
182182
[DSCommands.SaveAsNotebookNonCustomEditor]: [Uri, Uri];
183183
[DSCommands.OpenNotebookNonCustomEditor]: [Uri];
184184
[DSCommands.GatherQuality]: [string];
185185
[DSCommands.EnableLoadingWidgetsFrom3rdPartySource]: [undefined | never];
186+
[DSCommands.TrustNotebook]: [undefined | never | Uri];
187+
[DSCommands.TrustedNotebook]: [undefined | never];
186188
}

0 commit comments

Comments
 (0)