Skip to content

Commit eb0e9de

Browse files
committed
add install version checks to integrity
1 parent 2c57055 commit eb0e9de

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

docs/Installation.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"\n",
1616
"Delivering LSP features to your JupyterLab **requires** three pieces:\n",
1717
"\n",
18-
"#### `jupyter_lsp`\n",
18+
"#### `jupyter-lsp`\n",
1919
"\n",
2020
"- runs in your `notebook` web application on your server to handle requests from\n",
2121
" the browser to _language servers_\n",
@@ -58,7 +58,7 @@
5858
"conda create -c conda-forge -n lsp 'python >=3.7,<3.8' 'jupyterlab=1.2' 'nodejs>8' python-language-server\n",
5959
"# Also consider: r-languageserver [*]\n",
6060
"source activate lsp\n",
61-
"python -m pip install 'jupyter_lsp=0.8.0' --no-deps\n",
61+
"python -m pip install 'jupyter-lsp=0.8.0' --no-deps\n",
6262
"jupyter labextension install '@krassowski/[email protected]'\n",
6363
"```\n",
6464
"\n",
@@ -97,7 +97,7 @@
9797
" 'python-language-server' \\\n",
9898
" 'r-languageserver' \\\n",
9999
" && python3 -m pip install --no-cache-dir --no-deps \\\n",
100-
" 'jupyter_lsp==0.8.0' \\\n",
100+
" 'jupyter-lsp=0.8.0' \\\n",
101101
" && jupyter labextension install --no-build \\\n",
102102
" '@krassowski/[email protected]' \\\n",
103103
" && jupyter lab build --dev-build=False --minimize=True \\\n",

scripts/integrity.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
PIPE_FILE = ROOT / "azure-pipelines.yml"
5959
PIPELINES = yaml.safe_load(PIPE_FILE.read_text())
6060
PIPE_VARS = PIPELINES["variables"]
61+
DOCS = ROOT / "docs"
6162

6263
CI = ROOT / "ci"
6364

@@ -80,6 +81,13 @@ def the_meta_package():
8081
)
8182

8283

84+
@pytest.fixture(scope="module")
85+
def the_installation_notebook():
86+
""" loads up the installation notebook
87+
"""
88+
return (DOCS / "Installation.ipynb").read_text()
89+
90+
8391
@pytest.mark.parametrize(
8492
"name,version",
8593
[["PY_JLSP_VERSION", PY_VERSION], ["JS_JLLSP_VERSION", MAIN_EXT_VERSION]],
@@ -141,6 +149,14 @@ def test_changelog_versions(pkg, version):
141149
assert "## `{} {}`".format(pkg, version) in CHANGELOG.read_text()
142150

143151

152+
@pytest.mark.parametrize(
153+
"pkg,sep,version,expected",
154+
[[PY_NAME, "=", PY_VERSION, 2], [MAIN_NAME, "@", MAIN_EXT_VERSION, 2]],
155+
)
156+
def test_installation_versions(the_installation_notebook, pkg, sep, version, expected):
157+
assert the_installation_notebook.count(f"{pkg}{sep}{version}") == expected
158+
159+
144160
def check_integrity():
145161
""" actually run the tests
146162
"""

0 commit comments

Comments
 (0)