Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Reana JupyterLab plugin provides a set of tools to interact with the [Reana](htt
## Installation guide for users
To install the extension, run the following command:
```bash
pip install reana-jupyterlab
python -m pip install reana-jupyterlab
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should we remove the python -m prefix here ?
And add it on lines 62 and 68 ? (python -m jupyter ...

This command installs the extension within the "current" python environment, doesn't it ?

```

In case you want to run the tests, install the extension with the following command:
```bash
pip install reana-jupyterlab[dev]
python -m pip install reana-jupyterlab[dev]
```

### Docker image
Expand All @@ -52,17 +52,23 @@ Build the extension
jlpm run build
```

Install the extension (including the testing dependencies)
Enable watch mode in a separate terminal to automatically rebuild the extension on changes:
```bash
python -m pip install .[dev]
jlpm watch
```

Install the extension in editable mode and include the development dependencies:
```bash
python -m pip install -e .
python -m pip install ".[dev]"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have run these commands in reverse order; first install all the requirements (including the dev ones), then enable dev mode (-e) to "link" any change to the current extension installation.

Am I missing anything ?

```

Enable the server extension
```bash
jupyter server extension enable --py reana_jupyterlab
python -m jupyter server extension enable --py reana_jupyterlab.server
```

Finally, open a JupyterLab instance. The extension should be available in the JupyterLab sidebar.
```bash
jupyter lab
```
python -m jupyter lab --autoreload
```
9 changes: 8 additions & 1 deletion reana_jupyterlab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,11 @@ def _jupyter_labextension_paths():
def _jupyter_server_extension_points(): # pragma: no cover
return [{
"module": "reana_jupyterlab.server"
}]
}]

# Import and expose the server extension loading function for backward compatibility
# Fixes `X Validation failed: validation failed` error

from .server import _load_jupyter_server_extension

load_jupyter_server_extension = _load_jupyter_server_extension