Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: use Python Environment Tools for interpreter discovery #5897

Merged
merged 56 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
2d1658c
install PET in CI
isabelizimm Jan 7, 2025
72ce282
install nox into ci
isabelizimm Jan 7, 2025
5d4a4cf
take into account different wd for ts tests
isabelizimm Jan 7, 2025
3e317cb
specify which noxfile
isabelizimm Jan 7, 2025
9c2ddba
use actions for smoke tests to build vsix
isabelizimm Jan 8, 2025
c8db8b0
correct path name
isabelizimm Jan 8, 2025
06d13d4
cd into positron-python every time(?)
isabelizimm Jan 8, 2025
f1d2c1f
format yml
isabelizimm Jan 8, 2025
8b247ed
place pet in project dir
isabelizimm Jan 8, 2025
8ba5db2
do not clone with special-working-dir
isabelizimm Jan 9, 2025
77efe40
debug where vsix is
isabelizimm Jan 9, 2025
55b7461
rm tmate session
isabelizimm Jan 9, 2025
c0ddffb
move to ext dir
isabelizimm Jan 9, 2025
b01e189
try quotes perhaps
isabelizimm Jan 9, 2025
383cf53
try to move file again
isabelizimm Jan 9, 2025
c5a64c9
using working-directory arg
isabelizimm Jan 9, 2025
018cd9f
no working dir for upload
isabelizimm Jan 9, 2025
2d9ca1b
use cp instead of mv
isabelizimm Jan 10, 2025
c57dca8
upload vsix for smoke tests
isabelizimm Jan 10, 2025
db5cf4c
update paths for smoke tests
isabelizimm Jan 10, 2025
69dbdb1
include version in interpreter name
isabelizimm Jan 13, 2025
aed1167
add pet specific tests
isabelizimm Jan 13, 2025
5dcf7bf
include PROJECT_DIR for cargo tests
isabelizimm Jan 13, 2025
ad4dbb1
scripts to download and unzip python-env-tools
isabelizimm Jan 14, 2025
8fc277c
script to build pet
isabelizimm Jan 14, 2025
b6f7586
copyright headers
isabelizimm Jan 14, 2025
89b0949
use positron-pet-builds
isabelizimm Jan 22, 2025
57ad325
update e2e test
isabelizimm Jan 22, 2025
afa542e
Merge branch 'main' into pet-python
isabelizimm Jan 22, 2025
f1ace23
move test to new dir
isabelizimm Jan 22, 2025
74040e9
add post-install script
isabelizimm Jan 23, 2025
a683063
Merge branch 'main' into pet-python
isabelizimm Jan 24, 2025
8ce1c69
adjust imports for install
isabelizimm Jan 24, 2025
73c97fc
Merge branch 'main' into pet-python
isabelizimm Jan 28, 2025
82bfd96
remove extra test infra in favor of npm ci
isabelizimm Jan 28, 2025
5d65c03
debug ci
isabelizimm Jan 28, 2025
4ed7fb7
remove ls in gha
isabelizimm Jan 28, 2025
0ad2fb4
give PAT to npm ci
isabelizimm Jan 30, 2025
54f78c0
try other GH_TOKEN
isabelizimm Jan 30, 2025
3970bfb
use PAT, but different env name?
isabelizimm Jan 30, 2025
7e43c23
run config cred?
isabelizimm Jan 30, 2025
655336b
include python-env-tools in build
isabelizimm Jan 31, 2025
881868f
new actions to build for smoke tests
isabelizimm Jan 31, 2025
920399f
mv smoke test
isabelizimm Jan 31, 2025
ddc6c2f
set 3.10 to avoid errors on 3.13
isabelizimm Jan 31, 2025
7a6d30a
change extension root dir for smoke tests
isabelizimm Jan 31, 2025
d5565b4
where did the PET go????
isabelizimm Jan 31, 2025
32a02b0
still looking
isabelizimm Jan 31, 2025
8beb26e
allow execute
isabelizimm Jan 31, 2025
5aa013b
one more try
isabelizimm Jan 31, 2025
8ea8a99
use new PAT
isabelizimm Jan 31, 2025
ab81512
use SMOKE_TEST_EXTENSIONS_DIR
isabelizimm Jan 31, 2025
e786a2d
ensureDir the pet exists
isabelizimm Jan 31, 2025
ea0e52e
chmod pet
isabelizimm Jan 31, 2025
225e149
error earlier
isabelizimm Jan 31, 2025
9f7dfd1
swap default to js
isabelizimm Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/positron-python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

