Skip to content

Commit 8d904f9

Browse files
authored
Merge pull request #723 from bollwyvl/gh-718-ci-pythons
Update Pythons in CI
2 parents 7158551 + dbb7d23 commit 8d904f9

File tree

13 files changed

+99
-70
lines changed

13 files changed

+99
-70
lines changed

.github/workflows/job.test.yml

Lines changed: 56 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
- 2.x
1212
workflow_dispatch:
1313

14+
# TODO: might need to tweak `group`
15+
concurrency:
16+
group: ${{ github.head_ref }}
17+
cancel-in-progress: true
18+
1419
defaults:
1520
run:
1621
shell: bash -l {0}
@@ -31,12 +36,13 @@ env:
3136
jobs:
3237
lint:
3338
name: jstest/lint
34-
runs-on: ${{ matrix.os }}
39+
runs-on: ${{ matrix.os }}-latest
3540
strategy:
3641
matrix:
37-
os: [ubuntu-latest]
42+
os: [ubuntu]
3843
nodejs: ['>=14,<15.0.0a0']
3944
lab: ['>=3.0.0,<4.0.0a0']
45+
r: ['>=4']
4046
steps:
4147
- uses: actions/checkout@v2
4248

@@ -77,7 +83,7 @@ jobs:
7783
with:
7884
path: '**/node_modules'
7985
key: |
80-
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-lint-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
86+
${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-build-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
8187
8288
- name: Cache yarn packages
8389
id: cache-yarn-packages
@@ -104,6 +110,9 @@ jobs:
104110
- name: Lint backend
105111
run: python scripts/lint.py
106112

113+
- name: 'Revert templated file (TODO: remove)'
114+
run: git checkout requirements/github-actions.yml
115+
107116
- name: Lint frontend
108117
run: jlpm lint:check
109118

@@ -112,12 +121,13 @@ jobs:
112121

113122
build:
114123
name: build
115-
runs-on: ${{ matrix.os }}
124+
runs-on: ${{ matrix.os }}-latest
116125
strategy:
117126
matrix:
118-
os: [ubuntu-latest]
127+
os: [ubuntu]
119128
nodejs: ['>=14,<15.0.0a0']
120129
lab: ['>=3.0.0,<4.0.0a0']
130+
r: ['>=4']
121131
steps:
122132
- uses: actions/checkout@v2
123133

@@ -203,35 +213,27 @@ jobs:
203213
path: ./dist
204214

205215
acceptance:
206-
runs-on: ${{ matrix.os }}
207-
name: atest ${{ matrix.os }} py${{ matrix.python }}
216+
runs-on: ${{ matrix.os }}-latest
217+
name: atest ${{ matrix.os }} py${{ matrix.python }} r${{ matrix.r }}
208218
needs: [build]
209219
strategy:
210220
# TODO: maybe turn back on
211221
fail-fast: false
212222
matrix:
213-
os: ['ubuntu-latest', 'macos-10.15', 'windows-latest']
214-
python: [3.6, 3.7, 3.8]
215-
lab: ['>=3.0.0,<4.0.0a0']
223+
os: ['ubuntu', 'macos', 'windows']
224+
python: ['3.7', '3.10']
216225
include:
217-
# if using 3.6, use an old node
218-
- python: 3.6
226+
# if using 3.7, use newer node, etc...
227+
- python: '3.7'
219228
# Node 12 end-of-life: April 2022
220229
nodejs: '>=12,<13.0.0.a0'
221-
# if using 3.7, use newer node, etc...
222-
- python: 3.7
223-
# Node 14 end-of-life: April 2023
224-
nodejs: '>=14,<15.0.0.a0'
225-
- python: 3.8
230+
r: '<4'
231+
lab: '>=3.0.0,<3.1'
232+
- python: '3.10'
226233
# Node 16 end-of-life: April 2024
227234
nodejs: '>=16,<17.0.0.a0'
228-
# TODO: remove when mambaforge just works on setup-miniconda
229-
- os: 'ubuntu-latest'
230-
mambaforge: Linux-x86_64.sh
231-
- os: 'macos-10.15'
232-
mambaforge: MacOSX-x86_64.sh
233-
- os: 'windows-latest'
234-
mambaforge: Windows-x86_64.exe
235+
r: '>=4'
236+
lab: '>=3.2.0,<4'
235237

236238
steps:
237239
- uses: actions/checkout@v2
@@ -355,28 +357,38 @@ jobs:
355357

356358
smoke:
357359
name: smoke ${{ matrix.os }} py${{ matrix.python }}
358-
runs-on: ${{ matrix.os }}
360+
runs-on: ${{ matrix.os }}-latest
359361
needs: [build, lint]
360362
strategy:
361363
fail-fast: false
364+
max-parallel: 3
362365
matrix:
363-
os: ['ubuntu-latest', 'macos-10.15', 'windows-latest']
364-
python: ['3.6', '3.9', 'pypy3']
366+
os: ['ubuntu', 'macos', 'windows']
367+
python: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.7']
365368
exclude:
366369
- os: windows
367-
python: pypy3
370+
python: pypy-3.7
368371
include:
369-
- python: '3.6'
370-
dist: 'jupyter*lsp*.tar.gz'
371-
- python: 'pypy3'
372+
- python: '3.7'
372373
dist: 'jupyter*lsp*.tar.gz'
374+
lab: '>=3,<3.1'
375+
- python: '3.8'
376+
dist: 'jupyter*lsp*.whl'
377+
lab: '>=3,<3.1'
373378
- python: '3.9'
379+
dist: 'jupyter*lsp*.tar.gz'
380+
lab: '>=3.2,<3.3'
381+
- python: '3.10'
374382
dist: 'jupyter*lsp*.whl'
375-
- os: 'windows-latest'
383+
lab: '>=3.2,<4'
384+
- python: 'pypy-3.7'
385+
dist: 'jupyter*lsp*.tar.gz'
386+
lab: '>=3.2,<3.3'
387+
- os: 'windows'
376388
py_cmd: python
377-
- os: 'macos-10.15'
389+
- os: 'macos'
378390
py_cmd: python3
379-
- os: 'ubuntu-latest'
391+
- os: 'ubuntu'
380392
py_cmd: python
381393
steps:
382394
- name: Install Python
@@ -391,7 +403,7 @@ jobs:
391403
- name: Install the prerequisites
392404
run: ${{ matrix.py_cmd }} -m pip install pip wheel
393405
- name: Install the package
394-
run: cd dist && ${{ matrix.py_cmd }} -m pip install -vv ${{ matrix.dist }}
406+
run: cd dist && ${{ matrix.py_cmd }} -m pip install -vv ${{ matrix.dist }} 'jupyterlab${{ matrix.lab }}'
395407
- name: Validate environment
396408
run: |
397409
set -eux
@@ -406,16 +418,20 @@ jobs:
406418
jupyter server extension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
407419
408420
source:
409-
name: smoke source install ${{ matrix.os }}
421+
name: smoke source install ${{ matrix.os }} py${{ matrix.python }} lab${{ matrix.lab }}
410422
runs-on: ${{ matrix.os }}-latest
411423
needs: [build]
412424
strategy:
413425
fail-fast: false
414426
matrix:
415427
os: [ubuntu]
416-
python: ['3.6']
428+
python: ['3.7', '3.10']
417429
nodejs: ['14']
418-
lab: ['>=3.0.0,<4.0.0a0']
430+
include:
431+
- python: '3.7'
432+
lab: '>=3,<3.1'
433+
- python: '3.10'
434+
lab: '>=3.2,<4'
419435
steps:
420436
- name: Install Python
421437
uses: actions/setup-python@v2
@@ -425,13 +441,13 @@ jobs:
425441
- name: Setup Node
426442
uses: actions/setup-node@v2
427443
with:
428-
node-version: ${{matrix.nodejs}}
444+
node-version: ${{ matrix.nodejs }}
429445
- uses: actions/download-artifact@v2
430446
with:
431447
name: jupyterlab-lsp dist ${{ github.run_number }}
432448
path: ./dist
433449
- name: Install the prerequisites
434-
run: python -m pip install pip wheel
450+
run: python -m pip install --upgrade pip wheel setuptools
435451
- name: Install JupyterLab
436452
shell: bash -l {0}
437453
run: python -m pip install 'jupyterlab${{ matrix.lab }}'

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ _build
120120
.idea/
121121

122122
# Built labextensions
123-
python_packages/jupyterlab_lsp/jupyterlab_lsp/labextensions/
123+
python_packages/*/*/labextensions/

.readthedocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ version: 2
33
sphinx:
44
configuration: docs/conf.py
55

6+
build:
7+
os: ubuntu-20.04
8+
tools:
9+
python: mambaforge-4.10
10+
611
conda:
712
environment: docs/rtd.yml
813

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ Thank you for all your contributions :heart:
3131

3232
Development requires, at a minimum:
3333

34-
- `nodejs >=12,<15`
35-
- `python >=3.6,<3.9.0a0`
36-
- Python 3.7 and 3.8 are also tested on CI
37-
- Python 3.6 has issues on Windows
34+
- `nodejs >=12,!=13,!=15,<17`
35+
- `python >=3.7,<3.11.0a0`
36+
- Python 3.7 and 3.10 are fully tested on CI
37+
- Python 3.7 to 3.10 and PyPy 3 are verified to at least install and import
3838
- `jupyterlab >=3.0.0,<4.0.0a0`
3939

4040
It is recommended to use a virtual environment (e.g. `virtualenv` or `conda env`)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Use context menu on rows in the panel to filter out diagnostics or copy their me
9191
You will need to have both of the following installed:
9292

9393
- JupyterLab >=3.0.0,<4.0.0a0
94-
- Python 3.6+
94+
- Python 3.7+
9595

9696
In addition, if you wish to use javascript, html, markdown or any other NodeJS-based language server you will need to have appropriate NodeJS version installed.
9797

binder/environment.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ channels:
66

77
dependencies:
88
# runtime dependencies
9-
- python >=3.6,<3.9.0a0
9+
- python >=3.7,<3.11.0a0
1010
- jupyterlab >=3.0.0,<4.0.0a0
1111
- jupyter_server >=1.1.2
12-
- retrolab >=0.2.0,<0.3
12+
- retrolab >=0.3.0,<0.4
1313
# build dependencies
14-
- nodejs >=12,<15
14+
- nodejs >=12,!=13,!=15,<17
1515
# for python language server (and development)
1616
- flake8 >=3.5
1717
- pip

docs/rtd.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ name: jupyterlab-lsp-docs
33

44
channels:
55
- conda-forge
6+
- nodefaults
67

78
dependencies:
8-
- nodejs >=12,<13
9+
- importlib_metadata
10+
- jupyterlab >=3.0.0,<4.0.0a0
11+
- myst-nb
12+
- nodejs >=12,!=13,!=15,<17
13+
- pandas
914
- pip
10-
- python >=3.8,<3.9.0a0
15+
- pytest-check-links
16+
- python >=3.7,<3.11.0a0
17+
- python-graphviz
18+
- python-lsp-server
19+
- sphinx
20+
- sphinx-autodoc-typehints
21+
- sphinx-book-theme
22+
- sphinx-copybutton
1123
- pip:
1224
- -e ../python_packages/jupyter_lsp/
13-
- graphviz
14-
- importlib_metadata
15-
- jupyterlab >=3.0.0,<4.0.0a0
16-
- nbsphinx >=0.5.0,<0.5.1a0
17-
- pandas
18-
- pytest-check-links
19-
- myst-nb
20-
- python-lsp-server
21-
- sphinx
22-
- sphinx-autodoc-typehints
23-
- sphinx-copybutton
24-
- sphinx-book-theme

python_packages/jupyter_lsp/jupyter_lsp/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def jsonrpc_init_msg():
101101
# LanguageServer.jl assumes that it is not missing
102102
"workspace": {"didChangeConfiguration": {}},
103103
# LanguageServer.jl assumes that it is not missing
104-
"textDocument": {}
104+
"textDocument": {},
105105
},
106106
"initializationOptions": None,
107107
"processId": None,

python_packages/jupyter_lsp/jupyter_lsp/tests/test_paths.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,16 @@ def test_normalize_posix_path_home_subdir(
4242
],
4343
)
4444
def test_normalize_windows_path_case(root_dir, expected_root_uri): # pragma: no cover
45-
assert normalized_uri(root_dir) == expected_root_uri
45+
46+
try:
47+
normalized = normalized_uri(root_dir)
48+
except FileNotFoundError as err:
49+
if sys.version_info >= (3, 10):
50+
# apparently, this triggers resolving the path on win/py3.10
51+
return
52+
raise err
53+
54+
assert normalized == expected_root_uri
4655

4756

4857
@pytest.mark.skipif(WIN, reason="can't test POSIX paths on Windows")

python_packages/jupyter_lsp/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ classifiers =
2626
packages = find:
2727
include_package_data = True
2828
zip_safe = False
29-
python_requires = >=3.6
29+
python_requires = >=3.7
3030

3131
install_requires =
3232
jupyter_server >=1.1.2

0 commit comments

Comments
 (0)