Reintegrate as a coral-compatible backend for the DealiiX platform#13
Merged
Conversation
- 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
pogmat
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: coralon the platform side). This delivers thecoral-python half of the local MVP; the platform-side changes are in 2listic/dealiiX-platform#209.
phiflow-obstacle-fe-coral-py-low.mp4
Summary
pyproject.toml+uv.lock); docs updated touv sync/uv run/uv add.main.py— a global-p/--pluginoption (comma-separated modules; empty = all)plus
register/runsubcommands, matching the C++ coral surface. A self-locatingcoral-pylauncher runs itinside the uv project while preserving the caller's working directory.
generate_registrynow emits the platform-native registry — keyed by nodetype, with primitivescarrying an empty
argumentslist.method_nameandis_validare dropped (parity with C++ coral, which emitsneither — the editor sets
is_validitself and identifies nodes bytype).typeas the sole node identifier and infers the kind(primitive/function/constructor/method) from the definition maps (
_classify), so it runs the platform's leangraphs (no
node_type/method_nameper node).outdated
invalid_workflowsfixtures. 88 tests pass.docs/ONBOARDING.md(+ Italiandocs/ONBOARDING.it.md) — an onboarding/architecture guide forcolleagues, written for two personas (add a CFD/scientific library / improve internals & the platform
contract). Includes an honest assessment of why
inspect.signatureis used (with the alternatives), and howthe executor orders execution and classifies lean nodes (
_classify). Referenced fromREADME.md/CLAUDE.md.phi_flow/one_obstacle.pyexample (dropped in the examples reorg) and correct itsrun path in
README.md; refresh the stale module-registration docs (_MODULES) indefinitions/README.mdand
CLAUDE.md.ffmpegas a prerequisite (README.mdInstallation section +phi_flow/README.md) — required onPATHfor.mp4export from the PhiFlow scripts and the
phiflow_plot_and_saveworkflow node (matplotlib'sanim.save(..., writer='ffmpeg')).Verified
coral-py -p "math,string,phiflow" registerwrites anode_types.jsonthe platform accepts (Save & Syncpopulates the sidebar with no skipped nodes).
coral-py -p math run <lean graph>executes a platform-style lean graph end-to-end.tests/fixtures/valid_workflows/(including the phiflow ones) via Execute (local) — they run throughcoral-python and produce output.
Test plan
uv syncthenuv run pytest— all green.uv run python main.py -p "math" registerproduces a type-keyednode_types.json.uv run python main.py -p "math" run tests/fixtures/valid_workflows/network-from-fe-math.jsonruns and prints results.Deferred (future work, not in this PR)
Remote/Slurm execution, pipeline stages, per-node
--touch-dirstatus, and promoting coral-python to a gitsubmodule when containerizing. Track these separately once #12 is closed.