Skip to content

Commit

Permalink
Integrate with Python extension (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne authored Sep 14, 2020
1 parent ace462b commit 36da85b
Show file tree
Hide file tree
Showing 473 changed files with 645 additions and 60,750 deletions.
20 changes: 16 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"mocha": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"plugins": [
"@typescript-eslint"
],
"extends": [
"airbnb",
"plugin:@typescript-eslint/recommended",
Expand All @@ -25,7 +27,9 @@
"no-dupe-class-members": "off",
"@typescript-eslint/no-dupe-class-members": "error",
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": ["error"],
"@typescript-eslint/no-empty-function": [
"error"
],
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"no-unused-vars": "off",
Expand All @@ -48,7 +52,10 @@
"import/no-unresolved": [
"error",
{
"ignore": ["monaco-editor", "vscode"]
"ignore": [
"monaco-editor",
"vscode"
]
}
],
"import/prefer-default-export": "off",
Expand Down Expand Up @@ -78,12 +85,15 @@
],
"no-console": "off",
"no-control-regex": "off",
"function-paren-newline": "off",
"consistent-return": "off",
"no-extend-native": "off",
"no-multi-str": "off",
"no-param-reassign": "off",
"no-prototype-builtins": "off",
"no-template-curly-in-string": "off",
"no-underscore-dangle": "off",
"comma-dangle": "off",
"no-useless-escape": "off",
"no-void": [
"error",
Expand All @@ -95,7 +105,9 @@
"react/jsx-filename-extension": [
1,
{
"extensions": [".tsx"]
"extensions": [
".tsx"
]
}
],
"strict": "off"
Expand Down
132 changes: 101 additions & 31 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"stopOnEntry": false,
"smartStep": true,
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out/**/*", "!${workspaceFolder}/**/node_modules**/*"],
"outFiles": [
"${workspaceFolder}/out/**/*",
"!${workspaceFolder}/**/node_modules**/*"
],
"preLaunchTask": "Compile",
"skipFiles": ["<node_internals>/**"],
"skipFiles": [
"<node_internals>/**"
],
"env": {
// Enable this to turn on redux logging during debugging
"XVSC_PYTHON_FORCE_LOGGING": "1",
Expand All @@ -30,27 +37,40 @@
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"stopOnEntry": false,
"smartStep": true,
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out/**/*", "!${workspaceFolder}/**/node_modules**/*"],
"outFiles": [
"${workspaceFolder}/out/**/*",
"!${workspaceFolder}/**/node_modules**/*"
],
"preLaunchTask": "Inject DS WebBrowser UI",
"env": {
"VSC_PYTHON_DS_UI_PROMPT": "1"
},
"skipFiles": ["<node_internals>/**"]
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "Extension inside container",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "${workspaceFolder}/data"],
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/data"
],
"stopOnEntry": false,
"smartStep": true,
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out/**/*", "!${workspaceFolder}/**/node_modules**/*"],
"outFiles": [
"${workspaceFolder}/out/**/*",
"!${workspaceFolder}/**/node_modules**/*"
],
"preLaunchTask": "Compile"
},
{
Expand All @@ -59,7 +79,9 @@
"request": "launch",
"module": "IPython",
"console": "integratedTerminal",
"args": ["${file}"] // Additional args should be prefixed with a '--' first.
"args": [
"${file}"
] // Additional args should be prefixed with a '--' first.
},
{
"name": "Python: Current File",
Expand All @@ -82,12 +104,17 @@
"stopOnEntry": false,
"sourceMaps": true,
"smartStep": true,
"outFiles": ["${workspaceFolder}/out/**/*", "!${workspaceFolder}/**/node_modules**/*"],
"outFiles": [
"${workspaceFolder}/out/**/*",
"!${workspaceFolder}/**/node_modules**/*"
],
"preLaunchTask": "Compile",
"env": {
"IS_CI_SERVER_TEST_DEBUGGER": "1"
},
"skipFiles": ["<node_internals>/**"]
"skipFiles": [
"<node_internals>/**"
]
},
{
// Note, for the smoke test you want to debug, you may need to copy the file,
Expand All @@ -107,9 +134,14 @@
},
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"!${workspaceFolder}/**/node_modules**/*"
],
"preLaunchTask": "Compile",
"skipFiles": ["<node_internals>/**"]
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "Tests (Single Workspace, VS Code, *.test.ts)",
Expand All @@ -127,9 +159,14 @@
},
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"!${workspaceFolder}/**/node_modules**/*"
],
"preLaunchTask": "Compile",
"skipFiles": ["<node_internals>/**"]
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "Jedi LSP tests",
Expand All @@ -147,9 +184,14 @@
},
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"!${workspaceFolder}/**/node_modules**/*"
],
"preLaunchTask": "preTestJediLSP",
"skipFiles": ["<node_internals>/**"]
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "Tests (DataScience, *.ds.test.ts)",
Expand All @@ -166,15 +208,19 @@
"env": {
"VSC_PYTHON_CI_TEST_GREP": "", // Modify this to run a subset of the single workspace tests
"VSC_PYTHON_CI_TEST_INVERT_GREP": "", // Initialize this to invert the grep (exclude tests with value defined in grep).

"VSC_PYTHON_LOAD_EXPERIMENTS_FROM_FILE": "true",
"TEST_FILES_SUFFIX": "ds.test"
},
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"!${workspaceFolder}/**/node_modules**/*"
],
"preLaunchTask": "Compile",
"skipFiles": ["<node_internals>/**"]
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "Unit Tests (without VS Code, *.unit.test.ts)",
Expand All @@ -192,9 +238,14 @@
//"--grep", "<suite name>",
"--timeout=300000"
],
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"!${workspaceFolder}/**/node_modules**/*"
],
"preLaunchTask": "Compile",
"skipFiles": ["<node_internals>/**"]
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "Unit Tests (fast, without VS Code and without react/monaco, *.unit.test.ts)",
Expand All @@ -213,9 +264,14 @@
"--timeout=300000",
"--fast"
],
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"!${workspaceFolder}/**/node_modules**/*"
],
"preLaunchTask": "Compile",
"skipFiles": ["<node_internals>/**"]
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "Functional Tests (without VS Code, *.functional.test.ts)",
Expand All @@ -238,17 +294,22 @@
// Remove `X` prefix to test with real browser to host DS ui (for DS functional tests).
"XVSC_PYTHON_DS_UI_BROWSER": "1",
// Remove `X` prefix to test with real python (for DS functional tests).
"XVSCODE_PYTHON_ROLLING": "1",
"VSCODE_PYTHON_ROLLING": "1",
// Remove 'X' to turn on all logging in the debug output
"XVSC_PYTHON_FORCE_LOGGING": "1",
// Remove `X` prefix and update path to test with real python interpreter (for DS functional tests).
"XCI_PYTHON_PATH": "<Python Path>",
// Remove 'X' prefix to dump output for debugger. Directory has to exist prior to launch
"XDEBUGPY_LOG_DIR": "${workspaceRoot}/tmp/Debug_Output"
},
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"!${workspaceFolder}/**/node_modules**/*"
],
"preLaunchTask": "Compile",
"skipFiles": ["<node_internals>/**"]
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "Functional DS UI Tests (without VS Code, *.ui.functional.test.ts)",
Expand Down Expand Up @@ -277,17 +338,26 @@
// Remove `X` prefix and update path to test with real python interpreter (for DS functional tests).
"XCI_PYTHON_PATH": "<Python Path>"
},
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"!${workspaceFolder}/**/node_modules**/*"
],
"preLaunchTask": "Compile",
"skipFiles": ["<node_internals>/**"]
"skipFiles": [
"<node_internals>/**"
]
},
{
"type": "node",
"request": "launch",
"name": "Gulp tasks (helpful for debugging gulpfile.js)",
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
"args": ["watch"],
"skipFiles": ["<node_internals>/**"]
"args": [
"watch"
],
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "Node: Current File",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The extension is available in multiple languages: `de`, `en`, `es`, `fa`, `fr`,

## Data and telemetry

The Microsoft Python Extension for Visual Studio Code collects usage
The Microsoft Jupyter Extension for Visual Studio Code collects usage
data and sends it to Microsoft to help improve our products and
services. Read our
[privacy statement](https://privacy.microsoft.com/privacystatement) to
Expand Down
2 changes: 1 addition & 1 deletion build/tslint-rules/messagesMustBeLocalizedRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const methodNames = [
// TODO: Ideally we would not ignore any files.
const ignoredFiles = util.getListOfFiles('unlocalizedFiles.json');
const ignoredPrefix = path.normalize('src/test');
const failureMessage = 'Messages must be localized in the Python Extension (use src/client/common/utils/localize.ts)';
const failureMessage = 'Messages must be localized in the Jupyter Extension (use src/client/common/utils/localize.ts)';
class NoStringLiteralsInMessages extends baseRuleWalker.BaseRuleWalker {
visitCallExpression(node) {
if (!this.shouldIgnoreNode(node)) {
Expand Down
Loading

0 comments on commit 36da85b

Please sign in to comment.