You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: You will need NodeJS to build the extension package.
6
+
7
+
The `jlpm` command is JupyterLab's pinned version of
8
+
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
9
+
`yarn` or `npm` in lieu of `jlpm` below.
10
+
11
+
```bash
12
+
# Clone the repo to your local environment
13
+
# Change directory to the jupyterlab_leetcode directory
14
+
# Install package in development mode
15
+
pip install -e ".[test]"
16
+
# Link your development version of the extension with JupyterLab
17
+
jupyter labextension develop . --overwrite
18
+
# Server extension must be manually installed in develop mode
19
+
jupyter server extension enable jupyterlab_leetcode
20
+
# Rebuild extension Typescript source after making changes
21
+
jlpm build
22
+
```
23
+
24
+
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
25
+
26
+
```bash
27
+
# Watch the source directory in one terminal, automatically rebuilding when needed
28
+
jlpm watch
29
+
# Run JupyterLab in another terminal
30
+
jupyter lab
31
+
```
32
+
33
+
With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
34
+
35
+
By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
36
+
37
+
```bash
38
+
jupyter lab build --minimize=False
39
+
```
40
+
41
+
### Development uninstall
42
+
43
+
```bash
44
+
# Server extension must be manually disabled in develop mode
45
+
jupyter server extension disable jupyterlab_leetcode
46
+
pip uninstall jupyterlab_leetcode
47
+
```
48
+
49
+
In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
50
+
command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
51
+
folder is located. Then you can remove the symlink named `jupyterlab-leetcode` within that folder.
52
+
53
+
### Testing the extension
54
+
55
+
#### Server tests
56
+
57
+
This extension is using [Pytest](https://docs.pytest.org/) for Python code testing.
58
+
59
+
Install test dependencies (needed only once):
60
+
61
+
```sh
62
+
pip install -e ".[test]"
63
+
# Each time you install the Python package, you need to restore the front-end extension link
64
+
jupyter labextension develop . --overwrite
65
+
```
66
+
67
+
To execute them, run:
68
+
69
+
```sh
70
+
pytest -vv -r ap --cov jupyterlab_leetcode
71
+
```
72
+
73
+
#### Frontend tests
74
+
75
+
This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
76
+
77
+
To execute them, execute:
78
+
79
+
```sh
80
+
jlpm
81
+
jlpm test
82
+
```
83
+
84
+
#### Integration tests
85
+
86
+
This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
87
+
More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
88
+
89
+
More information are provided within the [ui-tests](./ui-tests/README.md) README.
Copy file name to clipboardExpand all lines: README.md
-93Lines changed: 0 additions & 93 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,96 +46,3 @@ the frontend extension, check the frontend extension is installed:
46
46
jupyter labextension list
47
47
```
48
48
49
-
## Contributing
50
-
51
-
### Development install
52
-
53
-
Note: You will need NodeJS to build the extension package.
54
-
55
-
The `jlpm` command is JupyterLab's pinned version of
56
-
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
57
-
`yarn` or `npm` in lieu of `jlpm` below.
58
-
59
-
```bash
60
-
# Clone the repo to your local environment
61
-
# Change directory to the jupyterlab_leetcode directory
62
-
# Install package in development mode
63
-
pip install -e ".[test]"
64
-
# Link your development version of the extension with JupyterLab
65
-
jupyter labextension develop . --overwrite
66
-
# Server extension must be manually installed in develop mode
67
-
jupyter server extension enable jupyterlab_leetcode
68
-
# Rebuild extension Typescript source after making changes
69
-
jlpm build
70
-
```
71
-
72
-
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
73
-
74
-
```bash
75
-
# Watch the source directory in one terminal, automatically rebuilding when needed
76
-
jlpm watch
77
-
# Run JupyterLab in another terminal
78
-
jupyter lab
79
-
```
80
-
81
-
With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
82
-
83
-
By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
84
-
85
-
```bash
86
-
jupyter lab build --minimize=False
87
-
```
88
-
89
-
### Development uninstall
90
-
91
-
```bash
92
-
# Server extension must be manually disabled in develop mode
93
-
jupyter server extension disable jupyterlab_leetcode
94
-
pip uninstall jupyterlab_leetcode
95
-
```
96
-
97
-
In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
98
-
command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
99
-
folder is located. Then you can remove the symlink named `jupyterlab-leetcode` within that folder.
100
-
101
-
### Testing the extension
102
-
103
-
#### Server tests
104
-
105
-
This extension is using [Pytest](https://docs.pytest.org/) for Python code testing.
106
-
107
-
Install test dependencies (needed only once):
108
-
109
-
```sh
110
-
pip install -e ".[test]"
111
-
# Each time you install the Python package, you need to restore the front-end extension link
112
-
jupyter labextension develop . --overwrite
113
-
```
114
-
115
-
To execute them, run:
116
-
117
-
```sh
118
-
pytest -vv -r ap --cov jupyterlab_leetcode
119
-
```
120
-
121
-
#### Frontend tests
122
-
123
-
This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
124
-
125
-
To execute them, execute:
126
-
127
-
```sh
128
-
jlpm
129
-
jlpm test
130
-
```
131
-
132
-
#### Integration tests
133
-
134
-
This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
135
-
More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
136
-
137
-
More information are provided within the [ui-tests](./ui-tests/README.md) README.
0 commit comments