# VRE JupyterLab Extension
[](https://github.com/virtmat-tools/vre-jupyterlab-extension/actions/workflows/extension-pr-ci.yml)
[](https://pypi.org/project/vre-jupyterlab-extension)
[](https://pepy.tech/projects/vre-jupyterlab-extension)
[](https://jupyterlab.readthedocs.io/en/stable/)
[](https://virtmat-tools.github.io/vre-jupyterlab-extension/)
[](LICENSE)
A prebuilt JupyterLab 4 extension that provides advanced CodeMirror 6 highlighting for the VRE DSL and a smart execution guard to protect your VRE kernels.
The VRE JupyterLab Extension is a prebuilt integration designed to support the Virtual Research Environment (VRE) directly within JupyterLab 4. It provides domain-specific syntax highlighting and an intelligent execution guard to ensure experimental provenance is maintained.
Because the frontend assets are prebuilt and bundled directly into the Python wheel, you do not need Node.js or any frontend build tools to use this extension.
You can install it directly from PyPI:
pip install vre-jupyterlab-extension
jupyter lab
To add on the extension, install the local dependencies, compile the frontend, and pack the wheel:
# 1. Setup the project
cd packages/vre-jupyterlab-extension
npm ci
# 2. Build the frontend bundle
npm run build:prod
# 3. Build the Python distribution packages (.whl, .tar.gz)
python3 -m pip install --upgrade build
python3 -m build --wheel --sdist
# 4. Install your local wheel
pip install dist/vre_jupyterlab_extension-*.whl
text/x-vre MIME type for seamless integration with the language server.For a comprehensive technical breakdown of how the extension manages CodeMirror Lexers, the execution guard, and the build pipeline, please refer to our official documentation:
If you would like to run the documentation server locally, you can do so by running mkdocs serve from the repository root after installing the requirements.
If you are looking to contribute or build the project from source, you will need Node.js and a Python virtual environment.
# 1. Install Node.js dependencies
cd packages/vre-jupyterlab-extension
npm ci
# 2. Build the production frontend bundle
npm run build:prod
# 3. Build the Python distribution packages
python3 -m pip install --upgrade build
python3 -m build --wheel --sdist
# 4. Install your local build
pip install dist/vre_jupyterlab_extension-*.whl
For testing during active development, we recommend using the symlink approach:
pip install -e .
jupyter labextension develop . --overwrite
We use an automated Python script to manage versioning and clean up build artifacts. When you are ready to publish a new release, simply run:
cd packages/vre-jupyterlab-extension
npm run release
Tip: Always use this tool rather than building manually for releases to ensure package.json, setup.cfg, and __init__.py versions stay perfectly synchronized.
Local documentation development: run mkdocs serve from this directory after installing requirements_docs.txt.
jupyterlab>=4.2,<5)This project is licensed under the BSD-3-Clause License. See the LICENSE file for more details.