defaults:
run:
working-directory: 'extensions/positron-python'
working-directory: 'extensions/positron-python'

env:
NODE_VERSION: '20.12.1'
Expand Down Expand Up @@ -216,7 +216,8 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.x']
test-suite: [ts-unit, venv, single-workspace, debugger, functional, smoke]
test-suite:
[ts-unit, venv, single-workspace, debugger, functional, smoke]
# TODO: Add integration tests on windows and ubuntu. This requires updating
# src/test/positron/testElectron.ts to support installing Positron on these platforms.
exclude:
Expand Down Expand Up @@ -257,7 +258,9 @@ jobs:
cache: 'pip'

- name: Install Node dependencies
run: npm ci --fetch-timeout 120000
run: |
git config credential.https://api.github.com.token ${{ secrets.POSITRON_GITHUB_PAT }}
npm ci --fetch-timeout 120000

- name: Run `gulp prePublishNonBundle`
run: npm run prePublish
Expand Down Expand Up @@ -405,6 +408,7 @@ jobs:

- name: Run smoke tests
env:
POSITRON_GITHUB_PAT: ${{ github.token }}
run: npx tsc && node ./out/test/smokeTest.js
POSITRON_GITHUB_PAT: ${{ secrets.POSITRON_GITHUB_PAT }}
run: |
npx tsc && node ./out/test/smokeTest.js
if: matrix.test-suite == 'smoke'
isabelizimm marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions extensions/positron-python/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ tags
# --- Start Positron ---
python_files/posit/positron/tests/images
python_files/posit/positron/_vendor/**
scripts/*.js
resources/pet/**
# --- End Positron ---
python-env-tools/**
# coverage files produced as test output
Expand Down
14 changes: 10 additions & 4 deletions extensions/positron-python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@
"onExP",
"preview"
],
"scope": "machine",
"scope": "machine-overridable",
"type": "string"
},
"python.pipenvPath": {
Expand Down Expand Up @@ -1800,14 +1800,15 @@
}
},
"scripts": {
"package": "gulp clean && gulp prePublishBundle && vsce package -o ms-python-insiders.vsix",
"package": "gulp clean && gulp prePublishBundle && vsce package -o positron-python-insiders.vsix",
"prePublish": "gulp clean && gulp prePublishNonBundle",
"compile": "tsc -watch -p ./",
"compileApi": "node ./node_modules/typescript/lib/tsc.js -b ./pythonExtensionApi/tsconfig.json",
"compiled": "deemon npm run compile",
"kill-compiled": "deemon --kill npm run compile",
"checkDependencies": "gulp checkDependencies",
"postinstall": "gulp installPythonLibs",
"install-pet": "ts-node scripts/install-pet.ts",
"postinstall": "gulp installPythonLibs && ts-node scripts/post-install.ts",
"test": "node ./out/test/standardTest.js && node ./out/test/multiRootTest.js",
"test:unittests": "mocha --config ./build/.mocha.unittests.json",
"test:unittests:cover": "nyc --no-clean --nycrc-path ./build/.nycrc mocha --config ./build/.mocha.unittests.json",
Expand Down Expand Up @@ -1950,5 +1951,10 @@
"webpack-require-from": "^1.8.6",
"worker-loader": "^3.0.8",
"yargs": "^15.3.1"
}
},
"positron": {
"externalDependencies": {
"pet": "v2024.16.0"
}
}
}
Loading
Loading