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

Update labextension to JupyterLab 3 #111

Merged
merged 5 commits into from
Feb 28, 2021
Merged
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
63 changes: 26 additions & 37 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,27 +245,20 @@ 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
with:
ruby-version: 2.6
- name: Upload coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
conda activate test_gator
gem install coveralls-lcov
pushd packages/common/
coveralls-lcov -v -n coverage/lcov.info > ../../common-jscoverage.json
popd
python -m pip install --upgrade coveralls
python -m coveralls --merge=common-jscoverage.json
shell: bash -l {0}
# - name: Install Ruby
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: 2.6
# - name: Upload coverage
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# conda activate test_gator
# gem install coveralls-lcov
# pushd packages/common/
# coveralls-lcov -v -n coverage/lcov.info > ../../common-jscoverage.json
# popd
# python -m pip install --upgrade coveralls
# python -m coveralls --merge=common-jscoverage.json
# shell: bash -l {0}
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: 3 additions & 2 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ channels:
- conda-forge
dependencies:
- python >=3.6,<3.9
- jupyterlab =2
- jupyterlab =3
- jupyter-packaging >=0.7.9,<0.8.0
- jupyter-server-proxy
- nb_conda_kernels >=2.2.3
- nodejs >=11
- nodejs >=14
- yarn
- notebook >=4.3.1
- packaging
6 changes: 3 additions & 3 deletions binder/jupyter_notebook_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"--no-browser",
'--port={port}',
"--ip=0.0.0.0",
"--NotebookApp.token=''",
"--NotebookApp.base_url={base_url}mamba",
"--NotebookApp.allow_remote_access=True",
"--ServerApp.token=''",
"--ServerApp.base_url={base_url}mamba",
"--ServerApp.allow_remote_access=True",
],
"timeout": 120,
"absolute_url": True,
Expand Down
5 changes: 2 additions & 3 deletions binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ set -eux
yarn install
yarn run build
python -m pip install .
python -m pip install jupyterlab-tour

# !! Be sure the version of jupyterlab-tour matches the one saved in bind/workspace.json
jupyter labextension install jupyterlab-tour@^2.1.1 @jupyterlab/server-proxy --no-build
jupyter labextension link packages/common/ packages/labextension --no-build
jupyter labextension install @jupyterlab/server-proxy --no-build
jupyter lab build --minimize=False

# Import the workspace into JupyterLab
Expand Down
2 changes: 1 addition & 1 deletion binder/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"jupyterlab-tour:state": {
"tutorialsDone": ["jupyterlab-tour:welcome"],
"version": "2.1.1"
"version": "3.0.0"
},
"conda-env:conda-env": { "data": {} }
},
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