Skip to content

Commit aaa8651

Browse files
committed
more work on docs: #165, ci, node servers
1 parent fd9e1be commit aaa8651

File tree

10 files changed

+162
-4
lines changed

10 files changed

+162
-4
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ variables:
2525
jobs:
2626
- template: ci/job.lint.yml
2727
- template: ci/job.test.yml
28+
- template: ci/job.docs.yml
2829
- template: ci/job.combine.yml

ci/job.docs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
parameters:
2+
platforms:
3+
- name: Linux
4+
vmImage: ubuntu-16.04
5+
activate: source activate
6+
pythons:
7+
- name: ThreeSeven
8+
spec: '>=3.7,<3.8.0a0'
9+
env_update: conda env update -n jupyterlab-lsp --file env-test.yml --quiet
10+
env_lint: conda env update -n jupyterlab-lsp --file requirements/docs.yml --quiet
11+
12+
jobs:
13+
- ${{ each platform in parameters.platforms }}:
14+
- ${{ each python in parameters.pythons}}:
15+
- job: Lint
16+
pool:
17+
vmImage: ${{ platform.vmImage }}
18+
steps:
19+
- template: steps.conda.yml
20+
parameters:
21+
name: ${{ platform.name }}
22+
23+
- script: ${{ platform.activate }} && cd ci && python env_template.py "${{ python.spec }}" ">=1,<2"
24+
displayName: base dependencies
25+
26+
- script: ${{ parameters.env_update }} || ${{ parameters.env_update }} || ${{ parameters.env_update }}
27+
displayName: docs dependencies
28+
29+
- script: ${{ platform.activate }} jupyterlab-lsp && python scripts/docs.py
30+
displayName: build docs
31+
32+
- task: PublishPipelineArtifact@0
33+
displayName: publish docs
34+
inputs:
35+
targetPath: docs/build
36+
artifactName: Docs $(Build.BuildId)

docs/Architecture.ipynb

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,35 @@
7070
"cell_type": "markdown",
7171
"metadata": {},
7272
"source": [
73-
"### To-Be\n",
74-
"Some fragments of how the architecture could change in the future, and why"
73+
"### Proposals\n",
74+
"Some fragments of how the architecture could change in the future, and why (or why not) they might be a good idea."
75+
]
76+
},
77+
{
78+
"cell_type": "markdown",
79+
"metadata": {},
80+
"source": [
81+
"#### Frontend: One Socket Per Language\n",
82+
"[#165](https://github.com/krassowski/jupyterlab-lsp/pull/165) proposes a single `ConnectionManager` and at most one `Connection` _per language_ instead of one of each _per document_.\n",
83+
"\n",
84+
"**Pro**\n",
85+
"\n",
86+
"- Many fewer WebSocket connections\n",
87+
"\n",
88+
"**Contra**\n",
89+
"\n",
90+
"- backwards incompatibility"
91+
]
92+
},
93+
{
94+
"cell_type": "code",
95+
"execution_count": null,
96+
"metadata": {
97+
"hide_input": true
98+
},
99+
"outputs": [],
100+
"source": [
101+
"%dot dot/to-be/frontend-165.dot"
75102
]
76103
}
77104
],

docs/Installation.ipynb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,26 @@
164164
"$ jupyter labextension install @krassowitz/jupyterlab-lsp\n",
165165
"```"
166166
]
167+
},
168+
{
169+
"cell_type": "markdown",
170+
"metadata": {},
171+
"source": [
172+
"### Getting NodeJS-based Language Servers\n",
173+
"A number of language servers are built on the [reference implementation](https://github.com/microsoft/vscode-languageserver-node), powered by NodeJS. The most reliable place to install these is in the same folder from which you launch `jupyter lab`. For example, to install all the servers which are tested as part of `jupyterlab-lsp`:\n",
174+
"\n",
175+
"```bash\n",
176+
"$ jlpm add \\\n",
177+
" bash-language-server \\\n",
178+
" vscode-css-languageserver-bin \\\n",
179+
" dockerfile-language-server-nodejs \\\n",
180+
" vscode-html-languageserver-bin \\\n",
181+
" javascript-typescript-langserver \\\n",
182+
" vscode-json-languageserver-bin \\\n",
183+
" yaml-language-server \n",
184+
"$ jupyter lab\n",
185+
"```"
186+
]
167187
}
168188
],
169189
"metadata": {

docs/_static/css/custom.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ body div.nboutput.container div[class*='highlight'] pre {
3030
background-color: transparent !important;
3131
padding: 1em;
3232
}
33+
34+
.wy-nav-content {
35+
max-width: 100%;
36+
}

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"**/.ipynb_checkpoints/**",
6060
"**/~.*",
6161
"~.*",
62-
"_build/**"
62+
"_build/**",
6363
]
6464

