Skip to content
Edit this page

Development

The application is static. Development and deployment require no Python API, Docker engine, reverse proxy or certificate manager. GitHub Pages serves the browser application at the repository root and this documentation under docs/.

Repository layout

  • frontend/ contains the Vue dashboard, browser services, workers and vendored WASM runtimes.
  • python/ contains the standard-library-only portable report helper and its tests.
  • tools/ contains development-only schema, glossary and release-note generators.
  • glossary/ is the source of UI names and explanations.
  • frontend/public/data/ contains checksum-verified public model assets and catalogs.
  • parser-source.json and browser-source.json pin all shared Rust and native browser sources.

Static application

Use Node 26 LTS, then:

cd frontend
npm ci
npm run dev

Open http://localhost:3456. This serves the complete application. A production build is equally static:

npm run build
npm run preview

Relative assets and runtime documentation links support both GitHub Pages project paths and custom-domain roots with the same build. Hash routes need no server rewrites. GitHub Pages metadata supplies the canonical documentation URL. See the domain cutover guide. TypeScript stays at version 6 until Vue tooling supports version 7. Dependency lifecycle scripts are disabled.

Python package

Use Python 3.12 or newer and uv. The runtime package has no dependencies; Pydantic, test tools and documentation tools are development dependencies only.

uv sync --project python --locked
cd frontend
npm run build:package
cd ..
uv run --project python python -m pytest -q python/tests tests
uv sync --project python --locked --group build
uv build --project python --python python/.venv/bin/python --no-build-isolation --out-dir dist

build:package creates the self-contained HTML template, including browser workers, WASM, styles and fonts. The wheel is universal (py3-none-any). Building it needs no native Python extension or SBML library.

Frontend

cd frontend
npm run typecheck
npm run lint
npm run test:unit -- --maxWorkers=4
npm run test:e2e -- --workers=4

Browser tests build and serve the static application themselves. They reject application API requests. UI fixture tests replace worker results; source, validation, export and portable-file integration tests use the actual WASM. The complete examples walk is tagged @slow and runs separately.

Generated schemas and TypeScript contracts are checked with:

uv run --project python python -m tools.schema
cd frontend && npm run types

Never edit generated schema, type, glossary or vendored runtime files by hand. Update the source and run its generator.

The production build enforces 500 kB JavaScript chunks, keeps glossary details in a separately emitted JSON asset, and permits Markdown rendering only through the help dialog's async component. Standalone HTML has a 3 MB budget for its single application module. Browser tests verify that header help neither widens tables nor intercepts sort arrows. Glossary generation lives in tools/glossary/; run python -m tools.glossary --check to verify its outputs.

Public model catalog

Register a public *-model repository in frontend/public/data/repositories.json, with its category and display metadata. The static deployment workflow checks its latest stable GitHub release, mirrors the OMEX assets, derives package filters through the WASM reader and records source URLs, licenses and SHA256 checksums. It refreshes daily and on default-branch builds. Tags use the committed snapshot. No GitHub API credential or release downloader is shipped to the browser.

python -m tools.refresh_catalog          # verify existing assets offline
python -m tools.refresh_catalog --update # refresh stable public releases

The update stages all downloads and checks model redistribution licenses before promotion. A failed update leaves the deployed site unchanged. Public Physiome originals remain pinned to their reviewed sbml2cellml collection revision.

Browser runtimes

Normal app builds use committed, verified WASM assets and need no Rust or C++ toolchain. Rebuilding those assets uses the exact reviewed source revisions:

python3 scripts/build_parser.py --wasm
python3 scripts/build_parser.py --check --verify-build
python3 scripts/build_browser.py
python3 scripts/build_browser.py --check --verify-build
node scripts/export_validation_rules.mjs --check

The pure report SDK has no host imports. Validation reuses the shared Rust/libSBML session in a separate Emscripten worker. Complete-model Antimony conversion uses another isolated worker and only the admitted comp source bundle. Native C++ libraries use WebAssembly exception handling consistently. Builds use two compiler jobs and normalize paths for reproducible artifacts.

Dependency security

The required security check audits locked npm, Python development and Rust dependencies plus exact native Git revisions. Browser runtimes are rebuilt and checked against their recorded hashes. Weekly audits run without source changes. The security policy describes the checks. There are no runtime container images or application-managed certificates to update.

Documentation

uv run --project python python -m tools.glossary
uv run --project python python -m tools.glossary --check
uv run --project python python -m tools.releasenotes --check
uv run --project python python -m tools.site

The glossary owns names, explanations and references. Validation rule text comes from the pinned browser libSBML table through scripts/export_validation_rules.mjs. It is never written manually.

Simulation demo

To regenerate the repressilator demo, install the frontend dependencies with Node 26 and npm ci, start the static application, and make ffmpeg available on PATH. From the repository root, run:

SIMULATION_DEMO_BASE_URL=http://localhost:3456 npm --prefix frontend run demo:record

The recorder uses real browser interactions and solver output: the default preview, a 200-minute interval, a PX initial amount of 10, protein traces and network playback. It writes the documentation GIF to docs/images/ and the MP4, poster, captions and recording metadata to frontend/public/media/. The GIF runs once for 4.8 seconds; the landing video has manual controls and does not preload. Review the generated frames before committing them.

Branches and pull requests

Changes land on develop through a pull request. Required checks are test, schema, frontend, e2e, ruff, ty, docs security and browser runtime. The browser runtime job verifies source and artifact parity. main tracks the latest released tag and is fast-forwarded only by the release workflow.

Releases

Write release-notes/<version>.md, then run the version tool from python/:

uv run bump-my-version bump minor

The tool updates the Python version, frontend manifest and lock, and generated release notes. Do not edit versions or generated changelogs manually. Merge the version change through a pull request, then tag the merged develop commit with its unprefixed version. Only repository administrators can create tags. The release gate requires matching package versions, reviewed release notes and ancestry in protected develop. The PyPI environment accepts release tags only. The tag workflow reruns checks, creates the GitHub release, builds the universal Python package and publishes it through the existing PyPI trusted publisher. Deployments publish static files to GitHub Pages; there is no server rollout script.