Skip to content

Commit f9bf27c

Browse files
author
Kartik Raj
authored
Dfdf (#41)
* sdf * sdf * dfgd * d
1 parent d1aa62c commit f9bf27c

File tree

3 files changed

+1
-301
lines changed

3 files changed

+1
-301
lines changed

.github/workflows/add-milestone.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,3 @@ jobs:
2323
run: npm install --production --prefix ./actions
2424
- name: "Add milestone to closed issue"
2525
uses: ./actions/python-add-milestone
26-
with:
27-
token: ${{secrets.GITHUB_TOKEN}}

.github/workflows/build.yml

Lines changed: 0 additions & 299 deletions
Original file line numberDiff line numberDiff line change
@@ -41,302 +41,3 @@ jobs:
4141
vsix_type = "release"
4242
print(f"::set-output name=vsix_name::ms-python-{vsix_type}.vsix")
4343
print(f"::set-output name=vsix_artifact_name::ms-python-{vsix_type}-vsix")
44-
45-
build-vsix:
46-
name: Create VSIX
47-
if: github.repository == 'microsoft/vscode-python'
48-
needs: setup
49-
runs-on: ubuntu-latest
50-
steps:
51-
- name: Checkout
52-
uses: actions/checkout@v4
53-
54-
- name: Build VSIX
55-
uses: ./.github/actions/build-vsix
56-
with:
57-
node_version: ${{ env.NODE_VERSION }}
58-
vsix_name: ${{ needs.setup.outputs.vsix_name }}
59-
artifact_name: ${{ needs.setup.outputs.vsix_artifact_name }}
60-
61-
lint:
62-
name: Lint
63-
if: github.repository == 'microsoft/vscode-python'
64-
runs-on: ubuntu-latest
65-
steps:
66-
- name: Checkout
67-
uses: actions/checkout@v4
68-
69-
- name: Lint
70-
uses: ./.github/actions/lint
71-
with:
72-
node_version: ${{ env.NODE_VERSION }}
73-
74-
check-types:
75-
name: Check Python types
76-
if: github.repository == 'microsoft/vscode-python'
77-
runs-on: ubuntu-latest
78-
steps:
79-
- name: Use Python ${{ env.PYTHON_VERSION }}
80-
uses: actions/setup-python@v4
81-
with:
82-
python-version: ${{ env.PYTHON_VERSION }}
83-
84-
- name: Checkout
85-
uses: actions/checkout@v4
86-
87-
- name: Install core Python requirements
88-
uses: brettcannon/pip-secure-install@v1
89-
with:
90-
options: '-t ./pythonFiles/lib/python --no-cache-dir --implementation py'
91-
92-
- name: Install Jedi requirements
93-
uses: brettcannon/pip-secure-install@v1
94-
with:
95-
requirements-file: './pythonFiles/jedilsp_requirements/requirements.txt'
96-
options: '-t ./pythonFiles/lib/jedilsp --no-cache-dir --implementation py'
97-
98-
- name: Install other Python requirements
99-
run: |
100-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
101-
python -m pip install --upgrade -r build/test-requirements.txt
102-
103-
- name: Run Pyright
104-
uses: jakebailey/pyright-action@v1
105-
with:
106-
version: 1.1.308
107-
working-directory: 'pythonFiles'
108-
109-
### Non-smoke tests
110-
tests:
111-
name: Tests
112-
if: github.repository == 'microsoft/vscode-python'
113-
runs-on: ${{ matrix.os }}
114-
defaults:
115-
run:
116-
working-directory: ${{ env.special-working-directory }}
117-
strategy:
118-
fail-fast: false
119-
matrix:
120-
# We're not running CI on macOS for now because it's one less matrix
121-
# entry to lower the number of runners used, macOS runners are expensive,
122-
# and we assume that Ubuntu is enough to cover the UNIX case.
123-
os: [ubuntu-latest, windows-latest]
124-
python: ['3.x']
125-
test-suite: [ts-unit, python-unit, venv, single-workspace, multi-workspace, debugger, functional]
126-
steps:
127-
- name: Checkout
128-
uses: actions/checkout@v4
129-
with:
130-
path: ${{ env.special-working-directory-relative }}
131-
132-
- name: Install Node
133-
uses: actions/setup-node@v3
134-
with:
135-
node-version: ${{ env.NODE_VERSION }}
136-
cache: 'npm'
137-
cache-dependency-path: ${{ env.special-working-directory-relative }}/package-lock.json
138-
139-
- name: Install dependencies (npm ci)
140-
run: npm ci
141-
142-
- name: Compile
143-
run: npx gulp prePublishNonBundle
144-
145-
- name: Install Python ${{ matrix.python }}
146-
uses: actions/setup-python@v4
147-
with:
148-
python-version: ${{ matrix.python }}
149-
150-
- name: Download get-pip.py
151-
run: |
152-
python -m pip install wheel
153-
python -m pip install -r build/build-install-requirements.txt
154-
python ./pythonFiles/download_get_pip.py
155-
shell: bash
156-
157-
- name: Install debugpy
158-
run: |
159-
# We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase.
160-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
161-
162-
- name: Install core Python requirements
163-
uses: brettcannon/pip-secure-install@v1
164-
with:
165-
requirements-file: '"${{ env.special-working-directory-relative }}/requirements.txt"'
166-
options: '-t "${{ env.special-working-directory-relative }}/pythonFiles/lib/python" --no-cache-dir --implementation py'
167-
if: startsWith(matrix.python, 3.)
168-
169-
- name: Install Jedi requirements
170-
uses: brettcannon/pip-secure-install@v1
171-
with:
172-
requirements-file: '"${{ env.special-working-directory-relative }}/pythonFiles/jedilsp_requirements/requirements.txt"'
173-
options: '-t "${{ env.special-working-directory-relative }}/pythonFiles/lib/jedilsp" --no-cache-dir --implementation py'
174-
if: startsWith(matrix.python, 3.)
175-
176-
- name: Install test requirements
177-
run: python -m pip install --upgrade -r build/test-requirements.txt
178-
179-
- name: Install debugpy wheels (Python ${{ matrix.python }})
180-
run: |
181-
python -m pip install wheel
182-
python -m pip install -r build/build-install-requirements.txt
183-
python ./pythonFiles/install_debugpy.py
184-
shell: bash
185-
if: matrix.test-suite == 'debugger'
186-
187-
- name: Install functional test requirements
188-
run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt
189-
if: matrix.test-suite == 'functional'
190-
191-
- name: Prepare pipenv for venv tests
192-
env:
193-
TEST_FILES_SUFFIX: testvirtualenvs
194-
PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json'
195-
shell: pwsh
196-
if: matrix.test-suite == 'venv'
197-
run: |
198-
python -m pip install pipenv
199-
python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath
200-
201-
- name: Prepare poetry for venv tests
202-
env:
203-
TEST_FILES_SUFFIX: testvirtualenvs
204-
shell: pwsh
205-
if: matrix.test-suite == 'venv'
206-
run: |
207-
python -m pip install poetry
208-
Move-Item -Path ".\build\ci\pyproject.toml" -Destination .
209-
poetry env use python
210-
211-
- name: Prepare virtualenv for venv tests
212-
env:
213-
TEST_FILES_SUFFIX: testvirtualenvs
214-
PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json'
215-
shell: pwsh
216-
if: matrix.test-suite == 'venv'
217-
run: |
218-
python -m pip install virtualenv
219-
python -m virtualenv .virtualenv/
220-
if ('${{ matrix.os }}' -match 'windows-latest') {
221-
& ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath
222-
} else {
223-
& ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath
224-
}
225-
226-
- name: Prepare venv for venv tests
227-
env:
228-
TEST_FILES_SUFFIX: testvirtualenvs
229-
PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json'
230-
shell: pwsh
231-
if: matrix.test-suite == 'venv' && startsWith(matrix.python, 3.)
232-
run: |
233-
python -m venv .venv
234-
if ('${{ matrix.os }}' -match 'windows-latest') {
235-
& ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath
236-
} else {
237-
& ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath
238-
}
239-
240-
- name: Prepare conda for venv tests
241-
env:
242-
TEST_FILES_SUFFIX: testvirtualenvs
243-
PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json'
244-
shell: pwsh
245-
if: matrix.test-suite == 'venv'
246-
run: |
247-
# 1. For `terminalActivation.testvirtualenvs.test.ts`
248-
if ('${{ matrix.os }}' -match 'windows-latest') {
249-
$condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe
250-
$condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda
251-
} else{
252-
$condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python
253-
$condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda
254-
}
255-
& $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath
256-
& $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath
257-
& $condaExecPath init --all
258-
259-
- name: Set CI_PYTHON_PATH and CI_DISABLE_AUTO_SELECTION
260-
run: |
261-
echo "CI_PYTHON_PATH=python" >> $GITHUB_ENV
262-
echo "CI_DISABLE_AUTO_SELECTION=1" >> $GITHUB_ENV
263-
shell: bash
264-
if: matrix.test-suite != 'ts-unit'
265-
266-
# Run TypeScript unit tests only for Python 3.X.
267-
- name: Run TypeScript unit tests
268-
run: npm run test:unittests
269-
if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, '3.')
270-
271-
- name: Run Python unit tests
272-
run: python pythonFiles/tests/run_all.py
273-
if: matrix.test-suite == 'python-unit'
274-
275-
# The virtual environment based tests use the `testSingleWorkspace` set of tests
276-
# with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`,
277-
# which is set in the "Prepare environment for venv tests" step.
278-
# We also use a third-party GitHub Action to install xvfb on Linux,
279-
# run tests and then clean up the process once the tests ran.
280-
# See https://github.com/GabrielBB/xvfb-action
281-
- name: Run venv tests
282-
env:
283-
TEST_FILES_SUFFIX: testvirtualenvs
284-
CI_PYTHON_VERSION: ${{ matrix.python }}
285-
uses: GabrielBB/[email protected]
286-
with:
287-
run: npm run testSingleWorkspace
288-
working-directory: ${{ env.special-working-directory }}
289-
if: matrix.test-suite == 'venv' && matrix.os == 'ubuntu-latest'
290-
291-
- name: Run single-workspace tests
292-
env:
293-
CI_PYTHON_VERSION: ${{ matrix.python }}
294-
uses: GabrielBB/[email protected]
295-
with:
296-
run: npm run testSingleWorkspace
297-
working-directory: ${{ env.special-working-directory }}
298-
if: matrix.test-suite == 'single-workspace'
299-
300-
- name: Run multi-workspace tests
301-
env:
302-
CI_PYTHON_VERSION: ${{ matrix.python }}
303-
uses: GabrielBB/[email protected]
304-
with:
305-
run: npm run testMultiWorkspace
306-
working-directory: ${{ env.special-working-directory }}
307-
if: matrix.test-suite == 'multi-workspace'
308-
309-
- name: Run debugger tests
310-
env:
311-
CI_PYTHON_VERSION: ${{ matrix.python }}
312-
uses: GabrielBB/[email protected]
313-
with:
314-
run: npm run testDebugger
315-
working-directory: ${{ env.special-working-directory }}
316-
if: matrix.test-suite == 'debugger'
317-
318-
# Run TypeScript functional tests
319-
- name: Run TypeScript functional tests
320-
run: npm run test:functional
321-
if: matrix.test-suite == 'functional'
322-
323-
smoke-tests:
324-
name: Smoke tests
325-
if: github.repository == 'microsoft/vscode-python'
326-
runs-on: ${{ matrix.os }}
327-
needs: [setup, build-vsix]
328-
strategy:
329-
fail-fast: false
330-
matrix:
331-
# We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used,
332-
# macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case.
333-
os: [ubuntu-latest, windows-latest]
334-
steps:
335-
- name: Checkout
336-
uses: actions/checkout@v4
337-
338-
- name: Smoke tests
339-
uses: ./.github/actions/smoke-tests
340-
with:
341-
node_version: ${{ env.NODE_VERSION }}
342-
artifact_name: ${{ needs.setup.outputs.vsix_artifact_name }}

src/client/interpreter/virtualEnvs/virtualEnvPrompt.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class VirtualEnvironmentPrompt implements IExtensionActivationService {
3232
) {}
3333

3434
public async activate(resource: Uri): Promise<void> {
35+
// Random
3536
const disposable = this.pyenvs.onDidCreate(resource, () => this.handleNewEnvironment(resource));
3637
this.disposableRegistry.push(disposable);
3738
}

0 commit comments

Comments
 (0)