Skip to content

Commit a952949

Browse files
authored
Merge pull request #412 from karlaspuldaro/doc-update
Documentation update
2 parents e872f80 + efb6ff1 commit a952949

File tree

8 files changed

+71
-19
lines changed

8 files changed

+71
-19
lines changed

CONTRIBUTING.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,29 @@ You can contribute to the project through:
2727

2828
### Set up the environment
2929

30-
Development requires:
30+
Development requires, at a minimum:
3131

32-
- `nodejs` 10+
33-
- `python` 3.5+
34-
- `jupyterlab` 2
32+
- `nodejs >=10.12,<15`
33+
- `python >=3.6,<3.9.0a0`
34+
- Python 3.6 and 3.8 are also tested on CI
35+
- Python 3.6 has issues on Windows
36+
- `jupyterlab >=2.2.0,<3.0.0a0`
3537

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

41+
To use the same environment as the binder demo (recommended):
42+
43+
```bash
44+
conda env update -n jupyterlab-lsp --file binder/environment.yml # create a conda env
45+
source activate jupyterlab-lsp # activate it
46+
```
47+
48+
Or with `pip`:
49+
3950
```bash
40-
conda env update -n jupyterlab-lsp # create a conda env
41-
source activate jupyterlab-lsp # activate it
42-
# or...
4351
pip install -r requirements/dev.txt # in a virtualenv, probably
44-
# ... and install nodejs, somehow
52+
sudo apt-get install nodejs # ... e.g. on debian/ubuntu
4553
```
4654

4755
#### The Easy Way
@@ -168,9 +176,13 @@ Prepare the environment:
168176

169177
```bash
170178
conda env update -n jupyterlab-lsp --file requirements/atest.yml
171-
# or
179+
```
180+
181+
or with `pip`
182+
183+
```
172184
pip install -r requirements/atest.txt # ... and install geckodriver, somehow
173-
apt-get install firefox-geckodriver # ... e.g. on debian/ubuntu
185+
sudo apt-get install firefox-geckodriver # ... e.g. on debian/ubuntu
174186
```
175187

176188
Run the tests:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Use context menu on rows in the panel to filter out diagnostics or copy their me
7878
You will need to have all of the following installed:
7979

8080
- JupyterLab >=2.2.0,<3.0.0a0
81-
- Python 3.5+
82-
- nodejs 10+
81+
- Python 3.6+
82+
- nodejs 10.12+
8383

8484
## Installation
8585

binder/environment.yml

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

77
dependencies:
88
# runtime dependencies
9-
- python >=3.7,<3.8.0a0
9+
- python >=3.6,<3.9.0a0
1010
- jupyterlab >=2.2.0,<3.0.0a0
1111
- notebook >=4.3.1
1212
# build dependencies
13-
- nodejs >=10,<14
13+
- nodejs >=10.12,<15
1414
# for python language server (and development)
1515
- black
1616
- flake8 >=3.5

binder/postBuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env bash
22
set -eux
3+
34
# do a dev install of the server side
45
python -m pip install -e . --ignore-installed --no-deps -vv
56
jupyter serverextension enable --sys-prefix --py jupyter_lsp

docs/Installation.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@
5757
"- runs in your `notebook` web application on your server to handle requests from\n",
5858
" the browser to _language servers_\n",
5959
"- to run, you need:\n",
60-
" - `python >=3.5`\n",
60+
" - `python >=3.6,<3.9.0a0`\n",
6161
" - `notebook >=4.3`\n",
6262
"\n",
6363
"#### `jupyterlab-lsp`\n",
6464
"\n",
6565
"- runs in your browser, as an extension to JupyterLab\n",
6666
"- to install it, you need:\n",
67-
" - `nodejs >8`\n",
67+
" - `nodejs >=10.12,<15`\n",
6868
" - `jupyterlab {REQUIRED_JUPYTERLAB}`\n",
6969
"\n",
7070
"#### Language Servers\n",
@@ -97,7 +97,7 @@
9797
"#### conda (minimal python)\n",
9898
"\n",
9999
"```bash\n",
100-
"conda create -c conda-forge -n lsp 'python >=3.7,<3.8' 'jupyterlab={JUPYTERLAB_VERSION}' 'nodejs>10' 'jupyter-lsp-python={JUPYTER_LSP_VERSION}'\n",
100+
"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",
101101
"# jupyter-lsp-python includes both the server extension (jupyter-lsp) and pyls third-party server (python-language-server)\n",
102102
"# if you swap it with another pre-made bundle, jupyter-lsp-r, you will get the server extension and r-languageserver;\n",
103103
"# alternatively, use jupyter-lsp and manually install a language server of your choice (see the table below).\n",

