Skip to content

Commit 48ed64a

Browse files
authored
python: make PET default locator (#9111)
Changes from "js" locator to the PET. πŸŽ‰ This PR also removes CI runs for upstream smoke tests. This was brought on due to the fact that smoke tests do not run from the expected `positron/extensions/positron-python` directory, so the `pet` binary would need to be redownloaded and inserted into the temporary testing path. We have disabled all behavior that is being tested in the smoke tests besides: checking if the LSP is on, running a Python file in the terminal, and checking if Smart Send is on. These are all features that are covered in Positron's own e2e tests. Since the smoke tests are not adding additional coverage or information to our testing suite, we decided to remove them completely. ### Release Notes <!-- Optionally, replace `N/A` with text to be included in the next release notes. The `N/A` bullets are ignored. If you refer to one or more Positron issues, these issues are used to collect information about the feature or bugfix, such as the relevant language pack as determined by Github labels of type `lang: `. The note will automatically be tagged with the language. These notes are typically filled by the Positron team. If you are an external contributor, you may ignore this section. --> #### New Features - #6582 Use Rust-based Python Environment Tools locator as default. #### Bug Fixes - N/A ### QA Notes passes CI and if you poke around in different workspaces, Python should be discovered. I don't think we need to add "native" to the e2e settings anymore.
1 parent 10db4dd commit 48ed64a

4 files changed

Lines changed: 9 additions & 28 deletions

File tree

β€Ž.github/workflows/positron-python-ci.ymlβ€Ž

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ jobs:
244244
os: [ubuntu-latest, macos-latest, windows-latest]
245245
python: ['3.x']
246246
test-suite:
247-
[ts-unit, venv, single-workspace, debugger, functional, smoke]
247+
[ts-unit, venv, single-workspace, debugger, functional]
248248
# TODO: Add integration tests on windows and ubuntu. This requires updating
249249
# src/test/positron/testElectron.ts to support installing Positron on these platforms.
250250
exclude:
@@ -254,16 +254,12 @@ jobs:
254254
test-suite: debugger
255255
- os: windows-latest
256256
test-suite: single-workspace
257-
- os: windows-latest
258-
test-suite: smoke
259257
- os: ubuntu-latest
260258
test-suite: venv
261259
- os: ubuntu-latest
262260
test-suite: debugger
263261
- os: ubuntu-latest
264262
test-suite: single-workspace
265-
- os: ubuntu-latest
266-
test-suite: smoke
267263

268264
steps:
269265
- name: Checkout
@@ -376,10 +372,6 @@ jobs:
376372
& $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath
377373
& $condaExecPath init --all
378374
379-
- name: Prepare VSIX for smoke tests
380-
run: npm run package --allow-star-activation
381-
if: matrix.test-suite == 'smoke'
382-
383375
- name: Set CI_PYTHON_PATH and CI_DISABLE_AUTO_SELECTION
384376
run: |
385377
echo "CI_PYTHON_PATH=$(which python)" >> $GITHUB_ENV
@@ -433,9 +425,3 @@ jobs:
433425
run: npm run test:functional
434426
if: matrix.test-suite == 'functional'
435427

436-
- name: Run smoke tests
437-
env:
438-
POSITRON_GITHUB_RO_PAT: ${{ github.token }}
439-
run: |
440-
npx tsc && node ./out/test/smokeTest.js
441-
if: matrix.test-suite == 'smoke'

β€Žextensions/positron-python/package.jsonβ€Ž

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -805,16 +805,12 @@
805805
"type": "string"
806806
},
807807
"python.locator": {
808-
"default": "js",
809-
"description": "%python.locator.description%",
808+
"default": "native",
809+
"markdownDescription": "%python.locator.description%",
810810
"enum": [
811811
"js",
812812
"native"
813813
],
814-
"tags": [
815-
"onExP",
816-
"preview"
817-
],
818814
"scope": "machine-overridable",
819815
"type": "string"
820816
},

