Skip to content

Reintegrate as a coral-compatible backend for the DealiiX platform#13

Merged
pogmat merged 8 commits into
mainfrom
feat/dealiix-platform-integration
Jul 13, 2026
Merged

Reintegrate as a coral-compatible backend for the DealiiX platform#13
pogmat merged 8 commits into
mainfrom
feat/dealiix-platform-integration

Conversation

@pcolt

@pcolt pcolt commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Closes #12

Overview

Reintegrates coral-python as a coral-compatible backend, so the DealiiX platform can drive it by only
changing the executable/plugin paths (it stays backendKind: coral on the platform side). This delivers the
coral-python half of the local MVP; the platform-side changes are in 2listic/dealiiX-platform#209.

phiflow-obstacle-fe-coral-py-low.mp4

Summary

  • chore: adopt a uv project layout (pyproject.toml + uv.lock); docs updated to uv sync / uv run / uv add.
  • feat: coral-compatible CLI in main.py — a global -p/--plugin option (comma-separated modules; empty = all)
    plus register / run subcommands, matching the C++ coral surface. A self-locating coral-py launcher runs it
    inside the uv project while preserving the caller's working directory.
  • feat: generate_registry now emits the platform-native registry — keyed by node type, with primitives
    carrying an empty arguments list. method_name and is_valid are dropped (parity with C++ coral, which emits
    neither — the editor sets is_valid itself and identifies nodes by type).
  • feat: the executor treats type as the sole node identifier and infers the kind
    (primitive/function/constructor/method) from the definition maps (_classify), so it runs the platform's lean
    graphs (no node_type/method_name per node).
  • test: all workflow fixtures normalized to the lean shape; registry/executor tests updated; removed the unused,
    outdated invalid_workflows fixtures. 88 tests pass.
  • docs: add docs/ONBOARDING.md (+ Italian docs/ONBOARDING.it.md) — an onboarding/architecture guide for
    colleagues, written for two personas (add a CFD/scientific library / improve internals & the platform
    contract). Includes an honest assessment of why inspect.signature is used (with the alternatives), and how
    the executor orders execution and classifies lean nodes (_classify). Referenced from README.md / CLAUDE.md.
  • fix: restore the standalone phi_flow/one_obstacle.py example (dropped in the examples reorg) and correct its
    run path in README.md; refresh the stale module-registration docs (_MODULES) in definitions/README.md
    and CLAUDE.md.
  • docs: document ffmpeg as a prerequisite (README.md Installation section + phi_flow/README.md) — required on PATH for .mp4
    export from the PhiFlow scripts and the phiflow_plot_and_save workflow node (matplotlib's
    anim.save(..., writer='ffmpeg')).

Verified

  • coral-py -p "math,string,phiflow" register writes a node_types.json the platform accepts (Save & Sync
    populates the sidebar with no skipped nodes).
  • coral-py -p math run <lean graph> executes a platform-style lean graph end-to-end.
  • In-app: built graphs and, from the platform, loaded and ran every graph in
    tests/fixtures/valid_workflows/
    (including the phiflow ones) via Execute (local) — they run through
    coral-python and produce output.

Test plan

  • uv sync then uv run pytest — all green.
  • uv run python main.py -p "math" register produces a type-keyed node_types.json.
  • uv run python main.py -p "math" run tests/fixtures/valid_workflows/network-from-fe-math.json runs and prints results.

Deferred (future work, not in this PR)

Remote/Slurm execution, pipeline stages, per-node --touch-dir status, and promoting coral-python to a git
submodule when containerizing. Track these separately once #12 is closed.

pcolt added 8 commits July 7, 2026 13:40
- chore: add pyproject.toml (phiflow/jax/h5py deps, pytest/pytest-cov dev group, package=false for the flat-script layout) and uv.lock
- docs: switch README and CLAUDE setup/dependency instructions to the uv-project workflow (uv sync / uv run / uv add)
- feat: refactor main.py into a coral-style subcommand CLI (-p/--plugin, register, run)
- feat: add self-locating coral-py launcher for the DealiiX platform
- refactor: centralize module registry as AVAILABLE_MODULES in definitions/__init__.py
- test: ignore new phiml "Rank deficiency" warning from the dependency bump
- docs: update README/CLAUDE/test-fixture docs to the subcommand syntax
- feat: key generate_registry output by node `type` (drop int-id keying); functions get a `type`, every entry gets is_valid: true; primitives include an empty arguments list and default value ""
- test: add TestPlatformRegistryFormat (keyed-by-type, function types, is_valid, platform-required keys)
- chore: regenerate valid_nodes registry fixtures in the new format
- docs: update fixtures README and CLAUDE registry description
…tocol

- feat: executor infers node kind from `type` via the definition maps (_classify) and dispatches by `type`
- refactor: registry no longer emits `method_name`; `type` is the sole node identifier (parity with C++ coral)
- test: leanify all graph fixtures (type-only) + inline test graphs; switch registry tests to `type`
- chore: remove unused, outdated invalid_workflows fixtures (array-structured, unreferenced)
- docs: update CLAUDE.md and tests/README.md to the lean/type-based model
- refactor: stop emitting is_valid; the editor sets it on render, and C++ coral (defaultNodes.json) emits none
- fix: restore phi_flow/one_obstacle.py (dropped in the examples reorg); rename its saved outputs to one_obstacle.{gif,mp4}
- docs: correct the standalone-simulation run path to python phi_flow/one_obstacle.py in README.md
- docs: replace the stale modules-dict recipe with the actual _MODULES registration in definitions/README.md and CLAUDE.md
…/CLAUDE

- docs: add docs/ONBOARDING.md and docs/ONBOARDING.it.md — an onboarding/architecture guide for two personas (add a library / improve internals), with an honest assessment of inspect.signature and of the executor's execution order and _classify
- docs: add a Development section in README.md and a pointer in CLAUDE.md linking to the onboarding guide
@pcolt
pcolt requested a review from pogmat July 10, 2026 14:35
@pogmat
pogmat merged commit d23433b into main Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reintegrate coral-python as a coral-compatible backend for the DealiiX platform

2 participants