1
- # Contribute to jupyterlab-lsp and jupyter-lsp :heart :
1
+ ## Contribute to jupyterlab-lsp and jupyter-lsp :heart :
2
2
3
- ` jupyter-lsp ` and ` jupyterlab-lsp ` are [ open source] ( ./LICENSE ) software, and
3
+ ` jupyter-lsp ` and ` jupyterlab-lsp ` are [ open source] [ license ] software, and
4
4
all contributions conforming to good sense, good taste, and the
5
5
[ Jupyter Code of Conduct] [ code-of-conduct ] are welcome, and will be reviewed
6
6
by the contributors, time-permitting.
@@ -13,16 +13,19 @@ You can contribute to the project through:
13
13
and its various distributions
14
14
- these are great first issues, as you might not need to know any python or
15
15
javascript
16
- - proposing parts of the architecture that can be [ extended] ( ./docs/EXTENDING.md )
16
+ - proposing parts of the architecture that can be [ extended] [ extending ]
17
17
- improving [ documentation] ( #Documentation )
18
- - tackling Big Issues from the [ future roadmap] ( ./docs/ROADMAP.md )
18
+ - tackling Big Issues from the [ future roadmap] [ roadmap ]
19
19
- improving [ testing] ( #Testing )
20
20
- reviewing pull requests
21
21
22
+ [ license ] : https://github.com/krassowski/jupyterlab-lsp/blob/master/LICENSE
23
+ [ extending ] : ./docs/Extending.ipynb
24
+ [ roadmap ] : ./docs/Roadmap.ipynb
22
25
[ jupyterlab-lsp ] : https://github.com/krassowski/jupyterlab-lsp.git
23
26
[ code-of-conduct ] : https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md
24
27
25
- ## Set up the environment
28
+ ### Set up the environment
26
29
27
30
Development requires:
28
31
@@ -41,7 +44,7 @@ pip install -r requirements/dev.txt # in a virtualenv, probably
41
44
# ... and install nodejs, somehow
42
45
```
43
46
44
- ### The Easy Way
47
+ #### The Easy Way
45
48
46
49
Once your environment is created and activated, on Linux/OSX you can run:
47
50
@@ -51,7 +54,7 @@ bash postBuild
51
54
52
55
This performs all of the basic setup steps, and is used for the binder demo.
53
56
54
- ### The Hard Way
57
+ #### The Hard Way
55
58
56
59
Install ` jupyter-lsp ` from source in your virtual environment:
57
60
@@ -74,7 +77,7 @@ jlpm build
74
77
jlpm lab:link
75
78
```
76
79
77
- ## Frontend Development
80
+ ### Frontend Development
78
81
79
82
To rebuild the schemas, packages, and the JupyterLab app:
80
83
@@ -110,15 +113,44 @@ To run tests matching specific phrase, forward `-t` argument over yarn and lerna
110
113
jlpm test -- -- -t match_phrase
111
114
```
112
115
113
- ## Server Development
116
+ ### Server Development
114
117
115
- ### Testing ` jupyter-lsp `
118
+ #### Testing ` jupyter-lsp `
116
119
117
120
``` bash
118
121
python scripts/utest.py
119
122
```
120
123
121
- ## Browser-based Acceptance Tests
124
+ ### Documentation
125
+
126
+ To build the documentation:
127
+
128
+ ``` bash
129
+ python scripts/docs.py
130
+ ```
131
+
132
+ To watch documentation sources and build continuously:
133
+
134
+ ``` bash
135
+ python scripts/docs.py --watch
136
+ ```
137
+
138
+ To check internal links in the docs after building:
139
+
140
+ ``` bash
141
+ python scripts/docs.py --check --local-only
142
+ ```
143
+
144
+ To check internal _ and_ external links in the docs after building:
145
+
146
+ ``` bash
147
+ python scripts/docs.py --check
148
+ ```
149
+
150
+ > Note: you may get spurious failures due to rate limiting, especially in CI,
151
+ > but it's good to test locally
152
+
153
+ ### Browser-based Acceptance Tests
122
154
123
155
The browser tests will launch JupyterLab on a random port and exercise the
124
156
Language Server features with [ Robot Framework] [ ] and [ SeleniumLibrary] [ ] . It
@@ -217,7 +249,7 @@ python scripts/combine.py
217
249
218
250
- If you see the following error message:
219
251
220
- ```
252
+ ``` python
221
253
Parent suite setup failed:
222
254
TypeError : expected str , bytes or os.PathLike object , not NoneType
223
255
```
@@ -226,7 +258,9 @@ python scripts/combine.py
226
258
in the search path).
227
259
228
260
- If a test suite for a specific language fails it may indicate that you have no
229
- appropriate server language installed (see [ LANGUAGESERVERS.md] ( ./LANGUAGESERVERS.md ) )
261
+ appropriate server language installed (see [ LANGUAGESERVERS] [ ] )
262
+
263
+ [ languageservers ] : ./docs/Language%20Servers.ipynb
230
264
231
265
- If you are seeing errors like ` Element is blocked by .jp-Dialog ` , caused by
232
266
the JupyterLab _ Build suggested_ dialog, (likely if you have been using
@@ -257,18 +291,6 @@ You can clean up your code, and check for using the project's style guide with:
257
291
python scripts/lint.py
258
292
```
259
293
260
- > TBD
261
- >
262
- > - hypothesis
263
- > - mypy
264
-
265
- ## Documentation
266
-
267
- > TBD
268
- >
269
- > - sphinx
270
- > - one of the sphinx/ipynb connectors
271
-
272
294
### Specs
273
295
274
296
It is convenient to collect common patterns for connecting to installed language
@@ -279,8 +301,10 @@ server it will always win vs an auto-configured one.
279
301
280
302
#### Writing a spec
281
303
282
- > See the built-in [ specs] ( ./py_src/jupyter_lsp/specs ) for implementations and some
283
- > [ helpers] ( ./py_src/jupyter_lsp/specs/utils.py ) .
304
+ > See the built-in [ specs] [ ] for implementations and some [ helpers] [ ] .
305
+
306
+ [ specs ] : https://github.com/krassowski/jupyterlab-lsp/tree/master/py_src/jupyter_lsp/specs
307
+ [ helpers ] : https://github.com/krassowski/jupyterlab-lsp/blob/master/py_src/jupyter_lsp/specs/utils.py
284
308
285
309
A spec is a python function that accepts a single argument, the
286
310
` LanguageServerManager ` , and returns a dictionary of the form:
@@ -298,8 +322,9 @@ A spec is a python function that accepts a single argument, the
298
322
The absolute minimum listing requires ` argv ` (a list of shell tokens to launch
299
323
the server) and ` languages ` (which languages to respond to), but many number of
300
324
other options to enrich the user experience are available in the
301
- [ schema] ( ./py_src/jupyter_lsp/schema/schema.json ) and are exercised by the
302
- current ` entry_points ` -based [ specs] ( ) .
325
+ [ schema] [ ] and are exercised by the current ` entry_points ` -based [ specs] [ ] .
326
+
327
+ [ schema ] : https://github.com/krassowski/jupyterlab-lsp/blob/master/py_src/jupyter_lsp/schema/schema.json
303
328
304
329
The spec should only be advertised if the command _ could actually_ be run:
305
330
@@ -316,7 +341,9 @@ The spec should only be advertised if the command _could actually_ be run:
316
341
guess at where a user's ` nodejs ` might be found
317
342
- some language servers are hard to start purely from the command line
318
343
- use a helper script to encapsulate some complexity.
319
- - See the [ r spec] ( ./py_src/jupyter_lsp/specs/r_languageserver.py ) for an example
344
+ - See the [ r spec] [ ] for an example
345
+
346
+ [ r spec ] : https://github.com/krassowski/jupyterlab-lsp/blob/master/py_src/jupyter_lsp/specs/r_languageserver.py
320
347
321
348
##### Example: making a pip-installable ` cool-language-server ` spec
322
349
0 commit comments