CWL to WebGL
cwl2webgl is a Transpiler-Mate plugin that turns a loaded CWL workflow into an
interactive, offline HTML explorer. Browse workflow dependencies, open nested
workflows, and inspect ports and step bindings without running the workflow.
Install and run
Requires Python 3.10 or newer. From a checkout of this repository:
python -m pip install . transpiler-mate-runtime
transpiler-mate cwl2webgl 'docs/examples/hello.cwl#main' --output workflow.html
Open workflow.html directly in a browser. Use --overwrite to replace an
existing file. Omit the source fragment (#main) to include all workflows in
the loaded document in the workflow selector.
The runtime loads CWL and validates its metadata before invoking the plugin.
The included hello workflow supplies that metadata.
The viewer title comes from context.metadata.name; the plugin options are
output and overwrite.
Explore a workflow
- Drag nodes to rearrange them, drag the background to pan, and scroll to zoom. Fit graph recenters the view; Reset layout restores automatic placement.
- Search by label or CWL identifier, or select nodes using the keyboard-accessible list.
- Trace upstream, downstream, or both directions from a selected node.
- Open a subworkflow in its own view and return with Parent.
- Inspect contracts, defaults, formats, secondary files, requirements, bindings, scatter, conditions, expressions, and individual port connections.
CSS, JavaScript, and workflow data are embedded in one HTML file. Viewing it requires no server, CDN, Java, or Node.js. The HTML inspector remains usable when WebGL is unavailable. Layout changes survive navigation within the open page, but are lost on reload.
The viewer shows static CWL structure. It does not execute expressions, expand scatter invocations, or show runtime data lineage. Connections are straight and may cross cards. The layout and interaction are intended for small to medium workflows. The HTML embeds workflow details, so share it as you would the source.
Python integration
from pathlib import Path
from cwl2webgl.plugin import CWL2WebGLOptions, cwl2webgl
# context is a TranspilerContext prepared by your host.
cwl2webgl.execute(context, CWL2WebGLOptions(output=Path("workflow.html")))
The host provides the loaded cwl-utils DOM, metadata, selected process ID, and resolver. The plugin reads those objects without modifying the DOM. The CLI runtime is optional for hosts that already supply a context.
Documentation
Start with the first workflow tutorial, then see CLI usage, the API reference, and architecture.
The published documentation is at Transpiler-Mate.github.io/cwl2webgl.
Development
With Hatch and Task installed, run:
hatch run dev:typecheck
hatch run dev:lint
hatch run dev:check
hatch run dev:security
hatch run test:test
hatch build
The test matrix covers Python 3.10–3.14. Python tests exercise real cwl-utils DOMs for CWL 1.0, 1.1, and 1.2; loader and runtime integration tests are optional. Install and run the pre-commit hooks with:
task quality:pre-commit:install
task quality:pre-commit:run
The Pattern 12 regression uses the original CWL and pinned imported schemas in
tests/fixtures, without network access during the test. Generate its viewer:
hatch run dev:python tests/test_pattern12.py
This writes examples/pattern-12.html. The harness supplies a display name via
test metadata; it does not demonstrate the runtime's full metadata validation.
For the matching browser drag regression, install Playwright and Chromium:
npm install --no-save playwright
npx playwright install chromium
node tests/drag-browser.cjs examples/pattern-12.html
tests/browser.cjs expects the older Atlas fixture, which is not included in
this checkout; it is not a generic smoke test for arbitrary generated HTML.
See installation and documentation development for
local documentation build commands.
License
Metadata
Release files for cwl2webgl 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cwl2webgl-0.1.0.tar.gz | 36.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cwl2webgl-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.5 kB
Release files / cwl2webgl-0.1.0.tar.gz
| Download URL | cwl2webgl-0.1.0.tar.gz |
|---|---|
| Size | 36.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d70d2286083569a5100fac9d3e692e808e72a4b30522b91a93c59cf90ee50308
|
|
BLAKE2b-256 checksum How to use checksums |
3da36cca692fa526806f1f387d382fd69d1971f76acc0eefe748016bf0e41426
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logRelease files / cwl2webgl-0.1.0-py3-none-any.whl
| Download URL | cwl2webgl-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
668664d99c8ca50168e30bfb86383cc439ac5bb7820a5c23eb0ed0ff67d2a9a4
|
|
BLAKE2b-256 checksum How to use checksums |
b5fa4a708ad3373a7ef07a56fc0d5f44d3fccd845fe128d67ae07f446f1134dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency log