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 update #405

Merged
merged 13 commits into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
9 changes: 3 additions & 6 deletions .github/workflows/job.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
matrix:
python: [3.6, 3.7, 3.8]
os: [ubuntu-16.04, macos-10.14, vs2017-win2016]
lab: ['>=2.2.0,<3.0.0a0']
lab: ['>=3.0.0rc8,<4.0.0a0']
include:
# if using 3.6, use an old node
- python: 3.6
Expand Down Expand Up @@ -77,10 +77,10 @@ jobs:
uses: goanpeca/setup-miniconda@v1
with:
python-version: ${{ matrix.python }}
channels: conda-forge, defaults
channels: conda-forge/label/jupyterlab_rc, conda-forge/label/jupyterlab_server_rc, conda-forge, defaults
channel-priority: true
auto-activate-base: true
activate-environment: jupyterlab-lsp
# activate-environment: jupyterlab-lsp
environment-file: requirements/github-actions.yml
auto-update-conda: true
use-only-tar-bz2: true # needs to be set for caching to work properly
Expand Down Expand Up @@ -112,9 +112,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
Copy link
Collaborator

Choose a reason for hiding this comment

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

if these end up in the dist (which they might) we will want them formatted...

**/.ipynb_checkpoints
**/*.egg-info
**/build
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-rc.7,<4.0.0a0' jupyter-lsp
# or
pip install 'jupyterlab>=2.2,<3.0.0a0' jupyter-lsp
pip install 'jupyterlab>=3.0.0-rc.7,<4.0.0a0' jupyter-lsp
```

> Note: With conda, you could take advantage of the bundles: `jupyter-lsp-python`
Expand Down
4 changes: 3 additions & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: jupyterlab-lsp

channels:
- conda-forge/label/jupyterlab_rc
- conda-forge/label/jupyterlab_server_rc
- conda-forge
- defaults

dependencies:
# runtime dependencies
- python >=3.7,<3.8.0a0
- jupyterlab >=2.2.0,<3.0.0a0
- jupyterlab >=3.0.0rc8,<4.0.0a0
- notebook >=4.3.1
# build dependencies
- nodejs >=10,<14
Expand Down
21 changes: 5 additions & 16 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -1,23 +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
pip install . -vv
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please bring back python -m pip install -e . --ignore-installed --no-deps -vv... it's not too livehackable, today (vs #278), but would like to maintain that experience.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I'll bring it back

Copy link
Member Author

Choose a reason for hiding this comment

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

Although -e will not install the data_files, but we need them installed

jupyter serverextension enable --sys-prefix --py jupyter_lsp

# list extensions again
# List extensions
jupyter labextension list
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@
"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: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",
"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
12 changes: 8 additions & 4 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-rc.2",
"@jupyterlab/ui-components": "^3.0.0-rc.7",
"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"
}
}
}
65 changes: 34 additions & 31 deletions packages/jupyterlab-go-to-definition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,50 +30,53 @@
"test": "jlpm jest --coverage --coverageReporters=cobertura --coverageReporters=html --coverageReporters=text-summary"
},
"peerDependencies": {
"@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",
"@jupyterlab/application": "^3.0.0-rc.7",
"@jupyterlab/apputils": "^3.0.0-rc.7",
"@jupyterlab/codeeditor": "^3.0.0-rc.7",
"@jupyterlab/codemirror": "^3.0.0-rc.7",
"@jupyterlab/coreutils": "^5.0.0-rc.7",
"@jupyterlab/docmanager": "^3.0.0-rc.7",
"@jupyterlab/docregistry": "^3.0.0-rc.7",
"@jupyterlab/fileeditor": "^3.0.0-rc.7",
"@jupyterlab/notebook": "^3.0.0-rc.7",
"@jupyterlab/observables": "^4.0.0-rc.7",
"@jupyterlab/services": "^6.0.0-rc.7",
"@lumino/algorithm": "*",
"codemirror": "*",
"react": "*"
},
"devDependencies": {
"@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": "*",
"@babel/preset-env": "^7.4.3",
"@jupyterlab/application": "^3.0.0-rc.7",
"@jupyterlab/apputils": "^3.0.0-rc.7",
"@jupyterlab/builder": "^3.0.0-rc.2",
"@jupyterlab/codeeditor": "^3.0.0-rc.7",
"@jupyterlab/codemirror": "^3.0.0-rc.7",
"@jupyterlab/coreutils": "^5.0.0-rc.7",
"@jupyterlab/docmanager": "^3.0.0-rc.7",
"@jupyterlab/docregistry": "^3.0.0-rc.7",
"@jupyterlab/fileeditor": "^3.0.0-rc.7",
"@jupyterlab/notebook": "^3.0.0-rc.7",
"@jupyterlab/observables": "^4.0.0-rc.7",
"@jupyterlab/services": "^6.0.0-rc.7",
"@jupyterlab/testutils": "~2.2.0",
"@types/codemirror": "^0.0.74",
"@lumino/algorithm": "^1.3.3",
"@types/chai": "^4.1.7",
"@types/codemirror": "^0.0.74",
"@types/jest": "^23.3.11",
"chai": "^4.2.0",
"codemirror": "*",
"jest": "^26.0.0",
"jest-junit": "^8.0.0",
"rimraf": "^2.6.1",
"prettier": "^1.19.0",
"react": "^17.0.1",
"rimraf": "^3.0.2",
"ts-jest": "^26.4.3",
"typescript": "~4.0.2",
"@babel/preset-env": "^7.4.3"
"typescript": "~4.0.3"
},
"jupyterlab": {
"extension": true,
"schemaDir": "schema"
"schemaDir": "schema",
"outputDir": "../../py_src/jupyter_lsp/labextensions/@krassowski/jupyterlab_go_to_definition"
}
}
}
112 changes: 65 additions & 47 deletions packages/jupyterlab-lsp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,46 +28,61 @@
"url": "https://github.com/krassowski/jupyterlab-lsp.git"
},
"scripts": {
"build": "jlpm build:schema && tsc -b",
"build": "jlpm run build:lib && jlpm run build:labextension",
martinRenou marked this conversation as resolved.
Show resolved Hide resolved
"build:labextension": "jupyter labextension build .",
"build:labextension:dev": "jupyter labextension build --development True .",
"build:lib": "tsc",
"build:prod": "jlpm run build:lib && jlpm run build:labextension",
"build:schema": "jlpm build:schema-backend && jlpm build:schema-completion && jlpm build:schema-hover && jlpm build:schema-diagnostics && jlpm build:schema-syntax_highlighting",
"build:schema-backend": "json2ts ../../py_src/jupyter_lsp/schema/schema.json --unreachableDefinitions | prettier --stdin-filepath _schema.d.ts > src/_schema.d.ts",
"build:schema-completion": "json2ts schema/completion.json | prettier --stdin-filepath _completion.d.ts > src/_completion.d.ts",
"build:schema-hover": "json2ts schema/hover.json | prettier --stdin-filepath _hover.d.ts > src/_hover.d.ts",
"build:schema-diagnostics": "json2ts schema/diagnostics.json | prettier --stdin-filepath _diagnostics.d.ts > src/_diagnostics.d.ts",
"build:schema-hover": "json2ts schema/hover.json | prettier --stdin-filepath _hover.d.ts > src/_hover.d.ts",
"build:schema-syntax_highlighting": "json2ts schema/syntax_highlighting.json | prettier --stdin-filepath _syntax_highlighting.d.ts > src/_syntax_highlighting.d.ts",
"bundle": "npm pack .",
"clean": "rimraf lib",
"clean": "jlpm run clean:lib",
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
"clean:labextension": "rimraf labextension",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"eslint": "eslint . --ext .ts,.tsx --fix",
"eslint:check": "eslint . --ext .ts,.tsx",
"install:extension": "jupyter labextension develop --overwrite .",
"lab:link": "jupyter labextension link . --no-build",
"test": "jlpm jest --coverage --coverageReporters=cobertura --coverageReporters=html --coverageReporters=text-summary"
"prepare": "jlpm run clean && jlpm run build:prod",
"test": "jlpm jest --coverage --coverageReporters=cobertura --coverageReporters=html --coverageReporters=text-summary",
"watch": "run-p watch:src watch:labextension",
"watch:labextension": "jupyter labextension watch .",
"watch:src": "tsc -w"
},
"dependencies": {
"@krassowski/jupyterlab_go_to_definition": "~1.0.0",
"lodash.mergewith": "^4.6.1",
"lsp-ws-connection": "~0.5.1",
"@krassowski/completion-theme": "~2.0.0",
"@krassowski/jupyterlab_go_to_definition": "~1.0.0",
"@krassowski/theme-material": "~2.0.0",
"@krassowski/theme-vscode": "~2.0.0",
"@krassowski/theme-material": "~2.0.0"
"lodash.mergewith": "^4.6.1",
"lsp-ws-connection": "~0.5.1"
},
"devDependencies": {
"@babel/preset-env": "^7.4.3",
"@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": "*",
"@jupyterlab/application": "^3.0.0-rc.7",
"@jupyterlab/apputils": "^3.0.0-rc.7",
"@jupyterlab/builder": "^3.0.0-rc.2",
"@jupyterlab/cells": "^3.0.0-rc.7",
"@jupyterlab/codeeditor": "^3.0.0-rc.7",
"@jupyterlab/codemirror": "^3.0.0-rc.7",
"@jupyterlab/completer": "^3.0.0-rc.7",
"@jupyterlab/coreutils": "^5.0.0-rc.7",
"@jupyterlab/docmanager": "^3.0.0-rc.7",
"@jupyterlab/docregistry": "^3.0.0-rc.7",
"@jupyterlab/fileeditor": "^3.0.0-rc.7",
"@jupyterlab/notebook": "^3.0.0-rc.7",
"@jupyterlab/rendermime": "^3.0.0-rc.7",
"@jupyterlab/services": "^6.0.0-rc.7",
"@jupyterlab/statusbar": "^3.0.0-rc.7",
"@jupyterlab/testutils": "^3.0.0-rc.7",
"@jupyterlab/tooltip": "^3.0.0-rc.7",
"@lumino/algorithm": "^1.3.3",
"@lumino/widgets": "^1.14.0",
"@types/chai": "^4.1.7",
"@types/codemirror": "^0.0.74",
"@types/events": "^3.0.0",
Expand All @@ -79,28 +94,30 @@
"jest": "^26.0.0",
"jest-junit": "^8.0.0",
"json-schema-to-typescript": "^8.0.0",
"react": "*",
"rimraf": "~2.6.2",
"mkdirp": "^1.0.3",
"prettier": "^1.19.0",
krassowski marked this conversation as resolved.
Show resolved Hide resolved
"react": "^17.0.1",
"rimraf": "^3.0.2",
"ts-jest": "^26.4.3",
"typescript": "~4.0.2"
"typescript": "~4.0.3"
},
"peerDependencies": {
"@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",
"@jupyterlab/ui-components": "~2.2.0",
"@jupyterlab/application": "^3.0.0-rc.7",
"@jupyterlab/apputils": "^3.0.0-rc.7",
"@jupyterlab/cells": "^3.0.0-rc.7",
"@jupyterlab/codeeditor": "^3.0.0-rc.7",
"@jupyterlab/codemirror": "^3.0.0-rc.7",
"@jupyterlab/completer": "^3.0.0-rc.7",
"@jupyterlab/coreutils": "^5.0.0-rc.7",
"@jupyterlab/docmanager": "^3.0.0-rc.7",
"@jupyterlab/docregistry": "^3.0.0-rc.7",
"@jupyterlab/fileeditor": "^3.0.0-rc.7",
"@jupyterlab/notebook": "^3.0.0-rc.7",
"@jupyterlab/rendermime": "^3.0.0-rc.7",
"@jupyterlab/services": "^6.0.0-rc.7",
"@jupyterlab/statusbar": "^3.0.0-rc.7",
"@jupyterlab/tooltip": "^3.0.0-rc.7",
"@jupyterlab/ui-components": "^3.0.0-rc.7",
"@lumino/algorithm": "*",
"@lumino/widgets": "*",
"codemirror": "*",
Expand All @@ -118,6 +135,7 @@
]
}
},
"schemaDir": "schema"
"schemaDir": "schema",
"outputDir": "../../py_src/jupyter_lsp/labextensions/@krassowski/jupyterlab-lsp"
Copy link
Collaborator

Choose a reason for hiding this comment

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

we need to add checking all of these (and probably other things) to integrity.py

}
}
}
Loading