Skip to content

Commit

Permalink
Port to JupyterLab 3
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval committed Feb 21, 2021
1 parent f73b8af commit bde8753
Show file tree
Hide file tree
Showing 54 changed files with 3,497 additions and 46,515 deletions.
31 changes: 10 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ jobs:
run: |
conda activate test_gator
conda install -n test_gator --file requirements_dev.txt
pip install .
python setup.py develop --skip-npm
# Check pip dependencies
python -m pip check
shell: bash -l {0}
- name: Test the server extension
run: |
Expand Down Expand Up @@ -75,18 +77,16 @@ jobs:
activate-environment: test_gator
auto-update-conda: true
channels: conda-forge
mamba-version: "*"
python-version: ${{ matrix.python-version }}
show-channel-urls: true
use-only-tar-bz2: true
- name: Install dependencies
run: |
conda activate test_gator
mamba install -n test_gator --file requirements_dev.txt
conda install -n test_gator jupyterlab=2
pip install .
conda install -n test_gator --file requirements_dev.txt
python setup.py develop --skip-npm
# Check pip dependencies
pip check
python -m pip check
shell: bash -l {0}
- name: Test the server extension
run: |
Expand Down Expand Up @@ -152,12 +152,9 @@ jobs:
run: |
conda activate test_gator
conda install -n test_gator --file requirements_dev.txt
conda install -n test_gator jupyterlab=2
yarn install
pip install .
conda install -n test_gator jupyterlab=3
yarn install
jupyter labextension link packages/common/ packages/labextension/
python -m pip install -e .
shell: bash -l {0}

- name: Test the extension
Expand Down Expand Up @@ -223,12 +220,11 @@ jobs:
run: |
conda activate test_gator
mamba install -n test_gator --file requirements_dev.txt
conda install -n test_gator coveralls jupyterlab=2
conda install -n test_gator coveralls jupyterlab=3
yarn install
pip install .
python -m pip install -e .
# Check pip dependencies
pip check
jupyter labextension link packages/common/ packages/labextension/
shell: bash -l {0}

- name: Test the extension
Expand All @@ -249,13 +245,6 @@ jobs:
cat labextensions | grep "@mamba-org/gator-lab.*OK"
python -m jupyterlab.browser_check
shell: bash -l {0}
# - name: Integration tests
# run: |
# chmod -R a+rx ./e2e-tests
# docker-compose -f "docker-compose.yml" run e2e ./e2e-tests/run_e2e.sh
# - name: Stop containers
# if: always()
# run: docker-compose -f "docker-compose.yml" down

- name: Install Ruby
uses: ruby/setup-ruby@v1
Expand Down
3 changes: 1 addition & 2 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"packages/**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}": [
"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}": [
"prettier --write",
"git add"
]
}

5 changes: 2 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
node_modules
**/node_modules
**/lib
**/build
**/static
mamba_gator/navigator
**/package.json
mamba_gator
4 changes: 3 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"singleQuote": true
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid"
}
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ include tsconfig.json
include tsconfig-base.json
include eslint-base.js
graft packages
graft mamba_gator/labextension
prune packages/**/coverage
prune packages/**/lib
prune packages/**/build
Expand Down
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ The Mamba Navigator, a Web UI for managing conda environments
[![Coverage Status](https://coveralls.io/repos/github/mamba-org/gator/badge.svg?branch=master)](https://coveralls.io/github/mamba-org/gator?branch=master)
[![Swagger Validator](https://img.shields.io/swagger/valid/3.0?specUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fmamba-org%2Fgator%2Fmaster%2Fmamba_gator%2Frest_api.yml)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/mamba-org/gator/master/mamba_gator/rest_api.yml)

Provides Conda/Mamba environment and package management as a [standalone application](#Navigator) or as extension for [Jupyter Notebook](#Classical-Jupyter-Notebook) and [JupyterLab](#JupyterLab).
Provides Conda/Mamba environment and package management as a [standalone application](#Navigator) or as extension for [JupyterLab](#JupyterLab).

## Install

_Requirements_

- conda >= 4.5 or mamba >=0.5
- notebook >= 4.3
- JupyterLab 2.x (for the jupyterlab extension only)
- JupyterLab 1.x, 2.x or 3.x (for the JupyterLab extension only)

> Starting from 3.4, this extension will use [mamba](https://github.com/mamba-org/mamba) instead of `conda` if it finds it.
Expand All @@ -31,6 +30,11 @@ To install in the JupyterLab:

```shell
conda install -c conda-forge jupyterlab mamba_gator
```

If you use JupyterLab 1.x or 2.x, you can install the extension with the following command:

```shell
jupyter labextension install @mamba-org/gator-lab
```

Expand Down Expand Up @@ -61,11 +65,7 @@ Open JupyterLab: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybind

## Classical Jupyter Notebook

This extension adds a _Conda_ tab to the Jupyter file browser and a _Conda Packages_ item
to the _Kernel_ menu.
Clicking on either of those elements will open the standalone navigator in a new tab.

![Classical Notebook integration](packages/navigator/classical_nb_integration.gif)
The classical Jupyter Notebook is supported only for version prior to 4.1.

## Creating New Environments

Expand All @@ -86,12 +86,10 @@ There are three ways to create an environment:
## Development

```shell
conda create -c conda-forge -y -n gator python jupyterlab=2
conda create -c conda-forge -y -n gator python jupyterlab=3
conda install -c conda-forge -y -n gator --file requirements_dev.txt
conda activate gator
pip install -e .
jupyter nbextension install mamba_gator --py --sys-prefix --symlink
jupyter nbextension enable mamba_gator --py --sys-prefix
jupyter serverextension enable mamba_gator --py --sys-prefix

yarn install
Expand Down
5 changes: 0 additions & 5 deletions e2e-tests/Dockerfile

This file was deleted.

34 changes: 0 additions & 34 deletions e2e-tests/conftest.py

This file was deleted.

Loading

0 comments on commit bde8753

Please sign in to comment.