Skip to content

Commit

Permalink
Add setting for kernel completions (#14763)
Browse files Browse the repository at this point in the history
* Update types to reflect version of Node & browsers

* Remove completion exp, add setting to enable it
  • Loading branch information
DonJayamanne authored Nov 22, 2023
1 parent 52a880d commit 3af4d05
Show file tree
Hide file tree
Showing 11 changed files with 250 additions and 48 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1497,9 +1497,7 @@
"type": "array",
"default": [],
"items": {
"enum": [
"KernelCompletions"
]
"enum": []
},
"markdownDescription": "%jupyter.configuration.jupyter.experiments.optInto.markdownDescription%",
"scope": "application"
Expand All @@ -1508,9 +1506,7 @@
"type": "array",
"default": [],
"items": {
"enum": [
"KernelCompletions"
]
"enum": []
},
"markdownDescription": "%jupyter.configuration.jupyter.experiments.optOutFrom.markdownDescription%",
"scope": "application"
Expand Down Expand Up @@ -1973,6 +1969,13 @@
"description": "Experimental feature to enable execution analysis in notebooks",
"scope": "application"
},
"jupyter.enableKernelCompletions": {
"type": "boolean",
"default": false,
"description": "Enable Non-Python Kernel Completions",
"markdownDescription": "%jupyter.configuration.jupyter.enableKernelCompletions.markdownDescription%",
"scope": "application"
},
"jupyter.completionTriggerCharacters": {
"type": "object",
"patternProperties": {
Expand Down Expand Up @@ -2308,7 +2311,7 @@
"@types/memoize-one": "^4.1.1",
"@types/mocha": "^9.1.0",
"@types/nock": "^10.0.3",
"@types/node": "^16.18.6",
"@types/node": "^18.15.0",
"@types/node-fetch": "^2.5.7",
"@types/pdfkit": "^0.11.0",
"@types/promisify-node": "^0.4.0",
Expand Down
3 changes: 2 additions & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@
"message": "Add PYTHONNOUSERSITE to kernels before starting. This prevents global/user site-packages from being used in the PYTHONPATH of the kernel.",
"comment": ["{Locked='PYTHONNOUSERSITE'}", "{Locked='PYTHONPATH'}"]
},
"jupyter.configuration.jupyter.enableExtendedKernelCompletions.markdownDescription": "Enables Jedi support for extended IntelliSense completions in running Jupyter kernels (see this [setting](https://ipython.readthedocs.io/en/stable/config/options/terminal.html?highlight=use_jedi#configtrait-Completer.use_jedi)). This can greatly impact notebook cell execution performance. Use with caution.",
"jupyter.configuration.jupyter.enableExtendedKernelCompletions.markdownDescription": "Enables Jedi support for extended IntelliSense completions in running Python Jupyter kernels for Python (see this [setting](https://ipython.readthedocs.io/en/stable/config/options/terminal.html?highlight=use_jedi#configtrait-Completer.use_jedi)). This can greatly impact notebook cell execution performance. Use with caution.",
"jupyter.configuration.jupyter.enableKernelCompletions.markdownDescription": "Enables support for auto completion in non-Python Notebooks and Interactive Windows using the associated Jupyter Kernel. \n\nWarning: This can greatly impact cell execution performance. Use with caution.",
"DataScience.exportDialogTitle": {
"message": "Export to Jupyter Notebook",
"comment": ["{Locked='Notebook'}"]
Expand Down
14 changes: 14 additions & 0 deletions src/gdpr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,20 @@
"kernelLanguage": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"Language of the kernel spec.","owner":"donjayamanne"},
"kernelId": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"Hash of the Kernel Connection id.","owner":"donjayamanne"},
"cancelled": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"Whether the completion request was cancelled or not.","owner":"donjayamanne"},
"resolved": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"Whether we resolved the documentation or not.","owner":"donjayamanne"},
"resolveDuration": {"classification":"SystemMetaData","purpose":"PerformanceAndHealth","comment":"Time taken to resolve the documentation.","owner":"donjayamanne","isMeasurement":true},
"${include}": [
"${F1}"
]
}
*/
//Telemetry.KernelCodeCompletionCannotResolve
/* __GDPR__
"DATASCIENCE.JUPYTER_KERNEL_CODE_COMPLETION_CANNOT_RESOLVE" : {
"kernelConnectionType": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"What kind of kernel spec did we fail to create.","owner":"donjayamanne"},
"kernelLanguage": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"Language of the kernel spec.","owner":"donjayamanne"},
"kernelId": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"Hash of the Kernel Connection id.","owner":"donjayamanne"},
"${include}": [
"${F1}"
Expand Down
1 change: 1 addition & 0 deletions src/platform/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ export enum Telemetry {
CellOutputMimeType = 'DS_INTERNAL.CELL_OUTPUT_MIME_TYPE',
JupyterApiUsage = 'DATASCIENCE.JUPYTER_API_USAGE',
KernelCodeCompletion = 'DATASCIENCE.JUPYTER_KERNEL_CODE_COMPLETION',
KernelCodeCompletionCannotResolve = 'DATASCIENCE.JUPYTER_KERNEL_CODE_COMPLETION_CANNOT_RESOLVE',
JupyterKernelApiUsage = 'DATASCIENCE.JUPYTER_KERNEL_API_USAGE',
NewJupyterKernelApiUsage = 'DATASCIENCE.JUPYTER_NEW_KERNEL_API_USAGE',
NewJupyterKernelsApiUsage = 'DATASCIENCE.JUPYTER_NEW_KERNELS_API_USAGE',
Expand Down
3 changes: 1 addition & 2 deletions src/platform/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@ export interface IAsyncDisposableRegistry extends IAsyncDisposable {
}

export enum Experiments {
DataViewerContribution = 'DataViewerContribution',
KernelCompletions = 'KernelCompletions'
DataViewerContribution = 'DataViewerContribution'
}

/**
Expand Down
Loading

0 comments on commit 3af4d05

Please sign in to comment.