Skip to content

Commit

Permalink
Rename to glue-jupyterlab (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou authored Jul 5, 2023
1 parent c366931 commit 2467fd2
Show file tree
Hide file tree
Showing 35 changed files with 84 additions and 85 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:
set -eux
python -m pip install .[test]
pytest -vv -r ap --cov gluepyter
pytest -vv -r ap --cov glue_jupyterlab
jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "gluepyter.*OK"
jupyter server extension list 2>&1 | grep -ie "glue_jupyterlab.*OK"
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "gluepyter.*OK"
jupyter labextension list 2>&1 | grep -ie "glue-jupyterlab.*OK"
python -m jupyterlab.browser_check
- name: Package the extension
Expand All @@ -45,13 +45,13 @@ jobs:
pip install build
python -m build
pip uninstall -y "gluepyter" jupyterlab
pip uninstall -y "glue-jupyterlab" jupyterlab
- name: Upload extension packages
uses: actions/upload-artifact@v3
with:
name: extension-artifacts
path: dist/gluepyter*
path: dist/*
if-no-files-found: error

test_isolated:
Expand All @@ -76,14 +76,13 @@ jobs:
sudo rm -rf $(which node)
sudo rm -rf $(which node)
pip install "jupyterlab>=4.0.0,<5" gluepyter*.whl
pip install "jupyterlab>=4.0.0,<5" glue_jupyterlab*.whl
jupyter server extension list
jupyter server extension list 2>&1 | grep -ie "gluepyter.*OK"
jupyter server extension list 2>&1 | grep -ie "glue_jupyterlab.*OK"
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "gluepyter.*OK"
jupyter labextension list 2>&1 | grep -ie "glue-jupyterlab.*OK"
python -m jupyterlab.browser_check --no-browser-test
integration-tests:
Expand All @@ -109,7 +108,7 @@ jobs:
- name: Install the extension
run: |
set -eux
python -m pip install "jupyterlab>=4.0.0,<5" gluepyter*.whl
python -m pip install "jupyterlab>=4.0.0,<5" glue_jupyterlab*.whl
- name: Install dependencies
working-directory: ui-tests
Expand Down Expand Up @@ -137,7 +136,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v3
with:
name: gluepyter-playwright-tests
name: glue-jupyterlab-playwright-tests
path: |
ui-tests/test-results
ui-tests/playwright-report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ jobs:
- name: Upload Distributions
uses: actions/upload-artifact@v3
with:
name: gluepyter-releaser-dist-${{ github.run_number }}
name: glue-jupyterlab-releaser-dist-${{ github.run_number }}
path: .jupyter_releaser_checkout/dist
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ node_modules/
*.egg-info/
.ipynb_checkpoints
*.tsbuildinfo
gluepyter/labextension
glue_jupyterlab/labextension
# Version file is handled by hatchling
gluepyter/_version.py
glue_jupyterlab/_version.py

# Integration tests
ui-tests/test-results/
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ node_modules
**/lib
**/package.json
!/package.json
gluepyter
glue-jupyterlab
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Gluepyter
# glue-jupyterlab

The Glue application for JupyterLab

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantStack/gluepyter/stable?urlpath=lab)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/QuantStack/glue-jupyterlab/stable?urlpath=lab)

## Overview

Glue is an open-source data exploration tool that allows users to visualize and analyze data in a way that is intuitive and easy to understand. This JupyterLab extension brings Glue's data exploration capabilities directly into JupyterLab, allowing users to seamlessly analyze and visualize data without leaving their JupyterLab environment.

![gluepyter](gluepyter.png)
![glue-jupyterlab](glue-jupyterlab.png)

## What is the difference with Glue-jupyter?

