flowgraph 0.1.2__tar.gz → 0.1.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. {flowgraph-0.1.2/src/flowgraph.egg-info → flowgraph-0.1.6}/PKG-INFO +43 -4
  2. {flowgraph-0.1.2 → flowgraph-0.1.6}/README.md +36 -3
  3. {flowgraph-0.1.2 → flowgraph-0.1.6}/pyproject.toml +21 -1
  4. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/__init__.py +14 -6
  5. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/controls.py +13 -2
  6. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/cosapp.py +12 -3
  7. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/data_types.py +10 -3
  8. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/documentation.py +4 -2
  9. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/field_ops.py +5 -1
  10. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/file_conversion.py +6 -2
  11. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/files.py +71 -60
  12. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/filters.py +11 -2
  13. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/image_tools.py +267 -8
  14. flowgraph-0.1.6/src/flowgraph/adapters/imagej.py +232 -0
  15. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/mesh_creation_tools.py +67 -13
  16. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/mesh_generations.py +5 -1
  17. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/mesh_ops.py +112 -6
  18. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/paraview.py +4 -1
  19. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/plaid_bridge.py +17 -4
  20. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/readers.py +85 -4
  21. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/remote_files.py +7 -1
  22. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/simple_sources.py +141 -8
  23. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/sinks.py +35 -4
  24. flowgraph-0.1.6/src/flowgraph/adapters/table_tools.py +128 -0
  25. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/user_code.py +17 -2
  26. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/workflow.py +19 -6
  27. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/workflow_interfaces.py +11 -2
  28. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/adapters/writers.py +89 -4
  29. flowgraph-0.1.6/src/flowgraph/application/port_conversions.py +144 -0
  30. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/application/wasm_execution.py +88 -3
  31. flowgraph-0.1.6/src/flowgraph/application/workflow_cli.py +570 -0
  32. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/application/workflow_core.py +201 -8
  33. flowgraph-0.1.6/src/flowgraph/application/workflow_defaults.py +84 -0
  34. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/application/workflow_io.py +28 -3
  35. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/application/workflow_web_catalog.py +21 -4
  36. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/core_cli.py +28 -16
  37. flowgraph-0.1.6/src/flowgraph/domain/filepath.py +77 -0
  38. flowgraph-0.1.6/src/flowgraph/testdata/ColorCardboard.jpg +0 -0
  39. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/version.py +1 -1
  40. {flowgraph-0.1.2 → flowgraph-0.1.6/src/flowgraph.egg-info}/PKG-INFO +43 -4
  41. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph.egg-info/SOURCES.txt +12 -0
  42. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph.egg-info/requires.txt +7 -0
  43. flowgraph-0.1.6/tests/test_filepath.py +47 -0
  44. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_image_tools.py +112 -3
  45. flowgraph-0.1.6/tests/test_imagej.py +267 -0
  46. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_mesh_ops.py +56 -0
  47. flowgraph-0.1.6/tests/test_packaging.py +180 -0
  48. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_readers.py +71 -11
  49. flowgraph-0.1.6/tests/test_release.py +227 -0
  50. flowgraph-0.1.6/tests/test_simple_sources.py +107 -0
  51. flowgraph-0.1.6/tests/test_sinks.py +12 -0
  52. flowgraph-0.1.6/tests/test_table_tools.py +176 -0
  53. flowgraph-0.1.6/tests/test_user_code_mesh.py +18 -0
  54. flowgraph-0.1.6/tests/test_wasm_execution.py +310 -0
  55. flowgraph-0.1.6/tests/test_workflow_cli.py +976 -0
  56. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_workflow_core.py +304 -1
  57. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_workflow_io.py +82 -0
  58. flowgraph-0.1.6/tests/test_workflow_web_catalog.py +241 -0
  59. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_writers.py +56 -0
  60. flowgraph-0.1.2/src/flowgraph/application/port_conversions.py +0 -63
  61. flowgraph-0.1.2/src/flowgraph/application/workflow_cli.py +0 -417
  62. flowgraph-0.1.2/tests/test_packaging.py +0 -53
  63. flowgraph-0.1.2/tests/test_wasm_execution.py +0 -119
  64. flowgraph-0.1.2/tests/test_workflow_cli.py +0 -308
  65. flowgraph-0.1.2/tests/test_workflow_web_catalog.py +0 -50
  66. {flowgraph-0.1.2 → flowgraph-0.1.6}/LICENSE +0 -0
  67. {flowgraph-0.1.2 → flowgraph-0.1.6}/setup.cfg +0 -0
  68. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/__init__.py +0 -0
  69. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/__main__.py +0 -0
  70. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/application/__init__.py +0 -0
  71. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/application/node_registry.py +0 -0
  72. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/application/workflow_history.py +0 -0
  73. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/application/workflow_layout.py +0 -0
  74. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/application/workflows.py +0 -0
  75. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/domain/__init__.py +0 -0
  76. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/domain/mesh_document.py +0 -0
  77. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/examples/AllFilters.py +0 -0
  78. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/examples/convert_format.py +0 -0
  79. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/resources.py +0 -0
  80. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/testdata/AllFilters.json +0 -0
  81. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/testdata/FlowGraph.h5 +0 -0
  82. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/testdata/FlowGraph.stl +0 -0
  83. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/testdata/FlowGraph.xdmf +0 -0
  84. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/testdata/SimpleReadMesh.json +0 -0
  85. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/testdata/SpherePoints.csv +0 -0
  86. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph/testdata/muscat-muscat-mesh-conversion.json +0 -0
  87. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph.egg-info/dependency_links.txt +0 -0
  88. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph.egg-info/entry_points.txt +0 -0
  89. {flowgraph-0.1.2 → flowgraph-0.1.6}/src/flowgraph.egg-info/top_level.txt +0 -0
  90. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_core_gui_boundary.py +0 -0
  91. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_cosapp.py +0 -0
  92. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_file_conversion.py +0 -0
  93. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_headless_boundary.py +0 -0
  94. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_mesh_creation_tools.py +0 -0
  95. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_muscat_vtk.py +0 -0
  96. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_plaid_bridge.py +0 -0
  97. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_remote_files.py +0 -0
  98. {flowgraph-0.1.2 → flowgraph-0.1.6}/tests/test_workflow_history.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flowgraph
