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
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
17 changes: 8 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ You can contribute to the project through:

Development requires:

- `nodejs` 10+
- `python` 3.5+
- `jupyterlab` 2
- `nodejs >=12,<15`
- `python python >=3.6,<3.9.0a0`
- `jupyterlab >=3.0.0rc10,<4.0.0a0`

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

```bash
conda env update -n jupyterlab-lsp # create a conda env
source activate jupyterlab-lsp # activate it
conda env update -n jupyterlab-lsp --file binder/environment.yml # create a conda env
source activate jupyterlab-lsp # activate it
# or...
pip install -r requirements/dev.txt # in a virtualenv, probably
# ... and install nodejs, somehow
Expand All @@ -59,7 +59,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 @@ -72,9 +72,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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ 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.0rc10,<4.0.0a0
- Python 3.5+
- nodejs 10+

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-rc.10,<4.0.0a0' jupyter-lsp
# or
pip install 'jupyterlab>=2.2,<3.0.0a0' jupyter-lsp
pip install 'jupyterlab>=3.0.0-rc.10,<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.0rc10,<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
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 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
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-rc.2",
"@jupyterlab/ui-components": "^3.0.0-rc.10",
"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"
}
}
63 changes: 33 additions & 30 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.10",
"@jupyterlab/apputils": "^3.0.0-rc.10",
"@jupyterlab/codeeditor": "^3.0.0-rc.10",
"@jupyterlab/codemirror": "^3.0.0-rc.10",
"@jupyterlab/coreutils": "^5.0.0-rc.10",
"@jupyterlab/docmanager": "^3.0.0-rc.10",
"@jupyterlab/docregistry": "^3.0.0-rc.10",
"@jupyterlab/fileeditor": "^3.0.0-rc.10",
"@jupyterlab/notebook": "^3.0.0-rc.10",
"@jupyterlab/observables": "^4.0.0-rc.10",
"@jupyterlab/services": "^6.0.0-rc.10",
"@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.10",
"@jupyterlab/apputils": "^3.0.0-rc.10",
"@jupyterlab/builder": "^3.0.0-rc.2",
"@jupyterlab/codeeditor": "^3.0.0-rc.10",
"@jupyterlab/codemirror": "^3.0.0-rc.10",
"@jupyterlab/coreutils": "^5.0.0-rc.10",
"@jupyterlab/docmanager": "^3.0.0-rc.10",
"@jupyterlab/docregistry": "^3.0.0-rc.10",
"@jupyterlab/fileeditor": "^3.0.0-rc.10",
"@jupyterlab/notebook": "^3.0.0-rc.10",
"@jupyterlab/observables": "^4.0.0-rc.10",
"@jupyterlab/services": "^6.0.0-rc.10",
"@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"
}
}
Loading