Skip to content

Commit 889d4c4

Browse files
committed
Add links checker
1 parent f72ae32 commit 889d4c4

File tree

6 files changed

+28
-38
lines changed

6 files changed

+28
-38
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
node-version: "12.x"
6868
- name: Install Python
6969
if: steps.filter.outputs.extension == 'true'
70-
uses: actions/setup-python@v1
70+
uses: actions/setup-python@v2
7171
with:
7272
python-version: "3.7"
7373
architecture: "x64"
@@ -88,9 +88,7 @@ jobs:
8888
- name: Install the Python dependencies
8989
if: steps.filter.outputs.extension == 'true'
9090
run: |
91-
python -m pip install --upgrade pip
92-
python -m pip install jupyter_packaging
93-
python -m pip install jupyterlab
91+
python -m pip install --upgrade pip jupyter_packaging~=0.7.9 jupyterlab~=3.0
9492
- name: Install the NPM dependencies
9593
if: steps.filter.outputs.extension == 'true'
9694
run: |
@@ -112,9 +110,7 @@ jobs:
112110
run: |
113111
cd ${EXAMPLE_FOLDER}
114112
pip install -e .
115-
jupyter labextension list 1>labextensions 2>&1
116-
cat labextensions
117-
cat labextensions | grep -i "@jupyterlab-examples/*.*OK"
113+
jupyter labextension list 2>&1 | grep -ie "@jupyterlab-examples/*.*OK"
118114
python -m jupyterlab.browser_check
119115
pip uninstall -y $(python setup.py --name)
120116
env:
@@ -161,7 +157,7 @@ jobs:
161157
shell: bash
162158
- name: Install Python
163159
if: steps.filter.outputs.extension == 'true'
164-
uses: actions/setup-python@v1
160+
uses: actions/setup-python@v2
165161
with:
166162
python-version: "3.7"
167163
architecture: "x64"
@@ -182,9 +178,7 @@ jobs:
182178
- name: Install the Python dependencies
183179
if: steps.filter.outputs.extension == 'true'
184180
run: |
185-
python -m pip install --upgrade pip
186-
python -m pip install jupyter_packaging
187-
python -m pip install jupyterlab
181+
python -m pip install --upgrade pip jupyter_packaging~=0.7.9 jupyterlab~=3.0
188182
- name: Install the NPM dependencies
189183
if: steps.filter.outputs.extension == 'true'
190184
run: |
@@ -206,10 +200,8 @@ jobs:
206200
- name: Check extension as dev
207201
if: steps.filter.outputs.extension == 'true' && ( startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS') )
208202
run: |
209-
jupyter server extension list 1>serverextensions 2>&1
210-
cat serverextensions | grep "jlab_ext_example.*OK"
211-
jupyter labextension list 1>labextensions 2>&1
212-
cat labextensions | grep "@jupyterlab-examples/server-extension.*OK"
203+
jupyter server extension list 2>&1 | grep -ie "jlab_ext_example.*OK"
204+
jupyter labextension list 2>&1 | grep -ie "@jupyterlab-examples/server-extension.*OK"
213205
- name: Clean extension installation
214206
if: steps.filter.outputs.extension == 'true'
215207
run: |
@@ -222,14 +214,11 @@ jobs:
222214
run: |
223215
cd advanced/server-extension
224216
pip install -e .
225-
jupyter server extension enable --py jlab_ext_example
226217
- name: Check extension as dev
227218
if: steps.filter.outputs.extension == 'true' && ( startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS') )
228219
run: |
229-
jupyter server extension list 1>serverextensions 2>&1
230-
cat serverextensions | grep "jlab_ext_example.*OK"
231-
jupyter labextension list 1>labextensions 2>&1
232-
cat labextensions | grep "@jupyterlab-examples/server-extension.*OK"
220+
jupyter server extension list 2>&1 | grep -ie "jlab_ext_example.*OK"
221+
jupyter labextension list 2>&1 | grep -ie "@jupyterlab-examples/server-extension.*OK"
233222
python -m jupyterlab.browser_check
234223
235224
build_all:
@@ -255,7 +244,7 @@ jobs:
255244
with:
256245
node-version: "12.x"
257246
- name: Install Python
258-
uses: actions/setup-python@v1
247+
uses: actions/setup-python@v2
259248
with:
260249
python-version: "3.7"
261250
architecture: "x64"
@@ -272,11 +261,12 @@ jobs:
272261
restore-keys: |
273262
${{ runner.os }}-pip-
274263
- name: Install the Python dependencies
275-
run: python -m pip install jupyterlab
264+
run: python -m pip install jupyterlab~=3.0 pytest pytest-check-links
276265
- name: Bootstrap the jlpm deps
277266
run: jlpm
278267
- name: Build all the extensions
279268
run: |
269+
pytest --check-links
280270
jlpm build-ext
281271
jlpm lint:check
282272
jlpm install-ext

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ You can expect from each example:
7777
- The list of used JupyterLab API and Extension Points.
7878
- Explanations of the internal working, illustrated with code snippets.
7979

80-
We have structured the examples based on the [extension points](https://jupyterlab.readthedocs.io/en/stable/developer/extension_points.html). Browse the previews below or skip them and [jump directly to the sections for developers](#prerequisites).
80+
We have structured the examples based on the [extension points](https://jupyterlab.readthedocs.io/en/stable/extension/extension_points.html). Browse the previews below or skip them and [jump directly to the sections for developers](#prerequisites).
8181

8282
You are welcome to open any [issue](https://github.com/jupyterlab/extension-examples/issues) or [pull request](https://github.com/jupyterlab/extension-examples/pulls).
8383

@@ -255,16 +255,14 @@ jlpm clean-ext
255255
Go to the example directory you want to install, e.g. `cd ./basics/hello-world`, and run the following commands:
256256

257257
```bash
258-
jlpm install
259-
jlpm run build
260-
jupyter labextension install .
258+
pip install -e .
259+
jupyter labextension develop . --overwrite
261260
```
262261

263-
Rebuild the JupyterLab application:
262+
Rebuild the extension:
264263

265264
```bash
266265
jlpm run build
267-
jupyter lab build
268266
```
269267

270268
You can now start JupyterLab and check if your extension is working fine:
@@ -296,11 +294,11 @@ We are using [embedme](https://github.com/zakhenry/embedme) to embed code snippe
296294

297295
## Install a Published Extension
298296

299-
Once your extension is published (outside of this scope), you can install it
297+
Once your extension is published on [pypi.org](https://pypi.org/) (outside of this scope), you can install it
300298
with the following command:
301299

302300
```bash
303-
jupyter labextension install <published_extension>
301+
pip install <published_extension>
304302
```
305303

306304
## About JupyterLab
@@ -313,9 +311,9 @@ of libraries from different languages.
313311

314312
Complementary to these examples, you can rely on the official JupyterLab documentation.
315313

316-
- [Extension Developer Guide](https://jupyterlab.readthedocs.io/en/stable/developer/extension_dev.html)
317-
- [Common Extension Points](https://jupyterlab.readthedocs.io/en/stable/developer/extension_points.html)
318-
- [Astronomy Picture of the Day JupyterLab Extension](https://jupyterLab.readthedocs.io/en/stable/developer/extension_tutorial.html)
314+
- [Extension Developer Guide](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html)
315+
- [Common Extension Points](https://jupyterlab.readthedocs.io/en/stable/extension/extension_points.html)
316+
- [Astronomy Picture of the Day JupyterLab Extension](https://jupyterLab.readthedocs.io/en/stable/extension/extension_tutorial.html)
319317

320318
## Credits
321319

command-palette/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ appear in the web browser console after clicking on the command in the palette.
7272
7373
A command can be triggered by other UI elements:
7474
75-
- Add the command to a [menu](../../main-menu/README.md)
76-
- Add the command to the [launcher](../../launcher/README.md)
75+
- Add the command to a [menu](../main-menu/README.md)
76+
- Add the command to the [launcher](../launcher/README.md)

environment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ dependencies:
55
- jupyter-packaging>=0.7.9,<0.8.0
66
- jupyterlab=3
77
- nodejs
8+
- pytest
9+
- pytest-check-links
810
- python=3
911
- yarn

main-menu/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ the notion of _Commands_ as explained in the [commands example](../commands/READ
99
One of the possibilities offered to the user to trigger that command is to call it from
1010
a menu item.
1111

12-
Adding new menu item works in a similar way to the [command palette](../../command-palette/README.md).
12+
Adding new menu item works in a similar way to the [command palette](../command-palette/README.md).
1313
The `IMainMenu` interface can be requested as a new argument to the `activate`
1414
function, but first it has to be imported. And the class `Menu` to create new
1515
menu needs also to be imported but from the Lumino library:

widget-tracker/widgets/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
In this example you will learn how to add a new tab to JupyterLab.
66

7-
Visible elements such as tabs and notebooks are represented by widgets in the [Lumino](http://jupyterlab.github.io/lumino/api/widgets/globals.html)
7+
Visible elements such as tabs and notebooks are represented by widgets in the [Lumino](https://jupyterlab.github.io/lumino/widgets/index.html)
88
library that is the basis of the JupyterLab application.
99

1010
It is the fundamental brick of any visual component in the JupyterLab interface.
@@ -28,7 +28,7 @@ jlpm add @lumino/widgets
2828
```
2929

3030
A Widget can be added to the main area through the
31-
[JupyterLab Shell](http://jupyterlab.github.io/jupyterlab/application/classes/labshell.html).
31+
[JupyterLab Shell](https://jupyterlab.github.io/jupyterlab/classes/_application_src_index_.labshell.html).
3232

3333
Inside of the `activate` function, you can obtain it through the `shell` attribute
3434
of the `app` object:

0 commit comments

Comments
 (0)