From 2467fd2da1d4d942c682d9860d30c6fdbc4b02ae Mon Sep 17 00:00:00 2001 From: martinRenou Date: Wed, 5 Jul 2023 15:07:08 +0200 Subject: [PATCH] Rename to glue-jupyterlab (#113) --- .github/workflows/build.yml | 21 ++++++++------- .github/workflows/check-release.yml | 2 +- .gitignore | 4 +-- .prettierignore | 2 +- README.md | 24 +++++++++--------- RELEASE.md | 2 +- binder/postBuild | 2 +- conftest.py | 2 +- gluepyter.png => glue-jupyterlab.png | Bin {gluepyter => glue_jupyterlab}/__init__.py | 6 ++--- .../glue_session.py | 2 +- {gluepyter => glue_jupyterlab}/glue_utils.py | 0 {gluepyter => glue_jupyterlab}/glue_ydoc.py | 0 {gluepyter => glue_jupyterlab}/handlers.py | 2 +- glue_jupyterlab/tests/__init__.py | 1 + .../tests/conftest.py | 4 +-- .../tests/test_glue_session.py | 4 +-- .../tests/test_handlers.py | 2 +- .../tests/test_ydoc.py | 0 gluepyter/tests/__init__.py | 1 - install.json | 4 +-- .../{glue_lab.json => glue_jupyterlab.json} | 2 +- .../{glue_lab.json => glue_jupyterlab.json} | 2 +- package.json | 14 +++++----- pyproject.toml | 20 +++++++-------- src/__tests__/glue_lab.spec.ts | 2 +- src/document/plugin.ts | 16 ++++++------ src/leftPanel/plugin.ts | 8 +++--- src/linkPanel/model.ts | 2 +- src/viewPanel/sessionWidget.ts | 2 +- src/yWidget.ts | 2 +- ui-tests/package.json | 4 +-- ui-tests/tests/test.spec.ts | 2 +- ui-tests/yarn.lock | 4 +-- yarn.lock | 4 +-- 35 files changed, 84 insertions(+), 85 deletions(-) rename gluepyter.png => glue-jupyterlab.png (100%) rename {gluepyter => glue_jupyterlab}/__init__.py (82%) rename {gluepyter => glue_jupyterlab}/glue_session.py (99%) rename {gluepyter => glue_jupyterlab}/glue_utils.py (100%) rename {gluepyter => glue_jupyterlab}/glue_ydoc.py (100%) rename {gluepyter => glue_jupyterlab}/handlers.py (87%) create mode 100644 glue_jupyterlab/tests/__init__.py rename {gluepyter => glue_jupyterlab}/tests/conftest.py (90%) rename {gluepyter => glue_jupyterlab}/tests/test_glue_session.py (97%) rename {gluepyter => glue_jupyterlab}/tests/test_handlers.py (77%) rename {gluepyter => glue_jupyterlab}/tests/test_ydoc.py (100%) delete mode 100644 gluepyter/tests/__init__.py rename jupyter-config/nb-config/{glue_lab.json => glue_jupyterlab.json} (67%) rename jupyter-config/server-config/{glue_lab.json => glue_jupyterlab.json} (66%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e91e4d5..aefdda4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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: @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index 2122ed9..2bbd09b 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -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 diff --git a/.gitignore b/.gitignore index ef1fade..7db2d78 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ diff --git a/.prettierignore b/.prettierignore index 924b3da..813e829 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,4 +3,4 @@ node_modules **/lib **/package.json !/package.json -gluepyter +glue-jupyterlab diff --git a/README.md b/README.md index d6bb482..7c42eed 100644 --- a/README.md +++ b/README.md @@ -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 @@ -25,7 +25,7 @@ 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 @@ -33,7 +33,7 @@ pip install gluepyter To remove the extension, execute: ```bash -pip uninstall gluepyter +pip uninstall glue-jupyterlab ``` ## Troubleshoot @@ -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 ``` @@ -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 @@ -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 diff --git a/RELEASE.md b/RELEASE.md index 6c5cf54..4e99fbe 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -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). diff --git a/binder/postBuild b/binder/postBuild index 4b49b64..da6333f 100644 --- a/binder/postBuild +++ b/binder/postBuild @@ -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") diff --git a/conftest.py b/conftest.py index e8f2f3b..7fe13a5 100644 --- a/conftest.py +++ b/conftest.py @@ -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}}} diff --git a/gluepyter.png b/glue-jupyterlab.png similarity index 100% rename from gluepyter.png rename to glue-jupyterlab.png diff --git a/gluepyter/__init__.py b/glue_jupyterlab/__init__.py similarity index 82% rename from gluepyter/__init__.py rename to glue_jupyterlab/__init__.py index 7e0fcd5..8997e0f 100644 --- a/gluepyter/__init__.py +++ b/glue_jupyterlab/__init__.py @@ -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): @@ -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") diff --git a/gluepyter/glue_session.py b/glue_jupyterlab/glue_session.py similarity index 99% rename from gluepyter/glue_session.py rename to glue_jupyterlab/glue_session.py index d940346..0fa6aa0 100644 --- a/gluepyter/glue_session.py +++ b/glue_jupyterlab/glue_session.py @@ -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( diff --git a/gluepyter/glue_utils.py b/glue_jupyterlab/glue_utils.py similarity index 100% rename from gluepyter/glue_utils.py rename to glue_jupyterlab/glue_utils.py diff --git a/gluepyter/glue_ydoc.py b/glue_jupyterlab/glue_ydoc.py similarity index 100% rename from gluepyter/glue_ydoc.py rename to glue_jupyterlab/glue_ydoc.py diff --git a/gluepyter/handlers.py b/glue_jupyterlab/handlers.py similarity index 87% rename from gluepyter/handlers.py rename to glue_jupyterlab/handlers.py index 056a006..3939f76 100644 --- a/gluepyter/handlers.py +++ b/glue_jupyterlab/handlers.py @@ -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) diff --git a/glue_jupyterlab/tests/__init__.py b/glue_jupyterlab/tests/__init__.py new file mode 100644 index 0000000..c6a9681 --- /dev/null +++ b/glue_jupyterlab/tests/__init__.py @@ -0,0 +1 @@ +"""Python unit tests for glue-jupyterlab.""" diff --git a/gluepyter/tests/conftest.py b/glue_jupyterlab/tests/conftest.py similarity index 90% rename from gluepyter/tests/conftest.py rename to glue_jupyterlab/tests/conftest.py index 06a009f..bd26683 100644 --- a/gluepyter/tests/conftest.py +++ b/glue_jupyterlab/tests/conftest.py @@ -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 diff --git a/gluepyter/tests/test_glue_session.py b/glue_jupyterlab/tests/test_glue_session.py similarity index 97% rename from gluepyter/tests/test_glue_session.py rename to glue_jupyterlab/tests/test_glue_session.py index 55fa7e5..8533de5 100644 --- a/gluepyter/tests/test_glue_session.py +++ b/glue_jupyterlab/tests/test_glue_session.py @@ -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): diff --git a/gluepyter/tests/test_handlers.py b/glue_jupyterlab/tests/test_handlers.py similarity index 77% rename from gluepyter/tests/test_handlers.py rename to glue_jupyterlab/tests/test_handlers.py index 9646485..c3f0c2b 100644 --- a/gluepyter/tests/test_handlers.py +++ b/glue_jupyterlab/tests/test_handlers.py @@ -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 diff --git a/gluepyter/tests/test_ydoc.py b/glue_jupyterlab/tests/test_ydoc.py similarity index 100% rename from gluepyter/tests/test_ydoc.py rename to glue_jupyterlab/tests/test_ydoc.py diff --git a/gluepyter/tests/__init__.py b/gluepyter/tests/__init__.py deleted file mode 100644 index a4a6f28..0000000 --- a/gluepyter/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Python unit tests for gluepyter.""" diff --git a/install.json b/install.json index 4d855f7..e133298 100644 --- a/install.json +++ b/install.json @@ -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" } diff --git a/jupyter-config/nb-config/glue_lab.json b/jupyter-config/nb-config/glue_jupyterlab.json similarity index 67% rename from jupyter-config/nb-config/glue_lab.json rename to jupyter-config/nb-config/glue_jupyterlab.json index 11d5cea..3896f9b 100644 --- a/jupyter-config/nb-config/glue_lab.json +++ b/jupyter-config/nb-config/glue_jupyterlab.json @@ -1,7 +1,7 @@ { "NotebookApp": { "nbserver_extensions": { - "gluepyter": true + "glue_jupyterlab": true } } } diff --git a/jupyter-config/server-config/glue_lab.json b/jupyter-config/server-config/glue_jupyterlab.json similarity index 66% rename from jupyter-config/server-config/glue_lab.json rename to jupyter-config/server-config/glue_jupyterlab.json index 473fc56..a576b23 100644 --- a/jupyter-config/server-config/glue_lab.json +++ b/jupyter-config/server-config/glue_jupyterlab.json @@ -1,7 +1,7 @@ { "ServerApp": { "jpserver_extensions": { - "gluepyter": true + "glue_jupyterlab": true } } } diff --git a/package.json b/package.json index d27a618..e069ad3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "gluepyter", + "name": "glue-jupyterlab", "version": "0.1.0", "description": "A JupyterLab extension for glue-viz", "keywords": [ @@ -7,9 +7,9 @@ "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": { @@ -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", @@ -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", @@ -116,12 +116,12 @@ "pip" ], "base": { - "name": "gluepyter" + "name": "glue-jupyterlab" } } }, "extension": true, - "outputDir": "gluepyter/labextension", + "outputDir": "glue_jupyterlab/labextension", "sharedPackages": { "yjs": { "bundled": false, diff --git a/pyproject.toml b/pyproject.toml index 173b896..56ba30a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["hatchling>=1.4.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version"] build-backend = "hatchling.build" [project] -name = "gluepyter" +name = "glue-jupyterlab" readme = "README.md" license = { file = "LICENSE" } requires-python = ">=3.7" @@ -48,26 +48,26 @@ source = "nodejs" fields = ["description", "authors", "urls"] [tool.hatch.build.targets.sdist] -artifacts = ["gluepyter/labextension"] +artifacts = ["glue_jupyterlab/labextension"] exclude = [".github", "binder"] [tool.hatch.build.targets.wheel.shared-data] -"gluepyter/labextension" = "share/jupyter/labextensions/gluepyter" -"install.json" = "share/jupyter/labextensions/gluepyter/install.json" +"glue_jupyterlab/labextension" = "share/jupyter/labextensions/glue-jupyterlab" +"install.json" = "share/jupyter/labextensions/glue-jupyterlab/install.json" "jupyter-config/server-config" = "etc/jupyter/jupyter_server_config.d" "jupyter-config/nb-config" = "etc/jupyter/jupyter_notebook_config.d" [tool.hatch.build.hooks.version] -path = "gluepyter/_version.py" +path = "glue_jupyterlab/_version.py" [tool.hatch.build.hooks.jupyter-builder] dependencies = ["hatch-jupyter-builder>=0.5"] build-function = "hatch_jupyter_builder.npm_builder" ensured-targets = [ - "gluepyter/labextension/static/style.js", - "gluepyter/labextension/package.json", + "glue_jupyterlab/labextension/static/style.js", + "glue_jupyterlab/labextension/package.json", ] -skip-if-exists = ["gluepyter/labextension/static/style.js"] +skip-if-exists = ["glue_jupyterlab/labextension/static/style.js"] [tool.hatch.build.hooks.jupyter-builder.build-kwargs] build_cmd = "build:prod" @@ -77,7 +77,7 @@ npm = ["jlpm"] build_cmd = "install:extension" npm = ["jlpm"] source_dir = "src" -build_dir = "gluepyter/labextension" +build_dir = "glue_jupyterlab/labextension" [tool.jupyter-releaser.options] version_cmd = "hatch version" @@ -94,4 +94,4 @@ before-build-python = ["jlpm clean:all"] ignore = ["W002"] [project.entry-points.jupyter_ydoc] -glu = "gluepyter.glue_ydoc:YGlue" +glu = "glue_jupyterlab.glue_ydoc:YGlue" diff --git a/src/__tests__/glue_lab.spec.ts b/src/__tests__/glue_lab.spec.ts index 9d67f3a..0637d38 100644 --- a/src/__tests__/glue_lab.spec.ts +++ b/src/__tests__/glue_lab.spec.ts @@ -2,7 +2,7 @@ * Example of [Jest](https://jestjs.io/docs/getting-started) unit tests */ -describe('gluepyter', () => { +describe('glue-jupyterlab', () => { it('should be tested', () => { expect(1 + 1).toEqual(2); }); diff --git a/src/document/plugin.ts b/src/document/plugin.ts index 5b8fba3..63e1d27 100644 --- a/src/document/plugin.ts +++ b/src/document/plugin.ts @@ -22,11 +22,11 @@ import { GlueSessionSharedModel } from './sharedModel'; import { GlueSessionTracker } from './tracker'; import { GlueCanvasWidgetFactory } from './widgetFactory'; -const NAME_SPACE = 'gluepyter'; +const NAME_SPACE = 'glue-jupyterlab'; export const sessionTrackerPlugin: JupyterFrontEndPlugin = { - id: 'gluepyter:tracker-plugin', + id: 'glue-jupyterlab:tracker-plugin', autoStart: true, provides: IGlueSessionTracker, activate: (app: JupyterFrontEnd) => { @@ -38,10 +38,10 @@ export const sessionTrackerPlugin: JupyterFrontEndPlugin = }; /** - * Initialization data for the gluepyter extension. + * Initialization data for the glue-jupyterlab extension. */ export const gluePlugin: JupyterFrontEndPlugin = { - id: 'gluepyter:document-plugin', + id: 'glue-jupyterlab:document-plugin', autoStart: true, requires: [ IRenderMimeRegistry, @@ -76,7 +76,7 @@ export const gluePlugin: JupyterFrontEndPlugin = { canvasTracker.save(widget); }); canvasTracker.add(widget); - app.shell.activateById('gluepyter::controlPanel'); + app.shell.activateById('glue-jupyterlab::controlPanel'); }); app.docRegistry.addWidgetFactory(widgetFactory); @@ -106,7 +106,7 @@ export const gluePlugin: JupyterFrontEndPlugin = { * Add launcher button to create a new glue session. */ export const newFilePlugin: JupyterFrontEndPlugin = { - id: 'gluepyter:create-new-plugin', + id: 'glue-jupyterlab:create-new-plugin', autoStart: true, requires: [IFileBrowserFactory], optional: [ILauncher, ICommandPalette], @@ -148,7 +148,7 @@ export const newFilePlugin: JupyterFrontEndPlugin = { if (launcher) { launcher.add({ command: CommandIDs.createNew, - category: 'Gluepyter', + category: 'glue-jupyterlab', rank: 1 }); } @@ -158,7 +158,7 @@ export const newFilePlugin: JupyterFrontEndPlugin = { commandPalette.addItem({ command: CommandIDs.createNew, args: { isPalette: true }, - category: 'Gluepyter' + category: 'glue-jupyterlab' }); } } diff --git a/src/leftPanel/plugin.ts b/src/leftPanel/plugin.ts index 0487b6d..7904321 100644 --- a/src/leftPanel/plugin.ts +++ b/src/leftPanel/plugin.ts @@ -15,7 +15,7 @@ import { GridStackItem } from '../viewPanel/gridStackItem'; import { DocumentRegistry } from '@jupyterlab/docregistry'; import { DocumentManager } from '@jupyterlab/docmanager'; -const NAME_SPACE = 'gluepyter'; +const NAME_SPACE = 'glue-jupyterlab'; function addCommands( commands: CommandRegistry, @@ -232,7 +232,7 @@ function addCommands( } export const controlPanel: JupyterFrontEndPlugin = { - id: 'gluepyter:control-panel', + id: 'glue-jupyterlab:control-panel', autoStart: true, requires: [ILayoutRestorer, IGlueSessionTracker, IRenderMimeRegistry], activate: ( @@ -260,8 +260,8 @@ export const controlPanel: JupyterFrontEndPlugin = { manager: docManager }); - controlPanel.id = 'gluepyter::controlPanel'; - controlPanel.title.caption = 'gluepyter'; + controlPanel.id = 'glue-jupyterlab::controlPanel'; + controlPanel.title.caption = 'glue-jupyterlab'; controlPanel.title.icon = glueIcon; if (restorer) { diff --git a/src/linkPanel/model.ts b/src/linkPanel/model.ts index 666bd9e..8084db0 100644 --- a/src/linkPanel/model.ts +++ b/src/linkPanel/model.ts @@ -13,7 +13,7 @@ import { } from './types'; import { ILink } from '../_interface/glue.schema'; -const ADVANCED_LINKS_URL = '/gluepyter/advanced-links'; +const ADVANCED_LINKS_URL = '/glue-jupyterlab/advanced-links'; /** * The link editor model. diff --git a/src/viewPanel/sessionWidget.ts b/src/viewPanel/sessionWidget.ts index 1fe434c..0c46ada 100644 --- a/src/viewPanel/sessionWidget.ts +++ b/src/viewPanel/sessionWidget.ts @@ -144,7 +144,7 @@ export class SessionWidget extends BoxPanel { // TODO Handle loading errors and report in the UI? const code = ` - from gluepyter.glue_session import SharedGlueSession + from glue_jupyterlab.glue_session import SharedGlueSession GLUE_SESSION = SharedGlueSession("${this._context.localPath}") `; diff --git a/src/yWidget.ts b/src/yWidget.ts index a351312..657d396 100644 --- a/src/yWidget.ts +++ b/src/yWidget.ts @@ -28,7 +28,7 @@ class YGlueSessionWidget implements IJupyterYWidget { } export const yGlueSessionWidgetPlugin: JupyterFrontEndPlugin = { - id: 'gluepyter:yjswidget-plugin', + id: 'glue-jupyterlab:yjswidget-plugin', autoStart: true, requires: [IJupyterYWidgetManager, IGlueSessionTracker], activate: ( diff --git a/ui-tests/package.json b/ui-tests/package.json index 7589312..3167523 100644 --- a/ui-tests/package.json +++ b/ui-tests/package.json @@ -1,7 +1,7 @@ { - "name": "gluepyter-ui-tests", + "name": "glue-jupyterlab-ui-tests", "version": "1.0.0", - "description": "JupyterLab gluepyter Integration Tests", + "description": "JupyterLab glue-jupyterlab Integration Tests", "private": true, "scripts": { "start": "rimraf .jupyter_ystore.db && jupyter lab ../examples --config jupyter_server_test_config.py", diff --git a/ui-tests/tests/test.spec.ts b/ui-tests/tests/test.spec.ts index 44eeb6d..f550715 100644 --- a/ui-tests/tests/test.spec.ts +++ b/ui-tests/tests/test.spec.ts @@ -4,7 +4,7 @@ import { Locator } from '@playwright/test'; async function closeSideTab(page: IJupyterLabPageFixture): Promise { await page .getByRole('tablist', { name: 'main sidebar' }) - .getByRole('tab', { name: 'gluepyter' }) + .getByRole('tab', { name: 'glue-jupyterlab' }) .click(); } diff --git a/ui-tests/yarn.lock b/ui-tests/yarn.lock index 2e6b68d..1d2aafc 100644 --- a/ui-tests/yarn.lock +++ b/ui-tests/yarn.lock @@ -2547,9 +2547,9 @@ __metadata: languageName: node linkType: hard -"gluepyter-ui-tests@workspace:.": +"glue-jupyterlab-ui-tests@workspace:.": version: 0.0.0-use.local - resolution: "gluepyter-ui-tests@workspace:." + resolution: "glue-jupyterlab-ui-tests@workspace:." dependencies: "@jupyterlab/galata": ^5.0.0 "@playwright/test": ^1.32.0 diff --git a/yarn.lock b/yarn.lock index 7a962e7..4667adf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6227,9 +6227,9 @@ __metadata: languageName: node linkType: hard -"gluepyter@workspace:.": +"glue-jupyterlab@workspace:.": version: 0.0.0-use.local - resolution: "gluepyter@workspace:." + resolution: "glue-jupyterlab@workspace:." dependencies: "@jupyter/docprovider": ^1.0.0-alpha.8 "@jupyter/ydoc": ^1.0.2