Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for installing the package in development version #22

Merged
merged 1 commit into from
Sep 12, 2023
Merged
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
78 changes: 78 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,84 @@ To remove the extension, execute:
pip uninstall jupyterlab-conda-store
```

## Installing the development version

### Pre-requisites

1. You will need to have [NodeJS](https://nodejs.org/en/download/) installed on your local computer to build the extension package.
2. Python >= 3.8 and `pip`.

### Building and linking the extension

> **Note**
> The `jlpm` command is JupyterLab's pinned version of [yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use`yarn` or `npm` in lieu of `jlpm` in the commands below.

1. Clone this repository to your local computer:

```bash
git clone https://github.com/conda-incubator/jupyterlab-conda-store.git
```

2. Change to the `jupyterlab-conda-store` directory:

```bash
cd jupyterlab-conda-store
```

3. Optional but recommended - Create and activate a development environment with conda:

```bash
# Create environment named `jupyterlab-conda-store`
conda create -n jupyterlab-conda-store
conda activate jupyterlab-conda-store
```

4. Install JupyterLab and NodeJS **if not installed**:

```bash
# Install node and jupyterlab from conda-forge
conda install -c conda-forge 'nodejs>16' 'jupyterlab<4'
```

5. Install the package in development mode:

```bash
pip install -e .
```

6. Now you'll need to link the development version of the extension to JupyterLab and rebuild the Typescript source:

```bash
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
```

7. On the first installation, or after making some changes, to visualize them in your local JupyterLab re-run the following command:

```bash
# Rebuild extension Typescript source after making changes
jlpm build
```

8. Run JupyterLab and check that the installation worked:

```bash
# Run JupyterLab
jupyter lab
```

### Uninstalling the development version

1. Remove the extension:

```bash
pip uninstall jupyterlab-conda-store
```

2. In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
folder is located. Then you can remove the symlink named `jupyterlab-conda-store` within that folder.

## Release

To create a new pacakge and release:
Expand Down