Skip to main content

VRE JupyterLab Extension with VRE DSL highlighting and notebook execution guard

Project description

VRE JupyterLab Extension

Extension PR CI

@virtmat/vre-jupyterlab-extension is a frontend-only JupyterLab 4 extension providing:

  • CodeMirror 6 syntax highlighting for VRE DSL notebooks and .vm files
  • 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-language with vre-middleware

Settings

This extension provides JupyterLab plugin settings via schema/plugin.json:

  • enabled (default true): enables MIME synchronization and execution guard behavior.
  • cellReadonlyDesignEnabled (default true): controls executed-cell readonly lock and visual treatment.

Commands

Open the Command Palette and run:

  • VRE: Toggle Cell Readonly Design
  • VRE: 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 ci
  • npm run build
  • python -m pip install --upgrade build
  • python -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.Z or vX.Y.Z) or run manually.
  • Required secrets:
    • PYPI_API_TOKEN for publishing to PyPI.
    • THE_GITHUB_PACKAGES_TOKEN for 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 in requirements.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.tap
  • ci-summary.json
  • ci-summary.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vre_jupyterlab_extension-0.1.1.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vre_jupyterlab_extension-0.1.1-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file vre_jupyterlab_extension-0.1.1.tar.gz.

File metadata

  • Download URL: vre_jupyterlab_extension-0.1.1.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

Hashes for vre_jupyterlab_extension-0.1.1.tar.gz
Algorithm Hash digest
SHA256 62d7f2f1dfdcfe30e379574824f42face12993a0e1ce9c4893e4c540054cf290
MD5 15a07fb16be3291fedb3c1b3d5f30f03
BLAKE2b-256 505f180fd2531bc2d938916a37deca2ecedbdea5b56077d244179386fd1771ce

See more details on using hashes here.

File details

Details for the file vre_jupyterlab_extension-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for vre_jupyterlab_extension-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 576bc1652b3aa6eb7e8d78bfb2e2d4c766614ef0f578333eb66cc87cd5487c71
MD5 c5b14effb4e9499b7a5b350275d69fa3
BLAKE2b-256 30cca1300456cadaccd6189a5f9cca78f11d46fdf1e0b17df7fb3112c0718b18

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page