3
- Version: 0.1.2
3
+ Version: 0.1.6
4
4
  Summary: Headless typed workflow engine and execution runtime
5
5
  Author: Felipe Bordeu
6
6
  Maintainer: Felipe Bordeu
@@ -31,10 +31,16 @@ Requires-Dist: scipy>=1.10
31
31
  Requires-Dist: pandas
32
32
  Requires-Dist: h5py
33
33
  Requires-Dist: pillow>=10.0
34
+ Requires-Dist: numpy>=1.24
35
+ Requires-Dist: openpyxl>=3.1.5
36
+ Provides-Extra: imagej
37
+ Requires-Dist: pyimagej; extra == "imagej"
38
+ Requires-Dist: scyjava; extra == "imagej"
34
39
  Provides-Extra: dev
35
40
  Requires-Dist: pytest>=8.0; extra == "dev"
36
41
  Requires-Dist: pytest-cov>=5.0; extra == "dev"
37
42
  Requires-Dist: ruff>=0.6; extra == "dev"
43
+ Requires-Dist: build; extra == "dev"
38
44
  Provides-Extra: ml
39
45
  Requires-Dist: pyplaid; extra == "ml"
40
46
  Provides-Extra: cosapp
@@ -72,11 +78,32 @@ The `flowgraph` command is headless and has no GUI runtime dependency:
72
78
 
73
79
  ```bash
74
80
  uv run flowgraph inspect workflow.json
81
+ uv run flowgraph inspect workflow.json --full
82
+ uv run flowgraph inspect workflow.json -i name=value --override node-id.parameter=value
75
83
  uv run flowgraph run workflow.json --input name=value
84
+ uv run flowgraph run workflow.json -i name=value
76
85
  uv run flowgraph run workflow.json --override node-id.parameter=value
77
86
  uv run flowgraph run workflow.json --json-output results.json
78
87
  ```
79
88
 
89
+ Use `--input` or its short form `-i` for each published workflow input; repeat
90
+ the option to provide multiple inputs.
91
+ `flowgraph inspect` displays the resolved default to the right of each published
92
+ input, or marks it as required or having conflicting saved values.
93
+ Inspection is compact by default; add `--full` (or `-f`) to include the workflow
94
+ graph. Arbitrary-code warnings remain visible in both modes.
95
+ Inspection accepts the same `--input` / `-i` and `--override` assignments as
96
+ execution: overrides update the displayed defaults, and explicit inputs take
97
+ precedence and are marked `(--input)`. It never executes nodes or saves changes.
98
+ When an input is omitted, `flowgraph run` uses its downstream node's saved
99
+ parameter value and prints a warning to stderr identifying the input, value,
100
+ and parameter. This also works for directly exported parameters and nested
101
+ workflow inputs. Explicit inputs take precedence; parameter overrides are applied
102
+ before resolving defaults. Inputs without usable saved values remain required,
103
+ and conflicting saved values require an explicit `--input`.
104
+ For examples and warning output, see
105
+ [Omitted inputs and saved parameter values](doc/user-guide/workflows.md#omitted-inputs-and-saved-parameter-values).
106
+
80
107
  Workflows use the versioned `flowgraph-workflow` JSON format. Core validation and
81
108
  execution are UI-independent.
82
109
 
@@ -91,9 +118,15 @@ uv build --out-dir dist/
91
118
  The resulting wheel is compatible with all supported Python platforms. See
92
119
  `packaging/README.md` for release details.
93
120
 
94
- The initial supported publication channels are GitHub source releases and
95
- PyPI. Conda, Docker, operating-system package managers, and third-party mirrors
96
- are not supported release channels at this time. See
121
+ The repository also includes a Conda recipe under `packaging/conda/`. FlowGraph
122
+ is distributed through the [`flowgraph` Anaconda channel](https://anaconda.org/channels/flowgraph):
123
+
124
+ ```bash
125
+ conda install -c flowgraph flowgraph
126
+ ```
127
+
128
+ Docker, operating-system package managers, and third-party mirrors are not
129
+ supported release channels at this time. See
97
130
  [`Release Channels`](docs/policies/release-channels.md) for the release policy.
98
131
 
99
132
  FlowGraph Core declares Python 3.11 or newer. CI covers Python 3.11 and 3.13 on
@@ -116,6 +149,12 @@ behavior.
116
149
 
117
150
  ## Documentation and support
118
151
 
152
+ - [FlowGraph documentation](https://flowgraph.readthedocs.io/en/latest/)
153
+ - [Built-in node catalog](doc/reference/adapters/index.md) and
154
+ [Python custom-node guide](doc/user-guide/custom-nodes.md).
155
+ - The website documentation lives in `doc/` (outside the Python package).
156
+ To build the Read the Docs site locally, run
157
+ `uv run --with zensical zensical build -f zensical.toml` from this repository.
119
158
  - [`Architecture`](docs/architecture.md) describes the core boundaries and workflow
120
159
  model.
121
160
  - [`Support Policy`](docs/policies/support-policy.md) describes supported environments and
@@ -26,11 +26,32 @@ The `flowgraph` command is headless and has no GUI runtime dependency:
26
26
 
27
27
  ```bash
28
28
  uv run flowgraph inspect workflow.json
29
+ uv run flowgraph inspect workflow.json --full
30
+ uv run flowgraph inspect workflow.json -i name=value --override node-id.parameter=value
29
31
  uv run flowgraph run workflow.json --input name=value
32
+ uv run flowgraph run workflow.json -i name=value
30
33
  uv run flowgraph run workflow.json --override node-id.parameter=value
31
34
  uv run flowgraph run workflow.json --json-output results.json
32
35
  ```
33
36
 
37
+ Use `--input` or its short form `-i` for each published workflow input; repeat
38
+ the option to provide multiple inputs.
39
+ `flowgraph inspect` displays the resolved default to the right of each published
40
+ input, or marks it as required or having conflicting saved values.
41
+ Inspection is compact by default; add `--full` (or `-f`) to include the workflow
42
+ graph. Arbitrary-code warnings remain visible in both modes.
43
+ Inspection accepts the same `--input` / `-i` and `--override` assignments as
44
+ execution: overrides update the displayed defaults, and explicit inputs take
45
+ precedence and are marked `(--input)`. It never executes nodes or saves changes.
46
+ When an input is omitted, `flowgraph run` uses its downstream node's saved
47
+ parameter value and prints a warning to stderr identifying the input, value,
48
+ and parameter. This also works for directly exported parameters and nested
49
+ workflow inputs. Explicit inputs take precedence; parameter overrides are applied
50
+ before resolving defaults. Inputs without usable saved values remain required,
51
+ and conflicting saved values require an explicit `--input`.
52
+ For examples and warning output, see
53
+ [Omitted inputs and saved parameter values](doc/user-guide/workflows.md#omitted-inputs-and-saved-parameter-values).
54
+
34
55
  Workflows use the versioned `flowgraph-workflow` JSON format. Core validation and
35
56
  execution are UI-independent.
36
57
 
@@ -45,9 +66,15 @@ uv build --out-dir dist/
45
66
  The resulting wheel is compatible with all supported Python platforms. See
46
67
  `packaging/README.md` for release details.
47
68
 
48
- The initial supported publication channels are GitHub source releases and
49
- PyPI. Conda, Docker, operating-system package managers, and third-party mirrors
50
- are not supported release channels at this time. See
69
+ The repository also includes a Conda recipe under `packaging/conda/`. FlowGraph
70
+ is distributed through the [`flowgraph` Anaconda channel](https://anaconda.org/channels/flowgraph):
71
+
72
+ ```bash
73
+ conda install -c flowgraph flowgraph
74
+ ```
75
+
76
+ Docker, operating-system package managers, and third-party mirrors are not
77
+ supported release channels at this time. See
51
78
  [`Release Channels`](docs/policies/release-channels.md) for the release policy.
52
79
 
53
80
  FlowGraph Core declares Python 3.11 or newer. CI covers Python 3.11 and 3.13 on
@@ -70,6 +97,12 @@ behavior.
70
97
 
71
98
  ## Documentation and support
72
99
 
100
+ - [FlowGraph documentation](https://flowgraph.readthedocs.io/en/latest/)
101
+ - [Built-in node catalog](doc/reference/adapters/index.md) and
102
+ [Python custom-node guide](doc/user-guide/custom-nodes.md).
103
+ - The website documentation lives in `doc/` (outside the Python package).
104
+ To build the Read the Docs site locally, run
105
+ `uv run --with zensical zensical build -f zensical.toml` from this repository.
73
106
  - [`Architecture`](docs/architecture.md) describes the core boundaries and workflow
74
107
  model.
75
108
  - [`Support Policy`](docs/policies/support-policy.md) describes supported environments and
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "flowgraph"
7
- version = "0.1.2"
7
+ version = "0.1.6"
8
8
  description = "Headless typed workflow engine and execution runtime"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -35,13 +35,20 @@ dependencies = [
35
35
  "pandas",
36
36
  "h5py",
37
37
  "pillow>=10.0",
38
+ "numpy>=1.24",
39
+ "openpyxl>=3.1.5",
38
40
  ]
39
41
 
40
42
  [project.optional-dependencies]
43
+ imagej = [
44
+ "pyimagej",
45
+ "scyjava",
46
+ ]
41
47
  dev = [
42
48
  "pytest>=8.0",
43
49
  "pytest-cov>=5.0",
44
50
  "ruff>=0.6",
51
+ "build",
45
52
  ]
46
53
  ml = [
47
54
  "pyplaid",
@@ -81,3 +88,16 @@ pythonpath = [".", "src"]
81
88
  target-version = "py311"
82
89
  line-length = 100
83
90
 
91
+ #[tool.uv.sources]
92
+ #muscat = { git = "https://gitlab.com/drti/muscat.git", rev = "ParMmg" }
93
+ ##micromamba install -n uv_muscat_build_packages scotch mmgsuite=*=h* kokkos=*=h*
94
+ ## uv pip install ipywidgets
95
+ ## uv pip install jupyterlab
96
+ ##export OMP_PROC_BIND=spread
97
+ ##export OMP_PLACES=threads
98
+ ##LD_LIBRARY_PATH=/home/fbw/.local/share/mamba/envs/uv_muscat_build_packages/lib/ uv run jupyter lab
99
+
100
+ #[tool.uv]
101
+ #config-settings-package = {muscat = {"cmake.args" = ["-DCMAKE_PREFIX_PATH=/home/fbw/.local/share/mamba/envs/uv_muscat_build_packages/lib/cmake/",
102
+ #"-DSCOTCH_ROOT=/home/fbw/.local/share/mamba/envs/uv_muscat_build_packages/"
103
+ #]}}
@@ -17,6 +17,7 @@ from flowgraph.adapters.filters import (
17
17
  FILTER_MESH_WITH_MUSCAT,
18
18
  )
19
19
  from flowgraph.adapters.image_tools import AVAILABLE_NODES as IMAGE_TOOLS_AVAILABLE_NODES
20
+ from flowgraph.adapters.imagej import AVAILABLE_NODES as IMAGEJ_AVAILABLE_NODES
20
21
  from flowgraph.adapters.mesh_creation_tools import AVAILABLE_NODES as MESH_CREATION_AVAILABLE_NODES
21
22
  from flowgraph.adapters.mesh_generations import CSV_TO_MESH
22
23
  from flowgraph.adapters.mesh_ops import AVAILABLE_NODES as MESH_OPS_AVAILABLE_NODES
@@ -26,24 +27,29 @@ from flowgraph.adapters.readers import (
26
27
  LOAD_MESHIO,
27
28
  LOAD_MESHLANE,
28
29
  LOAD_MUSCAT,
30
+ READ_TABLE,
29
31
  )
30
32
  from flowgraph.adapters.remote_files import DOWNLOAD_URL
31
33
  from flowgraph.adapters.simple_sources import (
34
+ SET_BOOLEAN,
32
35
  SET_FLOAT,
33
36
  SET_INT,
34
37
  SET_LIST_FLOAT,
35
38
  SET_LIST_INT,
36
39
  SET_LIST_STR,
37
40
  SET_STRING,
41
+ SET_VEC2D,
42
+ SET_VEC2DI,
38
43
  SET_VEC3D,
39
44
  )
40
45
  from flowgraph.adapters.sinks import AVAILABLE_NODES as SINKS_AVAILABLE_NODES
46
+ from flowgraph.adapters.table_tools import AVAILABLE_NODES as TABLE_TOOLS_AVAILABLE_NODES
41
47
  from flowgraph.adapters.user_code import AVAILABLE_NODES as USER_CODE_AVAILABLE_NODES
42
48
  from flowgraph.adapters.workflow import AVAILABLE_NODES as WORKFLOW_AVAILABLE_NODES
43
49
  from flowgraph.adapters.workflow_interfaces import (
44
50
  AVAILABLE_NODES as WORKFLOW_INTERFACE_AVAILABLE_NODES,
45
51
  )
46
- from flowgraph.adapters.writers import WRITE_MESHIO, WRITE_MESHLANE, WRITE_MUSCAT
52
+ from flowgraph.adapters.writers import WRITE_MESHIO, WRITE_MESHLANE, WRITE_MUSCAT, WRITE_TABLE
47
53
  from flowgraph.application.workflow_core import NodeDefinition
48
54
 
49
55
 
@@ -93,9 +99,10 @@ ADAPTERS = AdapterCatalog(
93
99
  AdapterGroup(
94
100
  "Inputs",
95
101
  subgroups=(
96
- AdapterGroup("Scalars", (SET_STRING, SET_INT, SET_FLOAT)),
102
+ AdapterGroup("Scalars", (SET_STRING, SET_BOOLEAN, SET_INT, SET_FLOAT)),
97
103
  AdapterGroup(
98
- "Lists/Vectors", (SET_LIST_STR, SET_LIST_INT, SET_LIST_FLOAT, SET_VEC3D)
104
+ "Lists/Vectors",
105
+ (SET_LIST_STR, SET_LIST_INT, SET_LIST_FLOAT, SET_VEC2D, SET_VEC2DI, SET_VEC3D),
99
106
  ),
100
107
  AdapterGroup(
101
108
  "Files",
@@ -108,7 +115,7 @@ ADAPTERS = AdapterCatalog(
108
115
  subgroups=(
109
116
  AdapterGroup(
110
117
  "Readers",
111
- (LOAD_MUSCAT, LOAD_MESHIO, LOAD_MESHLANE, LOAD_CSV),
118
+ (LOAD_MUSCAT, LOAD_MESHIO, LOAD_MESHLANE, LOAD_CSV, READ_TABLE),
112
119
  ),
113
120
  AdapterGroup("Mesh Gens", (CSV_TO_MESH,)),
114
121
  AdapterGroup("Mesh Creation", MESH_CREATION_AVAILABLE_NODES),
@@ -119,12 +126,13 @@ ADAPTERS = AdapterCatalog(
119
126
  AdapterGroup("Mesh Ops", MESH_OPS_AVAILABLE_NODES),
120
127
  AdapterGroup("Field Ops", FIELD_OPS_AVAILABLE_NODES),
121
128
  AdapterGroup("File Conversion", (MESH_FILE_CONVERSION,)),
122
- AdapterGroup("Writers", (WRITE_MUSCAT, WRITE_MESHLANE, WRITE_MESHIO)),
129
+ AdapterGroup("Writers", (WRITE_MUSCAT, WRITE_MESHLANE, WRITE_MESHIO, WRITE_TABLE)),
123
130
  ),
124
131
  ),
125
132
  AdapterGroup("Controls", CONTROL_AVAILABLE_NODES),
126
133
  AdapterGroup("Image Tools", IMAGE_TOOLS_AVAILABLE_NODES),
127
- AdapterGroup("Code", USER_CODE_AVAILABLE_NODES),
134
+ AdapterGroup("Table Tools", TABLE_TOOLS_AVAILABLE_NODES),
135
+ AdapterGroup("Code", USER_CODE_AVAILABLE_NODES + IMAGEJ_AVAILABLE_NODES),
128
136
  AdapterGroup("Workflow", WORKFLOW_INTERFACE_AVAILABLE_NODES + WORKFLOW_AVAILABLE_NODES),
129
137
  AdapterGroup("Sinks", SINKS_AVAILABLE_NODES),
130
138
  AdapterGroup("Doc", DOCUMENTATION_AVAILABLE_NODES),
@@ -5,6 +5,7 @@ from collections.abc import Mapping
5
5
  from typing import Any
6
6
 
7
7
  from flowgraph.application.workflow_core import (
8
+ ExecContext,
8
9
  NodeDefinition,
9
10
  ParameterDefinition,
10
11
  PortDefinition,
@@ -51,13 +52,18 @@ def _slider_bounds(
51
52
  return minimum, maximum, value
52
53
 
53
54
 
54
- def _float_slider(_inputs: Mapping[str, Any], parameters: Mapping[str, Any]) -> Mapping[str, Any]:
55
+ def _float_slider(
56
+ _inputs: Mapping[str, Any],
57
+ parameters: Mapping[str, Any],
58
+ _exec_context: ExecContext | None = None,
59
+ ) -> Mapping[str, Any]:
55
60
  """Output the current finite floating-point slider value."""
56
61
  return {"value": _slider_bounds(parameters, integer=False)[2]}
57
62
 
58
63
 
59
64
  FLOAT_SLIDER = NodeDefinition(
60
65
  id="float-slider",
66
+ requirements=(),
61
67
  icon="mdi-tune-vertical",
62
68
  label="Float Slider",
63
69
  description="Outputs a floating-point value selected with a slider.",
@@ -72,13 +78,18 @@ FLOAT_SLIDER = NodeDefinition(
72
78
  )
73
79
 
74
80
 
75
- def _int_slider(_inputs: Mapping[str, Any], parameters: Mapping[str, Any]) -> Mapping[str, Any]:
81
+ def _int_slider(
82
+ _inputs: Mapping[str, Any],
83
+ parameters: Mapping[str, Any],
84
+ _exec_context: ExecContext | None = None,
85
+ ) -> Mapping[str, Any]:
76
86
  """Output the current integer slider value."""
77
87
  return {"value": _slider_bounds(parameters, integer=True)[2]}
78
88
 
79
89
 
80
90
  INT_SLIDER = NodeDefinition(
81
91
  id="int-slider",
92
+ requirements=(),
82
93
  icon="mdi-tune-vertical",
83
94
  label="Integer Slider",
84
95
  description="Outputs an integer value selected with a slider.",
@@ -9,13 +9,14 @@ from pathlib import Path
9
9
  from typing import Any
10
10
 
11
11
  from flowgraph.application.workflow_core import (
12
+ ExecContext,
12
13
  NodeDefinition,
13
14
  ParameterDefinition,
14
15
  PortDefinition,
15
16
  PortDirection,
16
17
  )
17
18
 
18
- from .data_types import ANY, FILE, STRING
19
+ from .data_types import ANY, FILE, STRING, FilePath
19
20
 
20
21
  COSAPP_RESULT_PORT = PortDefinition("result", PortDirection.OUTPUT, ANY, "CoSApp system")
21
22
 
@@ -69,8 +70,11 @@ def _validate_output_paths(output_paths: Mapping[str, str]) -> None:
69
70
 
70
71
  def _load_model(module_path: object, factory_name: object) -> Any:
71
72
  """Load and construct a root CoSApp ``System`` from a trusted Python file."""
72
- if not isinstance(module_path, str) or not module_path.strip():
73
+ if isinstance(module_path, FilePath):
74
+ module_path = str(module_path)
75
+ if not module_path.strip():
73
76
  raise ValueError("The CoSApp model file must be a non-empty Python file path")
77
+
74
78
  if not isinstance(factory_name, str) or not factory_name.strip():
75
79
  raise ValueError("The CoSApp factory name must be a non-empty attribute name")
76
80
 
@@ -130,7 +134,11 @@ def _get_path(model: object, path: str) -> Any:
130
134
  raise ValueError(f"CoSApp output path {path!r} does not exist") from error
131
135
 
132
136
 
133
- def _execute_cosapp(inputs: Mapping[str, Any], parameters: Mapping[str, Any]) -> Mapping[str, Any]:
137
+ def _execute_cosapp(
138
+ inputs: Mapping[str, Any],
139
+ parameters: Mapping[str, Any],
140
+ _exec_context: ExecContext | None = None,
141
+ ) -> Mapping[str, Any]:
134
142
  """Construct, configure, execute, and export one CoSApp model instance."""
135
143
  input_paths = _path_mapping(parameters.get("inputs", "{}"), "inputs")
136
144
  output_paths = _path_mapping(parameters.get("outputs", "{}"), "outputs")
@@ -147,6 +155,7 @@ def _execute_cosapp(inputs: Mapping[str, Any], parameters: Mapping[str, Any]) ->
147
155
 
148
156
  COSAPP_WORKFLOW = NodeDefinition(
149
157
  id="cosapp-workflow",
158
+ requirements=("py:cosapp",),
150
159
  icon="mdi-play-network-outline",
151
160
  label="CoSApp Workflow",
152
161
  description="Executes a trusted external CoSApp System and exports declared result paths.",
@@ -1,9 +1,13 @@
1
+ from pathlib import Path
2
+
3
+ import numpy as np
1
4
  from Muscat.LinAlg.Transform import Transform
2
5
  from Muscat.MeshContainers.Filters.FilterObjects import ElementFilter
3
6
  from Muscat.MeshContainers.Filters.FilterOperators import FilterOperatorBase
4
7
  from PIL.Image import Image
5
8
 
6
9
  from flowgraph.application.workflow_core import DataType
10
+ from flowgraph.domain.filepath import FilePath
7
11
  from flowgraph.domain.mesh_document import MeshDocument
8
12
 
9
13
  ANY = DataType("any", "Any", object)
@@ -16,11 +20,14 @@ LIST_STR = DataType("list[str]", "List Text", list[str])
16
20
  LIST_INT = DataType("list[int]", "List Ints", list[int])
17
21
  LIST_FLOAT = DataType("list[float]", "List Floats", list[float])
18
22
  LIST_ANY = DataType("list[any]", "List Any", list)
19
- FILE = DataType("filename", "Path", str)
23
+ FILE = DataType("filename", "FilePath", FilePath)
24
+
25
+ DIRECTORY = DataType("dirname", "Path", Path)
20
26
 
21
27
  MESH_DOCUMENT = DataType("mesh-document", "Mesh document", MeshDocument)
22
28
  TABLE_DOCUMENT = DataType("table-document", "Table", dict)
23
29
  IMAGE = DataType("image", "Image", Image)
30
+ IMAGEJ = DataType("imagej", "ImageJ NumPy", np.ndarray)
24
31
  MUSCAT_ELEMENT_FILTER = DataType(
25
32
  "filter-like",
26
33
  "Selector",
@@ -30,8 +37,8 @@ VEC3D = DataType("VEC3D", "3D Vector", list[float])
30
37
  VEC2D = DataType("VEC2D", "2D Vector", list[float])
31
38
  VEC3DSTR = DataType("VEC3DSTR", "3D Text Vector", list[str])
32
39
 
33
- VEC3DI = DataType("VEC3D", "3D Vector", list[int])
34
- VEC2DI = DataType("VEC2D", "2D Vector", list[int])
40
+ VEC3DI = DataType("VEC3DI", "3D Integer Vector", list[int])
41
+ VEC2DI = DataType("VEC2DI", "2D Integer Vector", list[int])
35
42
 
36
43
 
37
44
  MULTI_SELECT = DataType("list[bool]", "List bool", list[bool])
@@ -5,11 +5,12 @@ from flowgraph.application.workflow_core import NodeDefinition, ParameterDefinit
5
5
 
6
6
  DOC_TITLE = NodeDefinition(
7
7
  id="title-doc",
8
+ requirements=(),
8
9
  icon="",
9
10
  label="Title",
10
11
  description="Just a Title",
11
12
  ports=(),
12
- executor=lambda x, y: None,
13
+ executor=lambda x, y, _exec_context: None,
13
14
  parameters=(
14
15
  ParameterDefinition(
15
16
  name="title",
@@ -24,11 +25,12 @@ DOC_TITLE = NodeDefinition(
24
25
 
25
26
  DOC_PARAGRAPH = NodeDefinition(
26
27
  id="paragraph-doc",
28
+ requirements=(),
27
29
  icon="",
28
30
  label="Paragraph",
29
31
  description="Long-form documentation text",
30
32
  ports=(),
31
- executor=lambda x, y: None,
33
+ executor=lambda x, y, _exec_context: None,
32
34
  parameters=(
33
35
  ParameterDefinition(
34
36
  name="text",
@@ -14,6 +14,7 @@ from Muscat.MeshTools.MeshTools import GetElementsCenters
14
14
 
15
15
  from flowgraph.adapters.data_types import MESH_DOCUMENT
16
16
  from flowgraph.application.workflow_core import (
17
+ ExecContext,
17
18
  NodeDefinition,
18
19
  ParameterDefinition,
19
20
  PortDefinition,
@@ -25,7 +26,9 @@ from .data_types import ParameterKind
25
26
 
26
27
 
27
28
  def _transfer_fields(
28
- inputs: Mapping[str, Any], _parameters: Mapping[str, Any]
29
+ inputs: Mapping[str, Any],
30
+ _parameters: Mapping[str, Any],
31
+ _exec_context: ExecContext | None = None,
29
32
  ) -> Mapping[str, Any]:
30
33
  """Transfer all nodal fields from ``source_data`` onto ``target``."""
31
34
  source_mesh: Mesh = inputs["source_data"].mesh
@@ -87,6 +90,7 @@ def _transfer_fields(
87
90
 
88
91
 
89
92
  TRANSFER_FIELDS_NODE = NodeDefinition(
93
+ requirements=("py:muscat", "py:numpy"),
90
94
  id="transfer-fields",
91
95
  icon="mdi-swap-horizontal-bold",
92
96
  label="Transfer Fields",
@@ -5,6 +5,7 @@ from pathlib import Path
5
5
  from typing import Any, ClassVar
6
6
 
7
7
  from flowgraph.application.workflow_core import (
8
+ ExecContext,
8
9
  NodeDefinition,
9
10
  ParameterDefinition,
10
11
  ParameterOption,
@@ -221,7 +222,9 @@ except ImportError:
221
222
 
222
223
 
223
224
  def mesh_file_conversion(
224
- inputs: Mapping[str, Any], parameters: Mapping[str, Any]
225
+ inputs: Mapping[str, Any],
226
+ parameters: Mapping[str, Any],
227
+ _exec_context: ExecContext | None = None,
225
228
  ) -> Mapping[str, Any]:
226
229
  """Convert a mesh while preserving the explicit reader/writer algorithm.
227
230
 
@@ -340,7 +343,8 @@ def mesh_file_conversion(
340
343
 
341
344
  MESH_FILE_CONVERSION = NodeDefinition(
342
345
  id="convert-mesh-file-format",
343
- icon="mdi--file-swap",
346
+ requirements=("py:muscat", "py:meshio"),
347
+ icon="mdi-file-swap",
344
348
  label="Convert Mesh File Format",
345
349
  description="Read and write a mesh (and solutions if supported) to a new format file",
346
350
  ports=(PortDefinition("converted_filename", PortDirection.OUTPUT, FILE, "Output Filename"),),