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
This commit was partially generated via juptyerlab.upgrade_extension which is governed by BSD-3 and thus the following disclaimer applies:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
jupyterlab-execute-time is also governed by BSD-3.
-**Breaking**: Adds support for Jupyterlab@3.x and removes support for Jupyterlab@2.x. To migrate, after installing Jupyterlab@3.x run `pip install jupyterlab_execute_time`.

9
9
10
10
This is inspired by the notebook version [here](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/master/src/jupyter_contrib_nbextensions/nbextensions/execute_time).
11
11
12
12
Note: for this to show anything, you need to enable cell timing in the notebook via Settings->Advanced Settings Editor->Notebook: `{"recordTiming": true}`. This is a notebook metadata setting and not a plugin setting. The plugin just displays this data.
13
13
14
-
"Jupyter" is a trademark of the NumFOCUS foundation, of which Project Jupyter is a part."
Note: You will need NodeJS to build the extension package.
29
+
30
+
The `jlpm` command is JupyterLab's pinned version of
31
+
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
32
+
`yarn` or `npm` in lieu of `jlpm` below.
29
33
30
34
```bash
31
35
# Clone the repo to your local environment
32
-
# Move to jupyterlab-execute-time directory
33
-
# Install dependencies
34
-
yarn
35
-
# Build Typescript source
36
-
yarn run build
36
+
# Change directory to the jupyterlab_execute_time directory
37
+
# Install package in development mode
38
+
pip install -e .
37
39
# Link your development version of the extension with JupyterLab
38
-
jupyter labextension link .
39
-
# Rebuild Typescript source after making changes
40
-
yarn run build
41
-
# Rebuild JupyterLab after making any changes
42
-
jupyter lab build
40
+
jupyter labextension develop . --overwrite
41
+
# Rebuild extension Typescript source after making changes
42
+
jlpm run build
43
43
```
44
44
45
-
You can watch the source directory and run JupyterLab in watch mode to watch for changes in the extension's source and automatically rebuild the extension and application.
45
+
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.
46
46
47
47
```bash
48
-
# Watch the source directory in another terminal tab
49
-
yarn run watch
50
-
# Run jupyterlab in watch mode in one terminal tab
51
-
jupyter lab --watch
48
+
# Watch the source directory in one terminal, automatically rebuilding when needed
49
+
jlpm run watch
50
+
# Run JupyterLab in another terminal
51
+
jupyter lab
52
52
```
53
53
54
-
To test:
54
+
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).
55
+
56
+
By default, the `jlpm run 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:
0 commit comments