Skip to content

Commit 5039709

Browse files
authored
Merge branch 'master' into unpin-jedi
2 parents ee3e13c + 8f7669e commit 5039709

File tree

181 files changed

+4378
-1532
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+4378
-1532
lines changed

.github/pull_request_template.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md
77

88
## References
99

10-
<!-- Note issue numbers this pull request addresses (should be at least one, see contributing guidelines above). -->
10+
<!-- Note issue numbers this pull request addresses (should be at least one, see contributing guidelines above).
11+
Use "fixes" and "closes" linking phrases as appropriate. -->
1112

1213
<!-- Note any other pull requests that address this issue and how this pull request is different. -->
1314

@@ -27,7 +28,7 @@ https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md
2728

2829
## Chores
2930

30-
- [ ] linted
31-
- [ ] tested
32-
- [ ] documented
33-
- [ ] changelog entry
31+
- [ ] linted <!-- Required: Run "jlpm lint" and "python scripts/lint.py" from the root of the repository, then check this box like this: [x] -->
32+
- [ ] tested <!-- Recommended: Let us know if you already added a test case (if relevant). -->
33+
- [ ] documented <!-- Optional: Would it be good to improve the documentation? If yes, please consider doing this and checking this box. -->
34+
- [ ] changelog entry <!-- Recommended: Add a note in the CHANGELOG.md file under the most recent >unreleased< version; if one does not exist, feel free to create one by increasing the version number (no worries if you are not certain of the details - we can improve it later; let's just have something to work with) -->

.github/workflows/job.test.yml

Lines changed: 109 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ defaults:
1616
shell: bash -l {0}
1717

1818
env:
19-
# Increase this value to reset all caches
20-
CACHE_EPOCH: 0
21-
22-
JLPM_CMD: jlpm --ignore-optional --prefer-offline --frozen-lockfile
23-
19+
JULIA_NUM_THREADS: 2
20+
MAMBA_NO_BANNER: 1
21+
PIP_DISABLE_PIP_VERSION_CHECK: 1
2422
PYTHONUNBUFFERED: 1
23+
2524
ATEST_RETRIES: 3
26-
PIP_DISABLE_PIP_VERSION_CHECK: 1
25+
JLPM_CMD: jlpm --ignore-optional --prefer-offline --frozen-lockfile
2726

28-
# TODO: replace once mambaforge "just works" with setup-miniconda
29-
MAMBAFORGE_URL: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge
27+
# Increase this value to reset all caches
28+
CACHE_EPOCH: 2
29+
JULIA_LANGSERVER: 3.2.0
3030

3131
jobs:
3232
lint:
@@ -50,7 +50,7 @@ jobs:
5050
nodejs: '${{ matrix.nodejs }}'
5151

5252
- name: Cache conda
53-
uses: actions/cache@v1
53+
uses: actions/cache@v2
5454
with:
5555
path: ~/conda_pkgs_dir
5656
key: |
@@ -61,11 +61,9 @@ jobs:
6161
- name: Set up Python and mamba
6262
uses: conda-incubator/setup-miniconda@v2
6363
with:
64-
installer-url: ${{ env.MAMBAFORGE_URL }}-Linux-x86_64.sh
65-
condarc-file: .github/.condarc
66-
67-
- name: Install base conda dependencies
68-
run: mamba env update -n test --file requirements/github-actions.yml
64+
environment-file: requirements/github-actions.yml
65+
miniforge-variant: Mambaforge
66+
use-mamba: true
6967

7068
- name: Install linting dependencies
7169
run: mamba env update -n test --file requirements/lint.yml
@@ -78,15 +76,17 @@ jobs:
7876
uses: actions/cache@v2
7977
with:
8078
path: '**/node_modules'
81-
key: ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-lint-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
79+
key: |
80+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-lint-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
8281
8382
- name: Cache yarn packages
8483
id: cache-yarn-packages
8584
if: steps.cache-node-modules.outputs.cache-hit != 'true'
86-
uses: actions/cache@v1
85+
uses: actions/cache@v2
8786
with:
8887
path: .yarn-packages
89-
key: ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
88+
key: |
89+
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
9090
restore-keys: |
9191
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
9292
${{ env.CACHE_EPOCH }}-yarn-
@@ -107,6 +107,9 @@ jobs:
107107
- name: Lint frontend
108108
run: jlpm lint:check
109109

110+
- name: Check distributions
111+
run: python scripts/distcheck.py
112+
110113
build:
111114
name: build
112115
runs-on: ${{ matrix.os }}
@@ -128,7 +131,7 @@ jobs:
128131
nodejs: '${{ matrix.nodejs }}'
129132

130133
- name: Cache conda
131-
uses: actions/cache@v1
134+
uses: actions/cache@v2
132135
with:
133136
path: ~/conda_pkgs_dir
134137
key: |
@@ -139,8 +142,7 @@ jobs:
139142
- name: Set up Python and mamba
140143
uses: conda-incubator/setup-miniconda@v2
141144
with:
142-
installer-url: ${{ env.MAMBAFORGE_URL }}-Linux-x86_64.sh
143-
condarc-file: .github/.condarc
145+
miniforge-variant: Mambaforge
144146

145147
- name: Install minimal build deps
146148
shell: bash -l {0}
@@ -151,15 +153,17 @@ jobs:
151153
uses: actions/cache@v2
152154
with:
153155
path: '**/node_modules'
154-
key: ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-build-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
156+
key: |
157+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-build-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
155158
156159
- name: Cache yarn packages
157160
id: cache-yarn-packages
158161
if: steps.cache-node-modules.outputs.cache-hit != 'true'
159-
uses: actions/cache@v1
162+
uses: actions/cache@v2
160163
with:
161164
path: .yarn-packages
162-
key: ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
165+
key: |
166+
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
163167
restore-keys: |
164168
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
165169
${{ env.CACHE_EPOCH }}-yarn-
@@ -210,15 +214,16 @@ jobs:
210214
include:
211215
# if using 3.6, use an old node
212216
- python: 3.6
213-
# Node 10 end-of-life: April 2021
214-
nodejs: '>=10,<11.0.0.a0'
215-
# if using 3.7, use newer node, etc...
216-
- python: 3.7
217217
# Node 12 end-of-life: April 2022
218218
nodejs: '>=12,<13.0.0.a0'
219-
- python: 3.8
219+
# if using 3.7, use newer node, etc...
220+
- python: 3.7
220221
# Node 14 end-of-life: April 2023
221222
nodejs: '>=14,<15.0.0.a0'
223+
- python: 3.8
224+
# TODO: switch to Node 16 once gets merged https://github.com/conda-forge/nodejs-feedstock/pull/189
225+
# Node 15 end-of-life: June 2021
226+
nodejs: '>=15,<16.0.0.a0'
222227
# TODO: remove when mambaforge just works on setup-miniconda
223228
- os: ubuntu
224229
mambaforge: Linux-x86_64.sh
@@ -230,11 +235,6 @@ jobs:
230235
steps:
231236
- uses: actions/checkout@v2
232237

233-
- uses: julia-actions/setup-julia@v1
234-
235-
- name: Install Julia language server
236-
run: julia -e 'using Pkg; Pkg.add("LanguageServer")'
237-
238238
- name: Set JupyterLab and Node versions
239239
uses: cschleiden/replace-tokens@v1
240240
with:
@@ -246,7 +246,7 @@ jobs:
246246
nodejs: '${{ matrix.nodejs }}'
247247

248248
- name: Cache conda
249-
uses: actions/cache@v1
249+
uses: actions/cache@v2
250250
with:
251251
path: ~/conda_pkgs_dir
252252
key: |
@@ -257,24 +257,9 @@ jobs:
257257
- name: Set up Python and mamba
258258
uses: conda-incubator/setup-miniconda@v2
259259
with:
260-
installer-url: ${{ env.MAMBAFORGE_URL }}-${{ matrix.mambaforge }}
261-
python-version: ${{ matrix.python }}
262-
condarc-file: .github/.condarc
263-
264-
- name: Describe conda
265-
run: |
266-
conda info
267-
conda config --show-sources
268-
conda config --show
269-
270-
- name: Install conda dependencies (unix)
271-
if: ${{ matrix.os != 'windows' }}
272-
run: mamba env update -n test --file requirements/github-actions.yml
273-
274-
- name: Install conda dependencies (windows)
275-
if: ${{ matrix.os == 'windows' }}
276-
shell: cmd /C call {0}
277-
run: mamba env update -n test --file requirements/github-actions.yml
260+
environment-file: requirements/github-actions.yml
261+
miniforge-variant: Mambaforge
262+
use-mamba: true
278263

279264
- name: List all packages
280265
run: conda list
@@ -284,22 +269,26 @@ jobs:
284269
uses: actions/cache@v2
285270
with:
286271
path: '**/node_modules'
287-
key: ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-test-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
272+
key: |
273+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-atest-${{ hashFiles('yarn.lock') }}
288274
289275
- name: Cache yarn packages
290276
id: cache-yarn-packages
291277
if: steps.cache-node-modules.outputs.cache-hit != 'true'
292-
uses: actions/cache@v1
278+
uses: actions/cache@v2
293279
with:
294280
path: .yarn-packages
295-
key: ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
281+
key: |
282+
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
296283
restore-keys: |
297284
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
298285
${{ env.CACHE_EPOCH }}-yarn-
299286
300-
- name: install npm dependencies
301-
if: steps.cache-node-modules.outputs.cache-hit != 'true'
302-
run: ${{ env.JLPM_CMD }}
287+
- uses: actions/cache@v2
288+
with:
289+
path: ~/.julia/artifacts
290+
key: |
291+
${{ env.CACHE_EPOCH }}-julia-test-${{ runner.os }}-${{ env.JULIA_LANGSERVER }}
303292
304293
- uses: actions/download-artifact@v2
305294
with:
@@ -313,11 +302,28 @@ jobs:
313302
run: python -m pip check
314303

315304
- name: List server extensions
316-
run: jupyter server extension list
305+
run: |
306+
jupyter server extension list
307+
jupyter server extension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
308+
309+
- name: List notebook server extensions
310+
run: |
311+
jupyter serverextension list
312+
jupyter serverextension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
317313
318314
- name: List frontend extensions
319315
run: jupyter labextension list
320316

317+
- name: install node-based language servers
318+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
319+
run: ${{ env.JLPM_CMD }}
320+
321+
- name: Install Julia
322+
uses: julia-actions/setup-julia@v1
323+
324+
- name: Install Julia language server
325+
run: julia -e 'using Pkg; Pkg.add(Pkg.PackageSpec(;name="LanguageServer", version="${{ env.JULIA_LANGSERVER }}"))'
326+
321327
- name: Run python tests
322328
run: python scripts/utest.py
323329

@@ -382,3 +388,47 @@ jobs:
382388
jupyter server extension list
383389
jupyter labextension list 2>&1 | grep -ie "jupyterlab-lsp.*enabled.*ok" -
384390
jupyter server extension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
391+
392+
source:
393+
name: smoke source install ${{ matrix.os }}
394+
runs-on: ${{ matrix.os }}-latest
395+
needs: [build]
396+
strategy:
397+
fail-fast: false
398+
matrix:
399+
os: [ubuntu]
400+
python: ['3.6']
401+
nodejs: ['14']
402+
lab: ['>=3.0.0,<4.0.0a0']
403+
steps:
404+
- name: Install Python
405+
uses: actions/setup-python@v2
406+
with:
407+
python-version: ${{ matrix.python }}
408+
architecture: 'x64'
409+
- name: Setup Node
410+
uses: actions/setup-node@v2
411+
with:
412+
node-version: ${{matrix.nodejs}}
413+
- uses: actions/download-artifact@v2
414+
with:
415+
name: jupyterlab-lsp dist ${{ github.run_number }}
416+
path: ./dist
417+
- name: Install the prerequisites
418+
run: python -m pip install pip wheel
419+
- name: Install JupyterLab
420+
shell: bash -l {0}
421+
run: python -m pip install 'jupyterlab${{ matrix.lab }}'
422+
- name: Install the server package
423+
run: cd dist && python -m pip install -vv jupyter_lsp*.whl
424+
- name: install the source extension
425+
run: cd dist && jupyter labextension install krassowski-jupyterlab-lsp-*.tgz --log-level DEBUG
426+
- name: Validate the install
427+
run: |
428+
set -eux
429+
jupyter labextension list
430+
jupyter server extension list
431+
jupyter serverextension list
432+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-lsp.*enabled.*ok" -
433+
jupyter server extension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
434+
jupyter serverextension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -

0 commit comments

Comments
 (0)