β€Žextensions/positron-python/package.nls.jsonβ€Ž

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"python.logging.level.description": "The logging level the extension logs at, defaults to 'error'",
8787
"python.logging.level.deprecation": "This setting is deprecated. Please use command `Developer: Set Log Level...` to set logging level.",
8888
"python.missingPackage.severity.description": "Set severity of missing packages in requirements.txt or pyproject.toml",
89-
"python.locator.description": "[Experimental] Select implementation of environment locators. This is an experimental setting while we test native environment location.",
89+
"python.locator.description": "Choose how to discover Python interpreters. Native uses [Python Environment Tools](https://github.com/microsoft/python-environment-tools) a faster, Rust-based locator, while JS uses a JavaScript implementation.",
9090
"python.pipenvPath.description": "Path to the pipenv executable to use for activation.",
9191
"python.poetryPath.description": "Path to the poetry executable.",
9292
"python.quietMode.description": "Start Positron's IPython shell in quiet mode, to suppress initial version and help messages (restart Positron to apply).",
@@ -129,7 +129,7 @@
129129
"walkthrough.positron.step.migrateFromVSCode.panes.description": "Find your way around the panes and layout of Positron\n[Customize your layout](command:workbench.action.customizeLayout)",
130130
"walkthrough.pythonWelcome.title": "Get Started with Python Development",
131131
"walkthrough.pythonWelcome.description": "Your first steps to set up a Python project with all the powerful tools and features that the Python extension has to offer!",
132-
"walkthrough.step.python.createPythonFile.title": "Create a Python file",
132+
"walkthrough.step.python.createPythonFile.title": "Create a Python file",
133133
"walkthrough.step.python.createPythonFolder.title": "Open a Python project folder",
134134
"walkthrough.step.python.createPythonFile.description": {
135135
"message": "[Open](command:toSide:workbench.action.files.openFile) or [create](command:toSide:workbench.action.files.newUntitledFile?%7B%22languageId%22%3A%22python%22%7D) a Python file - make sure to save it as \".py\".\n[Create Python File](command:toSide:workbench.action.files.newUntitledFile?%7B%22languageId%22%3A%22python%22%7D)",
@@ -141,7 +141,7 @@
141141
},
142142
"walkthrough.step.python.createPythonFolder.description": {
143143
"message": "[Open](command:workbench.action.files.openFolder) or create a project folder.\n[Open Project Folder](command:workbench.action.files.openFolder)",
144-
"comment": [
144+
"comment": [
145145
"{Locked='](command:workbench.action.files.openFolder'}",
146146
"Do not translate the 'command:*' part inside of the '(..)'. It is an internal command syntax for VS Code",
147147
"Please make sure there is no space between the right bracket and left parenthesis: ]( this is an internal syntax for links"
@@ -171,7 +171,7 @@
171171
"walkthrough.step.python.createEnvironment.title": "Select or create a Python environment",
172172
"walkthrough.step.python.createEnvironment.description": {
173173
"message": "Create an environment for your Python project or use [Select Python Interpreter](command:python.setInterpreter) to select an existing one.\n[Create Environment](command:python.createEnvironment)\n**Tip**: Run the ``Python: Create Environment`` command in the [Command Palette](command:workbench.action.showCommands).",
174-
"comment": [
174+
"comment": [
175175
"{Locked='](command:python.createEnvironment'}",
176176
"{Locked='](command:workbench.action.showCommands'}",
177177
"{Locked='](command:python.setInterpreter'}",
@@ -183,8 +183,8 @@
183183
"walkthrough.step.python.runAndDebug.description": "Open your Python file and click on the play button on the top right of the editor, or press F5 when on the file and select \"Python File\" to run with the debugger. \n \n[Learn more](https://code.visualstudio.com/docs/python/python-tutorial#_run-hello-world)",
184184
"walkthrough.step.python.learnMoreWithDS.title": "Keep exploring!",
185185
"walkthrough.step.python.learnMoreWithDS.description": {
186-
"message":"🎨 Explore all the features the Python extension has to offer by looking for \"Python\" in the [Command Palette](command:workbench.action.showCommands). \n πŸ“ˆ Learn more about getting started with [data science](command:workbench.action.openWalkthrough?%7B%22category%22%3A%22ms-python.python%23pythonDataScienceWelcome%22%2C%22step%22%3A%22ms-python.python%23python.createNewNotebook%22%7D) in Python. \n ✨ Take a look at our [Release Notes](https://aka.ms/AA8dxtb) to learn more about the latest features. \n \n[Follow along with the Python Tutorial](https://aka.ms/AA8dqti)",
187-
"comment":[
186+
"message": "🎨 Explore all the features the Python extension has to offer by looking for \"Python\" in the [Command Palette](command:workbench.action.showCommands). \n πŸ“ˆ Learn more about getting started with [data science](command:workbench.action.openWalkthrough?%7B%22category%22%3A%22ms-python.python%23pythonDataScienceWelcome%22%2C%22step%22%3A%22ms-python.python%23python.createNewNotebook%22%7D) in Python. \n ✨ Take a look at our [Release Notes](https://aka.ms/AA8dxtb) to learn more about the latest features. \n \n[Follow along with the Python Tutorial](https://aka.ms/AA8dqti)",
187+
"comment": [
188188
"{Locked='](command:workbench.action.showCommands'}",
189189
"{Locked='](command:workbench.action.openWalkthrough?%7B%22category%22%3A%22ms-python.python%23pythonDataScienceWelcome%22%2C%22step%22%3A%22ms-python.python%23python.createNewNotebook%22%7D'}",
190190
"Do not translate the 'command:*' part inside of the '(..)'. It is an internal command syntax for VS Code",

β€Žtest/e2e/fixtures/settings.jsonβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"python.locator": "native",
32
"interpreters.startupBehavior": "manual",
43
"positron.r.kernel.logLevel": "trace",
54
"python.languageServerLogLevel": "debug",

0 commit comments

Comments
Β (0)