py_src/jupyter_lsp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# jupyter-lsp
22

33
Multi-[Language Server][language-server] WebSocket proxy for your Jupyter
4-
`notebook` or `lab` server. For Python 3.5+.
4+
`notebook` or `lab` server. For Python 3.6+.
55

66
> See the parent of this repository,
77
> [jupyterlab-lsp](https://github.com/krassowski/jupyterlab-lsp) for the

scripts/integrity.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@
3434

3535
REQS = ROOT / "requirements"
3636
BINDER = ROOT / "binder"
37+
BINDER_ENV = BINDER / "environment.yml"
3738

3839
# docs
3940
MAIN_README = ROOT / "README.md"
4041
CHANGELOG = ROOT / "CHANGELOG.md"
42+
CONTRIBUTING = ROOT / "CONTRIBUTING.md"
4143

4244
# TS stuff
4345
NPM_NS = "@krassowski"
@@ -87,6 +89,16 @@ def the_meta_package():
8789
)
8890

8991

92+
@pytest.fixture(scope="module")
93+
def the_contributing_doc():
94+
return CONTRIBUTING.read_text(encoding="utf-8")
95+
96+
97+
@pytest.fixture(scope="module")
98+
def the_binder_env():
99+
return yaml.safe_load(BINDER_ENV.read_text(encoding="utf-8"))
100+
101+
90102
@pytest.fixture(scope="module")
91103
def the_installation_notebook():
92104
"""executes and loads up the installation notebook"""
@@ -185,9 +197,35 @@ def test_changelog_versions(pkg, version):
185197
],
186198
)
187199
def test_installation_versions(the_installation_notebook, pkg, sep, version, expected):
200+
"""are the first-party versions consistent with the package metadata?"""
188201
assert the_installation_notebook.count(f"{pkg}{sep}{version}") == expected
189202

190203

204+
@pytest.mark.parametrize(
205+
"pkg,count",
206+
[
207+
["python", 2],
208+
["nodejs", 4],
209+
# ["jupyterlab", 2], # this is handled through template variables
210+
],
211+
)
212+
def test_installation_env_versions(
213+
the_installation_notebook, the_binder_env, pkg, count
214+
):
215+
"""are the third-party versions consistent with the binder?"""
216+
for spec in the_binder_env["dependencies"]:
217+
if isinstance(spec, str) and spec.startswith(f"{pkg} "):
218+
assert the_installation_notebook.count(spec) == count
219+
220+
221+
@pytest.mark.parametrize("pkg", ["python", "jupyterlab", "nodejs"])
222+
def test_contributing_versions(the_contributing_doc, the_binder_env, pkg):
223+
"""are the documented contributing requirements consistent with binder?"""
224+
for spec in the_binder_env["dependencies"]:
225+
if isinstance(spec, str) and spec.startswith(f"{pkg} "):
226+
assert spec in the_contributing_doc
227+
228+
191229
def check_integrity():
192230
"""actually run the tests"""
193231
args = ["-vv", __file__]

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = jupyter-lsp
3-
description = Multi-Language Server WebSocket proxy for Jupyter notebook or lab server for Python 3.5+.
3+
description = Multi-Language Server WebSocket proxy for Jupyter Notebook/Lab server
44
long_description = file: ./py_src/jupyter_lsp/README.md
55
long_description_content_type = text/markdown
66
url = https://github.com/krassowski/jupyterlab-lsp
@@ -26,6 +26,7 @@ package_dir =
2626
packages = find:
2727
include_package_data = True
2828
zip_safe = False
29+
python_requires = >=3.6
2930

3031
install_requires =
3132
notebook >=4.3.1

0 commit comments

Comments
 (0)