Skip to content

Commit

Permalink
Remove websocket chat extension (#100)
Browse files Browse the repository at this point in the history
* Remove the websocket extension (jupyterlab-ws-chat)

* Fix install scripts

* Fix tests

* Update documentation

* Fix dev-install script
  • Loading branch information
brichet authored Nov 18, 2024
1 parent a664804 commit 6dd839e
Show file tree
Hide file tree
Showing 45 changed files with 26 additions and 6,283 deletions.
42 changes: 18 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,10 @@ jobs:
./scripts/dev_install.sh
pytest -vv -r ap --cov
build_extensions:
build_extension:
runs-on: ubuntu-latest
needs: build_jupyter-chat
strategy:
matrix:
extension: [collaborative, ws]
name: Build ${{ matrix.extension }} chat extension
name: Build chat extension

steps:
- name: Checkout
Expand All @@ -81,29 +78,26 @@ jobs:
- name: Package the extensions
run: |
jlpm install
jlpm build:${{ matrix.extension }}
jlpm build
- name: Package extension
run: |
set -eux
pip install build python/jupyterlab-${{ matrix.extension }}-chat
python -m build python/jupyterlab-${{ matrix.extension }}-chat
pip uninstall -y "jupyterlab_${{ matrix.extension }}_chat" jupyterlab
pip install build python/jupyterlab-collaborative-chat
python -m build python/jupyterlab-collaborative-chat
pip uninstall -y "jupyterlab_collaborative_chat" jupyterlab
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: jupyterlab_${{ matrix.extension }}_chat-artifacts
path: python/jupyterlab-${{ matrix.extension }}-chat/dist/jupyterlab_${{ matrix.extension }}_chat*
name: jupyterlab_collaborative_chat-artifacts
path: python/jupyterlab-collaborative-chat/dist/jupyterlab_collaborative_chat*
if-no-files-found: error

integration-tests:
name: ${{ matrix.extension }} integration tests
needs: build_extensions
name: Integration tests
needs: build_extension
runs-on: ubuntu-latest
strategy:
matrix:
extension: [collaborative, ws]

env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers
Expand All @@ -118,15 +112,15 @@ jobs:
- name: Download extension package
uses: actions/download-artifact@v3
with:
name: jupyterlab_${{ matrix.extension }}_chat-artifacts
name: jupyterlab_collaborative_chat-artifacts

- name: Install the extension
run: |
set -eux
python -m pip install "jupyterlab>=4.0.0,<5" jupyterlab_${{ matrix.extension }}_chat*.whl
python -m pip install "jupyterlab>=4.0.0,<5" jupyterlab_collaborative_chat*.whl
- name: Install dependencies
working-directory: python/jupyterlab-${{ matrix.extension }}-chat/ui-tests
working-directory: python/jupyterlab-collaborative-chat/ui-tests
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: 0
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
Expand All @@ -141,21 +135,21 @@ jobs:

- name: Install browser
run: jlpm playwright install chromium
working-directory: python/jupyterlab-${{ matrix.extension }}-chat/ui-tests
working-directory: python/jupyterlab-collaborative-chat/ui-tests

- name: Execute integration tests
working-directory: python/jupyterlab-${{ matrix.extension }}-chat/ui-tests
working-directory: python/jupyterlab-collaborative-chat/ui-tests
run: |
jlpm playwright test --retries=2
- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v3
with:
name: jupyterlab_${{ matrix.extension }}_chat-playwright-tests
name: jupyterlab_collaborative_chat-playwright-tests
path: |
python/jupyterlab-${{ matrix.extension }}-chat/ui-tests/test-results
python/jupyterlab-${{ matrix.extension }}-chat/ui-tests/playwright-report
python/jupyterlab-collaborative-chat/ui-tests/test-results
python/jupyterlab-collaborative-chat/ui-tests/playwright-report
check_links:
name: Check Links
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,9 @@ It is composed of:
the `YChat` shared document in jupyter_ydoc
- a NPM package named `jupyterlab-collaborative-chat-extension`.

#### Chat extension based on websocket: *python/jupyterlab-ws-chat*
#### REMOVED - Chat extension based on websocket

This extension is an implementation of the `@jupyter/chat` package, relying on
websocket for the communication between server and front end.

It is composed of a Python package named `jupyterlab_ws_chat`
for the server side and a NPM package named `jupyterlab-ws-chat`.
This extension has been moved to its own [repository](https://github.com/brichet/jupyterlab-ws-chat)

## Contributing

Expand Down
1 change: 0 additions & 1 deletion docs/source/developers/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ maxdepth: 2
./jupyter-chat
./jupyterlab-collaborative-chat
./jupyterlab-ws-chat
```
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Changes in typescript sources of `@jupyter/chat` or `jupyterlab-collaborative-ch
be built again to be available in the jupyterlab.

```bash
jlpm build:collaborative
jlpm build
```

## Testing locally the extension
Expand Down
39 changes: 0 additions & 39 deletions docs/source/developers/contributing/jupyterlab-ws-chat.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ required to build a chat. This package is designed to be used in an extension.
- `jupyterlab-collaborative-chat`, an extension built on top of `@jupyter/chat`, using
the collaborative edition as messaging system.

- `jupyterlab-ws-chat`, an other extension built on top of `@jupyter/chat`, using
websocket as messaging system.

```{toctree}
---
maxdepth: 3
Expand Down
28 changes: 0 additions & 28 deletions docs/source/users/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,34 +62,6 @@ area, like any other document.
Opening a chat from the left panel will open it in the left panel.
```

## Websocket chat

The `jupyterlab-ws-chat` extension adds a chat panel using websocket for messages
exchange.

```{warning}
This extension is currently under development, and users may encounter issues with it.
```

### Install websocket chat

The websocket chat is available on [PyPI](https://pypi.org/project/jupyterlab-ws-chat/).

```bash
pip install jupyterlab-ws-chat
```

To uninstall the package:

```bash
pip uninstall jupyterlab-ws-chat
```

### Open the chat

The chat can be opened from the left panel
![chat icon](../../../packages/jupyter-chat/style/icons/chat.svg){w=24px}.

## Chat usage

The chat UI is composed of a list of messages and an input to send new messages.
Expand Down
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,16 @@
},
"workspaces": [
"packages/*",
"python/jupyterlab-collaborative-chat",
"python/jupyterlab-ws-chat"
"python/jupyterlab-collaborative-chat"
],
"scripts": {
"build": "lerna run build --stream",
"build:core": "lerna run build --stream --scope \"@jupyter/chat\"",
"build:collaborative": "lerna run build --scope=jupyterlab-collaborative-chat-extension --include-filtered-dependencies",
"build:ws": "lerna run build --scope=jupyterlab-ws-chat-extension --include-filtered-dependencies",
"build:prod": "lerna run build:prod --stream",
"clean": "lerna run clean",
"clean:all": "lerna run clean:all",
"dev": "jupyter lab --config playground/config.py",
"dev-install": "jlpm dev-install:collaborative && jlpm dev-install:ws",
"dev-install:collaborative": "jlpm build:collaborative && lerna run dev-install --scope=jupyterlab-collaborative-chat-extension --include-filtered-dependencies",
"dev-install:ws": "jlpm build:ws && lerna run dev-install --scope=jupyterlab-ws-chat-extension --include-filtered-dependencies",
"dev-install": "jlpm build && lerna run dev-install",
"lint": "jlpm && lerna run prettier && lerna run eslint",
"lint:check": "lerna run prettier:check && lerna run eslint:check",
"watch": "lerna run watch --parallel --stream",
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ fields = ["description", "authors", "urls"]
[tool.jupyter-releaser.options]
version-cmd = "cd ../.. && python scripts/bump_version.py --force --skip-if-dirty"
python_packages = [
"python/jupyterlab-collaborative-chat",
"python/jupyterlab-ws-chat"
"python/jupyterlab-collaborative-chat"
]

[tool.jupyter-releaser.hooks]
Expand Down
29 changes: 0 additions & 29 deletions python/jupyterlab-ws-chat/LICENSE

This file was deleted.

106 changes: 0 additions & 106 deletions python/jupyterlab-ws-chat/README.md

This file was deleted.

Loading

0 comments on commit 6dd839e

Please sign in to comment.