Jupyterlab chat#
The jupyterlab-chat extension adds chats to jupyterlab based on collaborative documents.
Development installation#
Installing this extension in development mode requires an environment with python and nodejs.
# In the following commands, 'mamba' can be replaced with 'conda'
mamba create -n jupyter-chat python nodejs
mamba activate jupyter-chat
The following commands install the extension in development mode:
# Install the extension
python ./scripts/dev_install.py
To uninstall it, run:
pip uninstall jupyterlab-chat
Building the assets#
Changes in typescript sources of @jupyter/chat, jupyterlab-chat or
jupyterlab-chat-extension must be built again to be available in jupyterlab.
jlpm build
Testing locally the extension#
jupyterlab-chat package has unit tests and integration tests.
Unit tests#
There are a few unit tests in python/jupyterlab-chat/src/\_\_tests\_\_.
They make use of jest.
The following commands run them:
cd ./python/jupyterlab-chat
jlpm test
Integration tests#
The integration tests are located in ui-tests.
They make use of playwright.
The following commands run them:
cd ./ui-tests
# Install the tests dependencies
jlpm install
# Install the tests browser
jlpm playwright install
# Run the tests
jlpm test