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

Support JupyterLab 2.2 #301

Merged
merged 16 commits into from
Aug 11, 2020
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
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: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
## CHANGELOG

### `@krassowski/jupyterlab-lsp 1.2.0` (unreleased)

- features

- support for JupyterLab 2.2 ([#301][])
- completer now displays server-provided documentation,
and a kernel icon for kernel suggestions without type information ([#301][])

- bug fixes

- path-autocompletion issues were resolved upstream an this release adopts these changes

[#301]: https://github.com/krassowski/jupyterlab-lsp/pull/301

### `@krassowski/jupyterlab-lsp 1.1.2` (2020-08-05)

- bug fixes
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Open it searching for "Show diagnostics panel" in JupyterLab commands palette or

Either:

- JupyterLab >=2.1.0,<3.0.0a0
- JupyterLab >=2.2.0,<3.0.0a0

And:

Expand All @@ -99,9 +99,9 @@ Use of a python `virtualenv` or a conda env is also recommended.
1. install JupyterLab

```bash
conda install -c conda-forge 'jupyterlab>=2.1,<3.0.0a0'
conda install -c conda-forge 'jupyterlab>=2.2,<3.0.0a0'
# or
pip install 'jupyterlab>=2.1,<3.0.0a0'
pip install 'jupyterlab>=2.2,<3.0.0a0'
```

1. install the server extension:
Expand Down
27 changes: 25 additions & 2 deletions atest/05_Features/Completion.robot
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,27 @@ Autocompletes If Only One Option
Enter Cell Editor 3 line=1
Press Keys None cle
Wait Until Fully Initialized
# First tab brings up the completer
Press Keys None TAB
Completer Should Suggest clear
# Second tab inserts the only suggestion
Press Keys None TAB
# depends on Python list type having only one method with prefix "cle"
Wait Until Keyword Succeeds 40x 0.5s Cell Editor Should Equal 3 list.clear

Does Not Autocomplete If Multiple Options
Enter Cell Editor 3 line=1
Press Keys None c
Wait Until Fully Initialized
# First tab brings up the completer
Press Keys None TAB
Completer Should Suggest copy
# Second tab inserts should not insert the first of many choices.
Press Keys None TAB
# depends on Python list type having multiple methods with prefix "c"
# in this case "Completer Should Suggest" means that the completer is still shown!
Completer Should Suggest copy

User Can Select Lowercase After Starting Uppercase
# `from time import Tim<tab>` → `from time import time`
Enter Cell Editor 5 line=1
Expand All @@ -58,12 +76,16 @@ Mid Token Completions Do Not Overwrite
# `disp<tab>data` → `display_table<cursor>data`
Place Cursor In Cell Editor At 9 line=1 character=4
Capture Page Screenshot 01-cursor-placed.png
Press Keys None TAB
Trigger Completer
Completer Should Suggest display_table
Select Completer Suggestion display_table
Capture Page Screenshot 02-completed.png
Wait Until Keyword Succeeds 40x 0.5s Cell Editor Should Equal 9 display_tabledata
# `disp<tab>lay` → `display_table<cursor>`
Place Cursor In Cell Editor At 11 line=1 character=4
Press Keys None TAB
Trigger Completer
Completer Should Suggest display_table
Select Completer Suggestion display_table
Wait Until Keyword Succeeds 40x 0.5s Cell Editor Should Equal 11 display_table

Completion Works For Tokens Separated By Space
Expand Down Expand Up @@ -108,6 +130,7 @@ Cell Editor Should Equal
Select Completer Suggestion
[Arguments] ${text}
${suggestion} = Set Variable css:.jp-Completer-item[data-value="${text}"]
Wait Until Element Is Visible ${suggestion} timeout=10s
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this works! 🤞

Mouse Over ${suggestion}
Click Element ${suggestion} code

Expand Down
2 changes: 1 addition & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channels:
dependencies:
# runtime dependencies
- python >=3.7,<3.8.0a0
- jupyterlab >=2.1.0,<3.0.0a0
- jupyterlab >=2.2.0,<3.0.0a0
- notebook >=4.3.1
# build dependencies
- nodejs >=10,<14
Expand Down
6 changes: 3 additions & 3 deletions ci/job.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ parameters:
pythons:
- name: ThreeSix
spec: '=3.6'
lab: '>=2.1.0,<3.0.0a0'
lab: '>=2.2.0,<3.0.0a0'
nodejs: '>=10,<11.0.0.a0'
- name: ThreeSeven
spec: '=3.7'
lab: '>=2.1.0,<3.0.0a0'
lab: '>=2.2.0,<3.0.0a0'
nodejs: '>=12,<13.0.0a0'
- name: ThreeEight
spec: '=3.8'
lab: '>=2.1.0,<3.0.0a0'
lab: '>=2.2.0,<3.0.0a0'
nodejs: '>=13,<14.0.0a0'
js_cov_packages:
- jupyterlab-go-to-definition
Expand Down
2 changes: 2 additions & 0 deletions docs/Releasing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
"- `packages/jupyterlab-lsp/package.json` > `devDependencies` >\n",
" `@jupyterlab/application` (canonical)\n",
"- `binder/environment.yml`\n",
"- `requirements/lab.txt`\n",
"- `ci/job.test.yml`\n",
"- `README.md`\n",
"\n",
"### Releasing:\n",
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"bash-language-server": "^1.6.1",
"dictionary-en": "^3.0.0",
"dockerfile-language-server-nodejs": "^0.0.22",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react": "^7.19.0",
"eslint": "^6.8.0",
"husky": "^3.0.9",
"javascript-typescript-langserver": "^2.11.3",
"lerna": "^3.13.2",
Expand All @@ -25,7 +25,6 @@
},
"husky": {
"hooks": {
"pre-commit": "precise-commits"
}
},
"prettier": {
Expand Down
44 changes: 22 additions & 22 deletions packages/jupyterlab-go-to-definition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,37 @@
"test": "jlpm jest --coverage --coverageReporters=cobertura --coverageReporters=html --coverageReporters=text-summary"
},
"peerDependencies": {
"@jupyterlab/application": "~2.0.0",
"@jupyterlab/apputils": "~2.0.0",
"@jupyterlab/codeeditor": "~2.0.0",
"@jupyterlab/codemirror": "~2.0.0",
"@jupyterlab/coreutils": "~4.0.0",
"@jupyterlab/docmanager": "~2.0.0",
"@jupyterlab/docregistry": "~2.0.0",
"@jupyterlab/fileeditor": "~2.0.0",
"@jupyterlab/notebook": "~2.0.0",
"@jupyterlab/observables": "~3.0.0",
"@jupyterlab/services": "~5.0.0",
"@jupyterlab/application": "~2.2.0",
"@jupyterlab/apputils": "~2.2.0",
"@jupyterlab/codeeditor": "~2.2.0",
"@jupyterlab/codemirror": "~2.2.0",
"@jupyterlab/coreutils": "~4.2.0",
"@jupyterlab/docmanager": "~2.2.0",
"@jupyterlab/docregistry": "~2.2.0",
"@jupyterlab/fileeditor": "~2.2.0",
"@jupyterlab/notebook": "~2.2.0",
"@jupyterlab/observables": "~3.2.0",
"@jupyterlab/services": "~5.2.0",
"@lumino/algorithm": "*",
"codemirror": "*",
"react": "*"
},
"devDependencies": {
"@jupyterlab/application": "~2.0.0",
"@jupyterlab/apputils": "~2.0.0",
"@jupyterlab/codeeditor": "~2.0.0",
"@jupyterlab/codemirror": "~2.0.0",
"@jupyterlab/application": "~2.2.0",
"@jupyterlab/apputils": "~2.2.0",
"@jupyterlab/codeeditor": "~2.2.0",
"@jupyterlab/codemirror": "~2.2.0",
"@jupyterlab/coreutils": "~4.0.0",
"@jupyterlab/docmanager": "~2.0.0",
"@jupyterlab/docregistry": "~2.0.0",
"@jupyterlab/fileeditor": "~2.0.0",
"@jupyterlab/notebook": "~2.0.0",
"@jupyterlab/observables": "~3.0.0",
"@jupyterlab/services": "~5.0.0",
"@jupyterlab/docmanager": "~2.2.0",
"@jupyterlab/docregistry": "~2.2.0",
"@jupyterlab/fileeditor": "~2.2.0",
"@jupyterlab/notebook": "~2.2.0",
"@jupyterlab/observables": "~3.2.0",
"@jupyterlab/services": "~5.2.0",
"@lumino/algorithm": "*",
"codemirror": "*",
"react": "*",
"@jupyterlab/testutils": "~2.0.0",
"@jupyterlab/testutils": "~2.2.0",
"@types/codemirror": "^0.0.74",
"@types/chai": "^4.1.7",
"@types/jest": "^23.3.11",
Expand Down
2 changes: 1 addition & 1 deletion packages/jupyterlab-go-to-definition/src/jumpers/jumper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const system_keys = [
'F2',
'F3',
'F4',
' F5',
'F5',
'F6',
'F7',
'F8',
Expand Down
62 changes: 31 additions & 31 deletions packages/jupyterlab-lsp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@
},
"devDependencies": {
"@babel/preset-env": "^7.4.3",
"@jupyterlab/application": "~2.1.0",
"@jupyterlab/apputils": "~2.0.0",
"@jupyterlab/cells": "~2.0.0",
"@jupyterlab/codeeditor": "~2.0.0",
"@jupyterlab/codemirror": "~2.0.0",
"@jupyterlab/completer": "~2.0.0",
"@jupyterlab/coreutils": "~4.0.0",
"@jupyterlab/docmanager": "~2.0.0",
"@jupyterlab/docregistry": "~2.0.0",
"@jupyterlab/fileeditor": "~2.0.0",
"@jupyterlab/notebook": "~2.0.0",
"@jupyterlab/rendermime": "~2.0.0",
"@jupyterlab/services": "~5.0.0",
"@jupyterlab/statusbar": "~2.0.0",
"@jupyterlab/testutils": "~2.0.0",
"@jupyterlab/tooltip": "~2.0.0",
"@jupyterlab/application": "~2.2.0",
"@jupyterlab/apputils": "~2.2.0",
"@jupyterlab/cells": "~2.2.0",
"@jupyterlab/codeeditor": "~2.2.0",
"@jupyterlab/codemirror": "~2.2.0",
"@jupyterlab/completer": "~2.2.0",
"@jupyterlab/coreutils": "~4.2.0",
"@jupyterlab/docmanager": "~2.2.0",
"@jupyterlab/docregistry": "~2.2.0",
"@jupyterlab/fileeditor": "~2.2.0",
"@jupyterlab/notebook": "~2.2.0",
"@jupyterlab/rendermime": "~2.2.0",
"@jupyterlab/services": "~5.2.0",
"@jupyterlab/statusbar": "~2.2.0",
"@jupyterlab/testutils": "~2.2.0",
"@jupyterlab/tooltip": "~2.2.0",
"@lumino/algorithm": "*",
"@lumino/widgets": "*",
"@types/chai": "^4.1.7",
Expand All @@ -77,21 +77,21 @@
"typescript": "~3.9.5"
},
"peerDependencies": {
"@jupyterlab/application": "~2.1.0",
"@jupyterlab/apputils": "~2.0.0",
"@jupyterlab/cells": "~2.0.0",
"@jupyterlab/codeeditor": "~2.0.0",
"@jupyterlab/codemirror": "~2.0.0",
"@jupyterlab/completer": "~2.0.0",
"@jupyterlab/coreutils": "~4.0.0",
"@jupyterlab/docmanager": "~2.0.0",
"@jupyterlab/docregistry": "~2.0.0",
"@jupyterlab/fileeditor": "~2.0.0",
"@jupyterlab/notebook": "~2.0.0",
"@jupyterlab/rendermime": "~2.0.0",
"@jupyterlab/services": "~5.0.0",
"@jupyterlab/statusbar": "~2.0.0",
"@jupyterlab/tooltip": "~2.0.0",
"@jupyterlab/application": "~2.2.0",
"@jupyterlab/apputils": "~2.2.0",
"@jupyterlab/cells": "~2.2.0",
"@jupyterlab/codeeditor": "~2.2.0",
"@jupyterlab/codemirror": "~2.2.0",
"@jupyterlab/completer": "~2.2.0",
"@jupyterlab/coreutils": "~4.2.0",
"@jupyterlab/docmanager": "~2.2.0",
"@jupyterlab/docregistry": "~2.2.0",
"@jupyterlab/fileeditor": "~2.2.0",
"@jupyterlab/notebook": "~2.2.0",
"@jupyterlab/rendermime": "~2.2.0",
"@jupyterlab/services": "~5.2.0",
"@jupyterlab/statusbar": "~2.2.0",
"@jupyterlab/tooltip": "~2.2.0",
"@lumino/algorithm": "*",
"@lumino/widgets": "*",
"codemirror": "*",
Expand Down
Loading