Contributing#
Install#
The jlpm command is JupyterLab’s pinned version of yarn that
is installed with JupyterLab.
You may use
yarnornpmin lieu ofjlpmbelow, but internally some subcommands will use still usejlpm.
# Clone the project repository
git clone https://github.com/jupyterlab-contrib/jupyter-videochat
# Move to jupyter-videochat directory
cd jupyter-videochat
# Install JS dependencies
jlpm
# Build TypesSript source and Lab Extension
jlpm build
# Install server extension
pip install -e .
# Register server extension
jupyter server extension enable --py jupyter_videochat
jupyter serverextension enable --py jupyter_videochat
# Symlink your development version of the extension with JupyterLab
jupyter labextension develop --overwrite .
# Rebuild Typescript source after making changes
jlpm build
Live Development#
You can watch the src directory for changes and automatically rebuild the JS files and
webpacked extension.
# Watch the source directory in another terminal tab
jlpm watch
# ... or, as they are both pretty noisy, run two terminals with
# jlpm watch:lib
# jlpm watch:ext
# Run jupyterlab in watch mode in one terminal tab
jupyter lab
# ... or, to also watch server extension source files
# jupyter lab --autoreload
Extending#
Jitsi Meet API#
Other JupyterLab extensions can use the IVideoChatManager to interact with the
Jitsi Meet API
instance, which has many commands, functions and events. Nobody has yet, that we
know of: if you are successful, please consider posting an issue/screenshot on the
GitHub repository!
Add
jupyterlab-videochatas apackage.jsondependency# in the folder with your package.json jlpm add jupyterlab-videochatInclude
IVideoChatManagerin your plugins’sactivatefunction// plugin.ts import { IVideoChatManager } from 'jupyterlab-videochat'; const plugin: JupyterFrontEndPlugin<IVideoChatManager> = { id: `my-labextension:plugin`, autoStart: true, requires: [IVideoChatManager], activate: (app: JupyterLabFrontEnd, videochat: IVideoChatManager) => { videochat.meetChanged.connect(() => { if (videochat.meet) { // do something clever with the Meet! } }); }, }; export default plugin;
The typings provided for the Jitsit API are best-effort, PRs welcome to improve them.
(Probably) add
jupyter-videochatto your extension’s python dependencies, e.g.# setup.py setup( install_requires=["jupyter-videochat"] )
Room Provider#
Other JupyterLab extensions may add additional sources of Rooms by registering a
provider. See the core implementations of server and public rooms for examples of how
to use the IVideoChatManager.registerRoomProvider API.
Providers are able to:
fetch configuration information to set up a connection to a Jitsi server
create new Rooms that other users can join.
find additional Rooms
If providing new rooms, it is important to have a scheme for generating room names that are:
unique
hard-to-guess
While passwords, lobbies, and end-to-end encryption are also available to moderators, the room name is the first line of defense in avoiding unexpected visitors during a Jitsi meeting.
Releasing#
Start a release issue with a checklist of tasks
see previous releases for examples
Ensure the version has been updated, roughly following semver
Basically, any removal or data constraint would trigger a
0.x+1.0Otherwise it’s probably
0.x.y+1
Ensure the
CHANGELOG.mdandREADME.mdare up-to-dateWait until CI passes on
masterValidate on Binder
Download the release assets from the latest CI run
From the GitHub web UI, create a new tag/release
name the tag
v0.x.yupload all of the release assets (including
SHA256SUMS!)
Upload to pypi.org
twine upload jupyter-videochat*
Upload to
npmjs.comnpm login npm publish jupyterlab-videochat* npm logoutMake a new PR bumping to the next point release
just in case a quick fix is needed
Validate the as-released assets in a clean environment
e.g. on Binder with a simple
requirements.txtgist
jupyter-videochat ==0.x.y
Wait for the conda-forge feedstock to get an automated PR
validate and merge
Close the release issue!