[`glue-jupyter`](https://github.com/glue-viz/glue-jupyter) is a library for creating a Glue "application" object directly in Python from a Jupyter Notebook (either using classic Notebook or JupyterLab) and create Glue "viewers" using tools like bqplot or Matplotlib.

Gluepyter is an extension that allows opening Glue sessions directly from the JupyterLab application. It reuses components of glue-jupyter for creating the viewers and the underlying Glue application object.
glue-jupyterlab is an extension that allows opening Glue sessions directly from the JupyterLab application. It reuses components of glue-jupyter for creating the viewers and the underlying Glue application object.

## Requirements

Expand All @@ -25,15 +25,15 @@ Gluepyter is an extension that allows opening Glue sessions directly from the Ju
To install the extension, execute:

```bash
pip install gluepyter
pip install glue-jupyterlab
```

## Uninstall

To remove the extension, execute:

```bash
pip uninstall gluepyter
pip uninstall glue-jupyterlab
```

## Troubleshoot
Expand Down Expand Up @@ -64,13 +64,13 @@ The `jlpm` command is JupyterLab's pinned version of

```bash
# Clone the repo to your local environment
# Change directory to the gluepyter directory
# Change directory to the glue-jupyterlab directory
# Install package in development mode
pip install -e ".[test]"
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Server extension must be manually installed in develop mode
jupyter server extension enable gluepyter
jupyter server extension enable glue-jupyterlab
# Rebuild extension Typescript source after making changes
jlpm build
```
Expand All @@ -96,13 +96,13 @@ jupyter lab build --minimize=False

```bash
# Server extension must be manually disabled in develop mode
jupyter server extension disable gluepyter
pip uninstall gluepyter
jupyter server extension disable glue-jupyterlab
pip uninstall glue-jupyterlab
```

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 `gluepyter` within that folder.
folder is located. Then you can remove the symlink named `glue-jupyterlab` within that folder.

### Testing the extension

Expand All @@ -121,7 +121,7 @@ jupyter labextension develop . --overwrite
To execute them, run:

```sh
pytest -vv -r ap --cov gluepyter
pytest -vv -r ap --cov glue-jupyterlab
```

#### Frontend tests
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Making a new release of gluepyter
# Making a new release of glue-jupyterlab

The extension can be published to `PyPI` and `npm` manually or using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser).

Expand Down
2 changes: 1 addition & 1 deletion binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ _("jupyter", "server", "extension", "list")
_("jupyter", "labextension", "list")


print("JupyterLab with gluepyter is ready to run with:\n")
print("JupyterLab with glue-jupyterlab is ready to run with:\n")
print("\tjupyter lab\n")
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

@pytest.fixture
def jp_server_config(jp_server_config):
return {"ServerApp": {"jpserver_extensions": {"gluepyter": True}}}
return {"ServerApp": {"jpserver_extensions": {"glue_jupyterlab": True}}}
File renamed without changes
6 changes: 3 additions & 3 deletions gluepyter/__init__.py → glue_jupyterlab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@


def _jupyter_labextension_paths():
return [{"src": "labextension", "dest": "gluepyter"}]
return [{"src": "labextension", "dest": "glue-jupyterlab"}]


def _jupyter_server_extension_points():
return [{"module": "gluepyter"}]
return [{"module": "glue_jupyterlab"}]


def _load_jupyter_server_extension(server_app):
Expand All @@ -18,7 +18,7 @@ def _load_jupyter_server_extension(server_app):
JupyterLab application instance
"""
setup_handlers(server_app.web_app)
name = "gluepyter"
name = "glue_jupyterlab"
server_app.log.info(f"Registered {name} server extension")


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def _init_ydoc(self) -> None:
"""

