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

JupyterLab 3 support v2 #452

Merged
merged 78 commits into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
64ed3de
JupyterLab 3
martinRenou Nov 9, 2020
acd0163
Working version without jupyter-packaging
martinRenou Nov 13, 2020
a170681
Fix import
martinRenou Nov 13, 2020
c52ed55
Remove jupyter-packaging
martinRenou Nov 13, 2020
1a0341d
Bring back the original postBuild command
martinRenou Nov 13, 2020
43801d7
Build schemas
martinRenou Nov 13, 2020
a5a5bc6
Install pytest-tornasync from conda-forge
martinRenou Nov 13, 2020
80a9973
Remove use of chdir
martinRenou Nov 13, 2020
21c2cbc
Fix data_files
martinRenou Nov 13, 2020
df6bac2
Revert name change
martinRenou Nov 13, 2020
a1f87ac
Update docs and lab dependency in binder to rc10
karlaspuldaro Nov 20, 2020
eba0e53
Update dependencies to rc10
karlaspuldaro Nov 23, 2020
73c4ee3
Merge pull request #1 from karlaspuldaro/kspuldaro-lab3
martinRenou Nov 26, 2020
c90dac3
Merge branch 'jupyterlab3' of ssh://github.com/martinRenou/jupyterlab…
krassowski Jan 2, 2021
81753b4
Update versions/code-jumpers transition for JupyterLab 3.0
krassowski Jan 2, 2021
5d6bdce
Remove RC channels and versions
krassowski Jan 2, 2021
3b7ff1a
Remove RC suffixes
krassowski Jan 2, 2021
d60f7c2
Lint and integrity checks (note: Node 12 required by v3.0)
krassowski Jan 2, 2021
7e9de94
Release lumino widgets pin which was causing build error
krassowski Jan 2, 2021
ec3bfb0
Update dependencies
krassowski Jan 2, 2021
fab7e59
Restore lumino widgets pin
krassowski Jan 2, 2021
f4c286c
Set promise type to void
krassowski Jan 2, 2021
3b61f8c
Update typescript
krassowski Jan 2, 2021
b7b9016
Temporarily disable karma tests
krassowski Jan 2, 2021
fdca601
Use ServerApp.jpserver_extensions
krassowski Jan 2, 2021
0d9455b
Fix warning: manifest_maker: MANIFEST.in, line 3: 'recursive-include'…
krassowski Jan 2, 2021
0eb1927
Migrate to jupyter_server
krassowski Jan 2, 2021
e413a27
Lint and mypy adaptations for jupyter_server
krassowski Jan 2, 2021
bc1cc05
One final notebook → jupyter_server
krassowski Jan 2, 2021
c18ee69
Update CONTRIBUTING.md
krassowski Jan 2, 2021
bbd36ff
Restore jump in build
krassowski Jan 2, 2021
ed651b6
Ling bump versions
krassowski Jan 2, 2021
0edeecf
Update test workflow
krassowski Jan 2, 2021
cd15e3e
Use labextension for now
krassowski Jan 2, 2021
760f966
More jupyter_notebook_config.json → jupyter_server_config.json
krassowski Jan 2, 2021
544c314
Adapt robot for JupyterLab 3.0
krassowski Jan 2, 2021
aacbdb6
Fix syntax highlighting (needs import of cm/mode/meta)
krassowski Jan 2, 2021
b54b3fc
Update themes commands
krassowski Jan 3, 2021
43b0271
Workaround visibility issue (TypeError: rect is undefined)
krassowski Jan 3, 2021
bf9f424
Add install.json file with uninstall instructions
krassowski Jan 3, 2021
23d3df5
Update eslint dev-dependencies
krassowski Jan 3, 2021
5c329ca
Make code jumpers accept minor version bumps
krassowski Jan 3, 2021
e7c46de
Bump versions and fix jest eslint errors
krassowski Jan 3, 2021
a24a475
Pass string for install.json, not path
krassowski Jan 3, 2021
5e6af22
Update and simplify readme
krassowski Jan 3, 2021
688e682
Try to check what's wrong with the docs
krassowski Jan 3, 2021
dd59718
Revert docs conf.py modifications (output was being printed out all a…
krassowski Jan 3, 2021
f350a08
Pin node 12 for RTD
krassowski Jan 3, 2021
de5c618
Update installation documentation
krassowski Jan 3, 2021
02cd810
Fix integrity check
krassowski Jan 3, 2021
842570c
Add missing new line
krassowski Jan 3, 2021
3c736b5
Split into jupyter_lsp and jupyterlab_lsp
krassowski Jan 3, 2021
6982c48
Remove more py_src
krassowski Jan 3, 2021
000f3a2
Update package location for docs
krassowski Jan 3, 2021
976ba86
Fix typo, rename install in readme
krassowski Jan 3, 2021
63e31a9
Fix lint
krassowski Jan 3, 2021
c89e0e7
Improve separation of packages
krassowski Jan 3, 2021
0f9b7a0
Add LICENCE files
krassowski Jan 3, 2021
4c8d0bd
Be explicit about package names
krassowski Jan 3, 2021
1193fa3
Fix more typos
krassowski Jan 3, 2021
1f5d4de
This is the price we would have to pay for keeping the shorter hierarchy
krassowski Jan 3, 2021
ce76fab
Give up on using src as package root
krassowski Jan 4, 2021
cbbefe7
Remove one more old path
krassowski Jan 4, 2021
e9bf79a
Correct manifest
krassowski Jan 4, 2021
191e631
Lint
krassowski Jan 4, 2021
816bbdb
Ignore "import not on top of file" in nblint
krassowski Jan 4, 2021
fb6eeed
Lint temporary readme jupyterlab_lsp
krassowski Jan 4, 2021
f59f598
[squash] Jupyterlab3 CI updates (#454)
bollwyvl Jan 4, 2021
9a8969e
Prepare for jupyterlab_lsp rc0 (#455)
krassowski Jan 5, 2021
dea4132
Set jupyter_lsp to rc0
krassowski Jan 5, 2021
664c973
Update issue templates
krassowski Jan 5, 2021
495bc5c
Update CONTRIBUTING.md: add jupyter develop for symlinking,
krassowski Jan 5, 2021
cdee4d1
Restore and check setup.cfg integrity
krassowski Jan 6, 2021
4749fbe
Remove rc tags
krassowski Jan 6, 2021
7ab97db
Release suffix can be empty
krassowski Jan 6, 2021
228bdd0
Add pip check
krassowski Jan 6, 2021
a0baf84
add pip-only smoke test of installing artifacts
bollwyvl Jan 6, 2021
5f259fe
Merge pull request #456 from bollwyvl/add-pure-python-install-test
krassowski Jan 6, 2021
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
2 changes: 1 addition & 1 deletion .github/workflows/job.lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
os: [ubuntu-16.04]
python: [3.8]
nodejs: ['>=12,<13.0.0a0']
lab: ['>=2,<3.0.0a0']
lab: ['>=3.0.0,<4.0.0a0']
steps:
- uses: actions/checkout@v2

Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/job.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
matrix:
os: [ubuntu, macos, windows]
python: [3.6, 3.7, 3.8]
lab: ['>=2.2.0,<3.0.0a0']
lab: ['>=3.0.0,<4.0.0a0']
include:
# if using 3.6, use an old node
- python: 3.6
Expand Down Expand Up @@ -111,9 +111,6 @@ jobs:
- name: Build python distributions
run: python setup.py sdist bdist_wheel

- name: Build npm bundles
run: jlpm lerna run bundle

- name: Install python wheel
run: cd dist && python -m pip install jupyter_lsp-${{ env.PY_JLSP_VERSION }}-py3-none-any.whl --no-deps

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,6 @@ coverage/
_*.d.ts
_build
.virtual_documents/

# Built labextensions
py_src/jupyter_lsp/labextensions/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.mypy_cache
.pytest_cache
.yarn-packages
**/_*.d.ts
**/.ipynb_checkpoints
**/*.egg-info
**/build
Expand Down
11 changes: 5 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ You can contribute to the project through:

Development requires, at a minimum:

- `nodejs >=10.12,<15`
- `nodejs >=12,<15`
- `python >=3.6,<3.9.0a0`
- Python 3.6 and 3.8 are also tested on CI
krassowski marked this conversation as resolved.
Show resolved Hide resolved
- Python 3.6 has issues on Windows
- `jupyterlab >=2.2.0,<3.0.0a0`
- `jupyterlab >=3.0.0,<4.0.0a0`

It is recommended to use a virtual environment (e.g. `virtualenv` or `conda env`)
for development.
Expand Down Expand Up @@ -67,7 +67,7 @@ This performs all of the basic setup steps, and is used for the binder demo.
Install `jupyter-lsp` from source in your virtual environment:

```bash
python -m pip install -e .
python -m pip install -e . --ignore-installed --no-deps -vv
```

Enable the server extension:
Expand All @@ -80,9 +80,8 @@ Install `npm` dependencies, build TypeScript packages, and link
to JupyterLab for development:

```bash
jlpm
jlpm build
jlpm lab:link
jlpm bootstrap
pip install .
```

### Frontend Development
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include LICENSE README.md
recursive-include py_src *.json *.R
recursive-include py_src/jupyter_lsp/labextensions
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ Use context menu on rows in the panel to filter out diagnostics or copy their me

You will need to have all of the following installed:

- JupyterLab >=2.2.0,<3.0.0a0
- JupyterLab >=3.0.0,<4.0.0a0
- Python 3.6+
- nodejs 10.12+
- nodejs 12+
Copy link
Collaborator

Choose a reason for hiding this comment

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

Someone just running pyls or r-languageserver won't need this at all 🎉!


## Installation

Expand All @@ -97,9 +97,9 @@ Use of a python `virtualenv` or a conda env is also recommended.
1. install JupyterLab and the server extension

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

> Note: With conda, you could take advantage of the bundles: `jupyter-lsp-python`
Expand Down
4 changes: 2 additions & 2 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ channels:
dependencies:
# runtime dependencies
- python >=3.6,<3.9.0a0
- jupyterlab >=2.2.0,<3.0.0a0
- jupyterlab >=3.0.0,<4.0.0a0
- notebook >=4.3.1
# build dependencies
- nodejs >=10.12,<15
- nodejs >=12,<15
# for python language server (and development)
- flake8 >=3.5
- pip
Expand Down
22 changes: 5 additions & 17 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
#!/usr/bin/env bash
set -eux

# do a dev install of the server side
python -m pip install -e . --ignore-installed --no-deps -vv
jupyter serverextension enable --sys-prefix --py jupyter_lsp

# should have no extensions
jupyter labextension list

# do a dev build of the client side
# Build labextensions
jlpm bootstrap

# link all pieces to lab (no build)
jlpm lab:link && jupyter labextension list

# list extensions before build
jupyter labextension list

# actually build
jupyter lab build --debug --dev-build=False --minimize=True
# Do a dev install of the server side
python -m pip install -e . --ignore-installed --no-deps -vv
jupyter serverextension enable --sys-prefix --py jupyter_lsp

# list extensions again
# List extensions
jupyter labextension list
4 changes: 2 additions & 2 deletions docs/Installation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"\n",
"- runs in your browser, as an extension to JupyterLab\n",
"- to install it, you need:\n",
" - `nodejs >=10.12,<15`\n",
" - `nodejs >=12,<15`\n",
" - `jupyterlab {REQUIRED_JUPYTERLAB}`\n",
"\n",
"#### Language Servers\n",
Expand Down Expand Up @@ -97,7 +97,7 @@
"#### conda (minimal python)\n",
"\n",
"```bash\n",
"conda create -c conda-forge -n lsp 'python >=3.7,<3.8' 'jupyterlab={JUPYTERLAB_VERSION}' 'nodejs >=10.12,<15' 'jupyter-lsp-python={JUPYTER_LSP_VERSION}'\n",
"conda create -c conda-forge -n lsp 'python >=3.7,<3.8' 'jupyterlab={JUPYTERLAB_VERSION}' 'nodejs >=12,<15' 'jupyter-lsp-python={JUPYTER_LSP_VERSION}'\n",
"# jupyter-lsp-python includes both the server extension (jupyter-lsp) and pyls third-party server (python-language-server)\n",
"# if you swap it with another pre-made bundle, jupyter-lsp-r, you will get the server extension and r-languageserver;\n",
"# alternatively, use jupyter-lsp and manually install a language server of your choice (see the table below).\n",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@
"private": true,
"scripts": {
"bootstrap": "jlpm --no-optional --prefer-offline && lerna bootstrap && jlpm lint && jlpm clean && jlpm build",
"build": "jlpm build:schema && jlpm build:completion-theme && jlpm build:theme-material && jlpm build:theme-vscode && jlpm build:jump && jlpm build:meta && jlpm build:ws",
"build": "jlpm build:schema && jlpm build:completion-theme && jlpm build:theme-material && jlpm build:theme-vscode && jlpm build:meta && jlpm build:ws && jlpm build:jupyterlab-lsp",
"build:schema": "lerna run build:schema --stream",
"build:meta": "lerna run build --stream --scope @krassowski/jupyterlab-lsp-metapackage",
"build:completion-theme": "lerna run build --stream --scope @krassowski/completion-theme",
"build:theme-vscode": "lerna run build --stream --scope @krassowski/theme-vscode",
"build:theme-material": "lerna run build --stream --scope @krassowski/theme-material",
"build:jupyterlab-lsp": "lerna run build --stream --scope @krassowski/jupyterlab-lsp",
"build:ws": "lerna run build --stream --scope lsp-ws-connection",
"build:jump": "lerna run build --stream --scope @krassowski/code-jumpers",
"watch": "lerna run --parallel watch",
"bundle": "lerna run --parallel bundle",
"clean": "lerna run --parallel clean",
"lab:link": "lerna run lab:link",
"lint:check": "jlpm prettier:check && jlpm eslint:check",
"lint": "jlpm prettier && jlpm eslint",
"prettier:check": "prettier --check \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md,.yml}\"",
Expand Down
1 change: 1 addition & 0 deletions packages/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = {
],
ignorePatterns: [
'**/node_modules/**/*',
'packages/jupyterlab-lsp/labextension/**/*',
'**/lib/**/*',
'**/_*.ts',
'**/_*.d.ts',
Expand Down
39 changes: 20 additions & 19 deletions packages/code-jumpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,31 @@
"lab:link": "jupyter labextension link . --no-build"
},
"peerDependencies": {
"@jupyterlab/apputils": "~2.2.0",
"@jupyterlab/codeeditor": "~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/apputils": "~3.0.0",
"@jupyterlab/codeeditor": "~3.0.0",
"@jupyterlab/coreutils": "~5.0.0",
"@jupyterlab/docmanager": "~3.0.0",
"@jupyterlab/docregistry": "~3.0.0",
"@jupyterlab/fileeditor": "~3.0.0",
"@jupyterlab/notebook": "~3.0.0",
"@jupyterlab/observables": "~4.0.0"
},
"devDependencies": {
"@jupyterlab/apputils": "~2.2.0",
"@jupyterlab/codeeditor": "~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/apputils": "~3.0.0",
"@jupyterlab/codeeditor": "~3.0.0",
"@jupyterlab/coreutils": "~5.0.0",
"@jupyterlab/docmanager": "~3.0.0",
"@jupyterlab/docregistry": "~3.0.0",
"@jupyterlab/fileeditor": "~3.0.0",
"@jupyterlab/notebook": "~3.0.0",
"@jupyterlab/observables": "~4.0.0",
"@jupyterlab/testutils": "~2.2.0",
"rimraf": "^2.6.1",
"typescript": "~4.0.2",
"rimraf": "^3.0.2",
"typescript": "~4.0.3",
"@babel/preset-env": "^7.4.3"
},
"jupyterlab": {
"extension": false
"extension": false,
"outputDir": "../../py_src/jupyter_lsp/labextensions/@krassowski/code-jumpers"
}
}
10 changes: 7 additions & 3 deletions packages/completion-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@
"lab:link": "jupyter labextension link . --no-build"
},
"devDependencies": {
"react": "*",
"@jupyterlab/ui-components": "~2.2.0"
"@jupyterlab/builder": "^3.0.0",
"@jupyterlab/ui-components": "^3.0.0",
"react": "^17.0.1",
"rimraf": "^3.0.2",
"typescript": "~4.0.3"
},
"peerDependencies": {},
"jupyterlab": {
"extension": true,
"schemaDir": "schema"
"schemaDir": "schema",
"outputDir": "../../py_src/jupyter_lsp/labextensions/@krassowski/completion-theme"
}
}
2 changes: 2 additions & 0 deletions packages/completion-theme/transform.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const config = require('./babel.config.js');
module.exports = require('babel-jest').createTransformer(config);
Loading