6565
pygments_style = "monokai"

docs/dot/as-is/backend.dot

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
graph backend {
22
label="Back End as of 0.7.0"
3+
splines="line"
34
fontname="sans-serif"
45
node[shape=none fontname="sans-serif"]
56
edge[fontname="sans-serif"]
6-
graph[fontcolor=grey]
7+
graph[fontcolor=grey color=grey]
78
subgraph cluster_browser {
89
label=Browser
910
Clients

docs/dot/as-is/frontend.dot

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
graph backend {
22
label="Front End as of 0.7.1"
3+
splines="line"
34
compound=true
45
fontname="sans-serif" fontcolor=grey
56
node[shape=none fontname="sans-serif"]
67
edge[fontname="sans-serif"]
8+
graph[fontcolor=grey color=grey]
9+
710
subgraph cluster_io { label="IO"
811
Keyboard[label="The Keyboard"]
912
Mouse[label="The Mouse"]
@@ -52,6 +55,7 @@ graph backend {
5255
StatusBar -- Connection
5356
Widget -- WidgetAdapter -- Plugin -- StatusBar -- RestAPI
5457
Widget -- CodeMirrors
58+
Plugin -- ConnectionManager
5559
Connection -- MessageConnection -- WebSocket -- WebSocketHandlers
5660
{Keyboard Mouse} -- CodeMirrors
5761
}

docs/dot/to-be/frontend-165.dot

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
graph backend {
2+
label="Front End with One Socket Per Language (#165)"
3+
splines="line"
4+
compound=true
5+
fontname="sans-serif" fontcolor=grey
6+
node[shape=none fontname="sans-serif"]
7+
edge[fontname="sans-serif"]
8+
graph[fontcolor=grey color=grey]
9+
10+
subgraph cluster_io { label="IO"
11+
Keyboard[label="The Keyboard"]
12+
Mouse[label="The Mouse"]
13+
}
14+
subgraph cluster_server { label="Server"
15+
RestAPI[label="The REST API"]
16+
WebSocketHandlers
17+
}
18+
subgraph cluster_lab { label="JupyterLab"
19+
Plugin
20+
StatusBar
21+
WidgetTrackers
22+
DiagnosticPanel
23+
ConnectionManager
24+
25+
subgraph cluster_lang {label="Per Language"
26+
Connection
27+
MessageConnection
28+
WebSocket
29+
}
30+
subgraph cluster_doc { label="Per Document"
31+
Widget
32+
CodeMirrors
33+
subgraph cluster_doc_lsp { label="LSP Client"
34+
WidgetAdapter
35+
VirtualEditor
36+
VirtualDocument
37+
CodeMirrorAdapters
38+
subgraph cluster_features { label="Features"
39+
Feature[style=invisible]
40+
Completion
41+
Diagnostics
42+
Highlight
43+
Hover
44+
Jump
45+
Rename
46+
Signature
47+
}
48+
}
49+
}
50+
}
51+
52+
{Connection CodeMirrors VirtualDocument VirtualEditor} -- Feature[lhead=cluster_features];
53+
Diagnostics -- DiagnosticPanel
54+
Connection -- ConnectionManager
55+
CodeMirrors -- CodeMirrorAdapters -- WidgetAdapter
56+
WidgetAdapter -- VirtualEditor -- VirtualDocument
57+
WidgetTrackers -- {Plugin -- Widget}
58+
StatusBar -- Connection
59+
Widget -- WidgetAdapter -- Plugin -- StatusBar -- RestAPI
60+
Widget -- CodeMirrors
61+
Plugin -- ConnectionManager
62+
Connection -- MessageConnection -- WebSocket -- WebSocketHandlers
63+
{Keyboard Mouse} -- CodeMirrors
64+
}

requirements/docs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
graphviz
44
nbsphinx
55
recommonmark
6+
sphinx_autodoc_typehints
67
sphinx-autobuild
78
sphinx-copybutton
89
sphinx-markdown-tables

0 commit comments

Comments
 (0)