self._sessionYDoc = Y.YDoc()
# Import `gluepyter.glue_ydoc.YGlue`` class through `jupyter_ydoc``
# Import `glue-jupyterlab.glue_ydoc.YGlue`` class through `jupyter_ydoc``
self._document: YGlue = ydocs.get("glu")(self._sessionYDoc)
self._document.observe(self._on_document_change)
self._ywidget = Widget(
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion gluepyter/handlers.py → glue_jupyterlab/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ def setup_handlers(web_app):
host_pattern = ".*$"

base_url = web_app.settings["base_url"]
route_pattern = url_path_join(base_url, "gluepyter", "advanced-links")
route_pattern = url_path_join(base_url, "glue-jupyterlab", "advanced-links")
handlers = [(route_pattern, AdvancedLinkHandler)]
web_app.add_handlers(host_pattern, handlers)
1 change: 1 addition & 0 deletions glue_jupyterlab/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Python unit tests for glue-jupyterlab."""
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import pytest
from pathlib import Path
from jupyter_ydoc import ydocs
from gluepyter.glue_session import SharedGlueSession
from gluepyter.glue_ydoc import COMPONENT_LINK_TYPE, IDENTITY_LINK_FUNCTION
from glue_jupyterlab.glue_session import SharedGlueSession
from glue_jupyterlab.glue_ydoc import COMPONENT_LINK_TYPE, IDENTITY_LINK_FUNCTION


@pytest.fixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from copy import deepcopy
from pathlib import Path
from ipywidgets import Output
from gluepyter.glue_session import SharedGlueSession
from gluepyter.glue_utils import nested_compare
from glue_jupyterlab.glue_session import SharedGlueSession
from glue_jupyterlab.glue_utils import nested_compare


def test_init(session_path):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

async def test_get_advanced_links_list(jp_fetch):
# When
response = await jp_fetch("gluepyter", "advanced-links")
response = await jp_fetch("glue-jupyterlab", "advanced-links")

# Then
assert response.code == 200
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion gluepyter/tests/__init__.py

This file was deleted.

4 changes: 2 additions & 2 deletions install.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packageManager": "python",
"packageName": "gluepyter",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package gluepyter"
"packageName": "glue-jupyterlab",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package glue-jupyterlab"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"NotebookApp": {
"nbserver_extensions": {
"gluepyter": true
"glue_jupyterlab": true
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ServerApp": {
"jpserver_extensions": {
"gluepyter": true
"glue_jupyterlab": true
}
}
}
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "gluepyter",
"name": "glue-jupyterlab",
"version": "0.1.0",
"description": "A JupyterLab extension for glue-viz",
"keywords": [
"jupyter",
"jupyterlab",
"jupyterlab-extension"
],
"homepage": "https://github.com/QuantStack/gluepyter",
"homepage": "https://github.com/QuantStack/glue-jupyterlab",
"bugs": {
"url": "https://github.com/QuantStack/gluepyter/issues"
"url": "https://github.com/QuantStack/glue-jupyterlab/issues"
},
"license": "BSD-3-Clause",
"author": {
Expand All @@ -25,7 +25,7 @@
"style": "style/index.css",
"repository": {
"type": "git",
"url": "https://github.com/QuantStack/gluepyter.git"
"url": "https://github.com/QuantStack/glue-jupyterlab.git"
},
"scripts": {
"build": "jlpm build:schema && jlpm build:lib && jlpm build:labextension:dev",
Expand All @@ -38,7 +38,7 @@
"clean": "jlpm clean:lib",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
"clean:labextension": "rimraf gluepyter/labextension gluepyter/_version.py",
"clean:labextension": "rimraf glue_jupyterlab/labextension glue_jupyterlab/_version.py",
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
"eslint": "jlpm eslint:check --fix",
"eslint:check": "eslint . --cache --ext .ts,.tsx",
Expand Down Expand Up @@ -116,12 +116,12 @@
"pip"
],
"base": {
"name": "gluepyter"
"name": "glue-jupyterlab"
}
}
},
"extension": true,
"outputDir": "gluepyter/labextension",
"outputDir": "glue_jupyterlab/labextension",
"sharedPackages": {
"yjs": {
"bundled": false,
Expand Down
Loading

0 comments on commit 2467fd2

Please sign in to comment.