VRE JupyterLab Extension with VRE DSL highlighting and notebook execution guard
Project description
VRE JupyterLab Extension
@virtmat/vre-jupyterlab-extension is a frontend-only JupyterLab 4 extension providing:
- CodeMirror 6 syntax highlighting for VRE DSL notebooks and
.vmfiles - execution guard for declarative workflows (executed-cell visuals + re-execution blocking)
Runtime Assumptions
- Linux-only development workflow
- Jupyter commands are executed through
./vre/bin/python -m jupyter - Intended kernel integration target:
vre-languagewithvre-middleware
Settings
This extension provides JupyterLab plugin settings via schema/plugin.json:
enabled(defaulttrue): enables MIME synchronization and execution guard behavior.cellReadonlyDesignEnabled(defaulttrue): controls executed-cell readonly lock and visual treatment.
Commands
Open the Command Palette and run:
VRE: Toggle Cell Readonly DesignVRE: Toggle Extension
All toggles apply immediately and persist through refresh/restart via JupyterLab settings.
Development
- Install workspace dependencies:
npm install - Build package and bundled labextension assets:
npm run -w @virtmat/vre-jupyterlab-extension build - Run tests:
npm run -w @virtmat/vre-jupyterlab-extension test
Python Packaging And Installation
This extension is packaged as a prebuilt JupyterLab extension so end users can install it directly from PyPI with pip install vre-jupyterlab-extension and use it immediately, without any Node or JupyterLab extension setup.
Build local wheel/sdist
From the package root (packages/vre-jupyterlab-extension):
npm cinpm run buildpython -m pip install --upgrade buildpython -m build --wheel --sdist
Install via pip
Add to requirements.txt
Once published, add one of these lines in requirements.txt for vre-language or vre-middleware.
-- pip install vre-jupyterlab-extension==0.1.1
-- PyPI release: vre-jupyterlab-extension==0.1.1
-- GitHub tag build: vre-jupyterlab-extension @ git+https://github.com/<org>/<repo>.git@vre-jupyterlab-extension-v0.1.1#subdirectory=packages/vre-jupyterlab-extension
-- GitLab tag build: vre-jupyterlab-extension @ git+https://gitlab.com/<group>/<repo>.git@vre-jupyterlab-extension-v0.1.1#subdirectory=packages/vre-jupyterlab-extension
Install dependencies as usual and the extension package is pulled in automatically.
Release Automation
GitHub
- Workflow file:
.github/workflows/extension-publish.yml - Trigger: push a tag (
vre-jupyterlab-extension-vX.Y.ZorvX.Y.Z) or run manually. - Required secrets:
PYPI_API_TOKENfor publishing to PyPI.THE_GITHUB_PACKAGES_TOKENfor publishing to GitHub Packages.
GitLab
- CI file:
.gitlab-ci.yml - Trigger: tag pipeline.
- Publishes to GitLab Package Registry using
CI_JOB_TOKEN.
Versioning And Updates
- Keep Python package version (
setup.cfg) and npm package version (package.json) aligned. - For downstream repos (
vre-language,vre-middleware), pin exact versions inrequirements.txt. - To automate dependency bumps in downstream repos, enable Dependabot or Renovate for
requirements.txt.
Note: JupyterLab does not auto-upgrade Python packages by itself. Upgrades are applied when your environment runs pip install -U ... or recreates the environment from updated lock/requirements files.
CI Commands
- PR pipeline entrypoint:
npm run -w @virtmat/vre-jupyterlab-extension ci - Unit tests (TAP output):
npm run -w @virtmat/vre-jupyterlab-extension ci:test:unit - Smoke integration tests (PR):
npm run -w @virtmat/vre-jupyterlab-extension ci:test:integration:smoke - Full integration suite (nightly):
npm run -w @virtmat/vre-jupyterlab-extension ci:test:integration:full - Build PR summary artifacts:
npm run -w @virtmat/vre-jupyterlab-extension ci:summary
CI summary artifacts are written to packages/vre-jupyterlab-extension/tests/:
test-results.tapci-summary.jsonci-summary.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vre_jupyterlab_extension-0.1.2.tar.gz.
File metadata
- Download URL: vre_jupyterlab_extension-0.1.2.tar.gz
- Upload date:
- Size: 20.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1805f709d962817d6503a9323c325b55d898d3adab85a4f2b179a8cacb55f6fa
|
|
| MD5 |
26ca85c96a030d0da48efe73a94cbce1
|
|
| BLAKE2b-256 |
01f7b89c5c238adac512e87ed6f73de86a735ca60729734312a604abbb88336e
|
File details
Details for the file vre_jupyterlab_extension-0.1.2-py3-none-any.whl.
File metadata
- Download URL: vre_jupyterlab_extension-0.1.2-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4312a6f50d0d76b80a32a57275b58507b48482eeb3fd8625175a3c23bf37c42d
|
|
| MD5 |
fee773c68f67f20f3a1e3fc42d760a64
|
|
| BLAKE2b-256 |
7c80e0d4be43473b05f8fb72341ab56d454b5f156b3ff5ee743b8c527d35daa8
|