koode-taskgraph 0.3.1__tar.gz → 0.4.0__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.
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/PKG-INFO +128 -37
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/README.md +127 -36
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/koode_taskgraph.egg-info/PKG-INFO +128 -37
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/pyproject.toml +1 -1
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/app.py +3 -9
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/cli.py +1 -1
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/nodes/builtin.py +7 -3
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/ui/items.py +66 -20
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/ui/main_window.py +51 -24
- koode_taskgraph-0.4.0/taskgraph/ui/plugins.py +485 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/tests/test_core.py +99 -0
- koode_taskgraph-0.4.0/tests/test_gui_plugins.py +366 -0
- koode_taskgraph-0.3.1/taskgraph/ui/plugins.py +0 -208
- koode_taskgraph-0.3.1/tests/test_gui_plugins.py +0 -159
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/LICENSE +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/koode_taskgraph.egg-info/SOURCES.txt +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/koode_taskgraph.egg-info/dependency_links.txt +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/koode_taskgraph.egg-info/entry_points.txt +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/koode_taskgraph.egg-info/requires.txt +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/koode_taskgraph.egg-info/top_level.txt +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/setup.cfg +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/__init__.py +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/__main__.py +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/core/__init__.py +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/core/executor.py +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/core/model.py +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/core/registry.py +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/core/serialization.py +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/nodes/__init__.py +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/ui/__init__.py +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/ui/properties.py +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/ui/scene.py +0 -0
- {koode_taskgraph-0.3.1 → koode_taskgraph-0.4.0}/taskgraph/ui/theme.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: koode-taskgraph
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: An extensible process node graph built with QtPy and PySide6
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -34,6 +34,48 @@ koode-taskgraph
|
|
|
34
34
|
For local development from this repository, use `python -m pip install -e .`.
|
|
35
35
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for pull request guidelines.
|
|
36
36
|
|
|
37
|
+
## Remove local user settings
|
|
38
|
+
|
|
39
|
+
TaskGraph stores user preferences with Qt `QSettings` under organization
|
|
40
|
+
`TaskGraph` and application `TaskGraph`. Settings include saved custom node
|
|
41
|
+
locations and the execution worker count. GUI plugin locations are session-only
|
|
42
|
+
and are not saved, but older versions may have saved GUI plugin locations.
|
|
43
|
+
|
|
44
|
+
Default locations:
|
|
45
|
+
|
|
46
|
+
- **macOS:** `~/Library/Preferences/com.taskgraph.TaskGraph.plist`
|
|
47
|
+
- **Linux:** `~/.config/TaskGraph/TaskGraph.conf`
|
|
48
|
+
- If `XDG_CONFIG_HOME` is set:
|
|
49
|
+
`$XDG_CONFIG_HOME/TaskGraph/TaskGraph.conf`
|
|
50
|
+
- **Windows:** Registry key
|
|
51
|
+
`HKEY_CURRENT_USER\Software\TaskGraph\TaskGraph`
|
|
52
|
+
|
|
53
|
+
Quit TaskGraph before removing settings.
|
|
54
|
+
|
|
55
|
+
macOS:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
defaults delete com.taskgraph.TaskGraph
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Linux:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
rm ~/.config/TaskGraph/TaskGraph.conf
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Windows Command Prompt:
|
|
68
|
+
|
|
69
|
+
```bat
|
|
70
|
+
reg delete HKCU\Software\TaskGraph\TaskGraph /f
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Windows PowerShell:
|
|
74
|
+
|
|
75
|
+
```powershell
|
|
76
|
+
Remove-Item -Path "HKCU:\Software\TaskGraph\TaskGraph" -Recurse -Force
|
|
77
|
+
```
|
|
78
|
+
|
|
37
79
|
## Headless CLI
|
|
38
80
|
|
|
39
81
|
Execute a saved graph without starting Qt or opening a window:
|
|
@@ -51,7 +93,7 @@ koode-taskgraph-cli \
|
|
|
51
93
|
--node-path /path/to/custom_nodes
|
|
52
94
|
```
|
|
53
95
|
|
|
54
|
-
`--node-path` may be repeated. `
|
|
96
|
+
`--node-path` may be repeated. `TASKGRAPH_CUSTOM_NODES` is also supported with
|
|
55
97
|
the normal platform path separator. Use `--json` for structured results,
|
|
56
98
|
`--quiet` to hide progress messages, and `Ctrl+C` to cancel execution.
|
|
57
99
|
|
|
@@ -97,75 +139,119 @@ also live anywhere on disk:
|
|
|
97
139
|
2. Select **Nodes → Add Custom Node Location…** and choose that directory.
|
|
98
140
|
3. Restarting TaskGraph reloads the saved location automatically.
|
|
99
141
|
|
|
100
|
-
Alternatively, set `
|
|
142
|
+
Alternatively, set `TASKGRAPH_CUSTOM_NODES` before launching. Separate multiple
|
|
101
143
|
directories with the platform path separator (`:` on macOS/Linux and `;` on
|
|
102
144
|
Windows):
|
|
103
145
|
|
|
104
146
|
```bash
|
|
105
|
-
|
|
147
|
+
TASKGRAPH_CUSTOM_NODES="/path/to/company_nodes:/path/to/my_nodes" koode-taskgraph
|
|
106
148
|
```
|
|
107
149
|
|
|
108
150
|
Files beginning with `_` are ignored. Importing a custom node module executes
|
|
109
151
|
its Python code, so only add trusted directories. The editor, property panel,
|
|
110
152
|
serialization, and executor require no other changes.
|
|
111
153
|
|
|
154
|
+
This repository includes a practical custom node example in
|
|
155
|
+
`examples/custom_nodes/text_cleanup.py`. Load `examples/custom_nodes` from
|
|
156
|
+
**Nodes → Add Custom Node Location…** or with:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
TASKGRAPH_CUSTOM_NODES="/path/to/taskgraph/examples/custom_nodes" koode-taskgraph
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The example adds **Examples → Clean Text**, which trims text, optionally
|
|
163
|
+
collapses whitespace, and applies a selectable case conversion.
|
|
164
|
+
|
|
112
165
|
## Add a GUI plugin
|
|
113
166
|
|
|
114
|
-
GUI plugins can add menus,
|
|
167
|
+
GUI plugins can add menus, commands, docks, and graph-building tools without
|
|
115
168
|
editing TaskGraph source. Put one or more `.py` files in a plugin directory and
|
|
116
|
-
define `
|
|
169
|
+
define `class Plugin(TaskGraphGuiPlugin)`.
|
|
170
|
+
|
|
171
|
+
The plugin API is split into namespaces. Inside `TaskGraphGuiPlugin` subclasses
|
|
172
|
+
these are available as:
|
|
173
|
+
|
|
174
|
+
- `self.commands` registers reusable commands.
|
|
175
|
+
- `self.ui` exposes GUI features such as menus, docks, and status messages.
|
|
176
|
+
- `self.graph` creates nodes, connects ports, reads the graph model, and adds
|
|
177
|
+
backdrops.
|
|
117
178
|
|
|
118
179
|
```python
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
180
|
+
from taskgraph.ui.plugins import TaskGraphGuiPlugin
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
class Plugin(TaskGraphGuiPlugin):
|
|
184
|
+
plugin_id = "example.graph_daily_report"
|
|
185
|
+
name = "Daily Report Graph Builder"
|
|
186
|
+
version = "1.0.0"
|
|
187
|
+
|
|
188
|
+
def setup(self):
|
|
189
|
+
self.commands.register(
|
|
190
|
+
f"{self.plugin_id}.build_daily_report",
|
|
191
|
+
label="Graph API: Build Daily Report Graph",
|
|
192
|
+
callback=self.build_daily_report,
|
|
193
|
+
)
|
|
194
|
+
self.ui.menus.add_command(
|
|
195
|
+
"Examples",
|
|
196
|
+
f"{self.plugin_id}.build_daily_report",
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
def build_daily_report(self):
|
|
200
|
+
text = self.graph.create_node(
|
|
122
201
|
"input.text",
|
|
123
|
-
name="
|
|
124
|
-
values={"text": "
|
|
202
|
+
name="Report Title",
|
|
203
|
+
values={"text": "Daily Production Report"},
|
|
125
204
|
position=(0, 0),
|
|
126
205
|
)
|
|
127
|
-
|
|
128
|
-
"text.format",
|
|
129
|
-
name="Format Message",
|
|
130
|
-
values={"template": "Output: {value}"},
|
|
131
|
-
position=(280, 0),
|
|
132
|
-
)
|
|
133
|
-
printer = api.create_node(
|
|
206
|
+
printer = self.graph.create_node(
|
|
134
207
|
"output.print",
|
|
135
|
-
name="Print
|
|
136
|
-
position=(
|
|
208
|
+
name="Print Report",
|
|
209
|
+
position=(320, 0),
|
|
137
210
|
)
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
api.add_backdrop(
|
|
143
|
-
title="Template Notes",
|
|
211
|
+
self.graph.connect_dependency(text, printer)
|
|
212
|
+
self.graph.connect_attribute(text, "text", printer, "value")
|
|
213
|
+
self.graph.add_backdrop(
|
|
214
|
+
title="Daily Report Template",
|
|
144
215
|
note="This graph was created by a GUI plugin.",
|
|
145
216
|
position=(-40, -140),
|
|
146
|
-
size=(
|
|
217
|
+
size=(650, 170),
|
|
147
218
|
)
|
|
148
|
-
|
|
149
|
-
api.add_menu_action("Tools", "Build Template Graph", build_template_graph)
|
|
150
219
|
```
|
|
151
220
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
221
|
+
Older flat helpers such as `api.create_node(...)` and
|
|
222
|
+
`api.add_menu_action(...)`, plus the old `register_taskgraph_plugin(api)`
|
|
223
|
+
function entrypoint, are still supported for compatibility. New plugins should
|
|
224
|
+
use the OOP `Plugin` class and namespaced API.
|
|
225
|
+
|
|
226
|
+
Load GUI plugins from **Plugins → Add GUI Plugin Location…** for the current
|
|
227
|
+
session. GUI plugin locations are not saved or automatically reloaded on the
|
|
228
|
+
next launch. To load GUI plugins at startup, set `TASKGRAPH_GUI_PLUGINS` before
|
|
229
|
+
launching, using the same platform path separator rules as
|
|
230
|
+
`TASKGRAPH_CUSTOM_NODES`.
|
|
231
|
+
|
|
232
|
+
This repository includes separate practical example plugins in
|
|
233
|
+
`examples/gui_plugins`:
|
|
234
|
+
|
|
235
|
+
- `ui_project_notes.py` demonstrates the UI API by opening a Project Notes dock
|
|
236
|
+
panel and writing a status message.
|
|
237
|
+
- `command_validate_graph.py` demonstrates the command API by registering a
|
|
238
|
+
reusable graph validation command and exposing it in the menu.
|
|
239
|
+
- `graph_daily_report.py` demonstrates the graph API by building a reusable
|
|
240
|
+
daily-report graph with nodes, dependency links, attribute links, and a
|
|
241
|
+
backdrop.
|
|
156
242
|
|
|
157
|
-
|
|
158
|
-
Load that directory, then run **Examples → Create Hello World Print Graph** or
|
|
159
|
-
**Examples → Create Bingooo Print Graph**.
|
|
243
|
+
Load that directory, then use the **Examples** menu to run each example.
|
|
160
244
|
|
|
161
245
|
GUI plugins are intentionally separate from custom node locations. The
|
|
162
|
-
headless CLI loads `
|
|
246
|
+
headless CLI loads `TASKGRAPH_CUSTOM_NODES` only, so UI plugin code can safely
|
|
163
247
|
import Qt widgets without breaking `koode-taskgraph-cli`.
|
|
164
248
|
|
|
165
249
|
## Controls
|
|
166
250
|
|
|
167
251
|
- Standard commands are organized under the **File**, **Edit**, **Nodes**,
|
|
168
252
|
**Graph**, **Plugins**, and **View** menus.
|
|
253
|
+
- Use the search field at the top of the **Nodes** panel to filter nodes by
|
|
254
|
+
title, type id, or category.
|
|
169
255
|
- Drag a node from **Nodes** to the canvas, or double-click it.
|
|
170
256
|
- Every node has fixed gold **dependency** input/output ports. These control
|
|
171
257
|
process order but do not transfer values. Gold dependency connections show
|
|
@@ -211,6 +297,11 @@ import Qt widgets without breaking `koode-taskgraph-cli`.
|
|
|
211
297
|
stdout, stderr, and return code outputs. It supports an optional working
|
|
212
298
|
directory, shell mode, timeout, and failure on non-zero exit. Shell mode
|
|
213
299
|
executes exactly what the graph author enters, so only run trusted graphs.
|
|
300
|
+
- The built-in **Utils → Format Text** node accepts multiple connections into
|
|
301
|
+
its `value` input. Use positional placeholders such as `{0}`, `{1}`, and
|
|
302
|
+
`{2}` in the template. `{value}` remains available as the first input value
|
|
303
|
+
for simple one-input templates. Connections into multi-input attribute ports
|
|
304
|
+
show index labels on the wire so the template order is visible on the graph.
|
|
214
305
|
- Node headers show live execution state: amber while running, green when
|
|
215
306
|
finished, red on failure, gray when a disabled node is skipped, and muted
|
|
216
307
|
red when a node is blocked by an upstream failure. Cancelled nodes use a
|
|
@@ -23,6 +23,48 @@ koode-taskgraph
|
|
|
23
23
|
For local development from this repository, use `python -m pip install -e .`.
|
|
24
24
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for pull request guidelines.
|
|
25
25
|
|
|
26
|
+
## Remove local user settings
|
|
27
|
+
|
|
28
|
+
TaskGraph stores user preferences with Qt `QSettings` under organization
|
|
29
|
+
`TaskGraph` and application `TaskGraph`. Settings include saved custom node
|
|
30
|
+
locations and the execution worker count. GUI plugin locations are session-only
|
|
31
|
+
and are not saved, but older versions may have saved GUI plugin locations.
|
|
32
|
+
|
|
33
|
+
Default locations:
|
|
34
|
+
|
|
35
|
+
- **macOS:** `~/Library/Preferences/com.taskgraph.TaskGraph.plist`
|
|
36
|
+
- **Linux:** `~/.config/TaskGraph/TaskGraph.conf`
|
|
37
|
+
- If `XDG_CONFIG_HOME` is set:
|
|
38
|
+
`$XDG_CONFIG_HOME/TaskGraph/TaskGraph.conf`
|
|
39
|
+
- **Windows:** Registry key
|
|
40
|
+
`HKEY_CURRENT_USER\Software\TaskGraph\TaskGraph`
|
|
41
|
+
|
|
42
|
+
Quit TaskGraph before removing settings.
|
|
43
|
+
|
|
44
|
+
macOS:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
defaults delete com.taskgraph.TaskGraph
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Linux:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
rm ~/.config/TaskGraph/TaskGraph.conf
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Windows Command Prompt:
|
|
57
|
+
|
|
58
|
+
```bat
|
|
59
|
+
reg delete HKCU\Software\TaskGraph\TaskGraph /f
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Windows PowerShell:
|
|
63
|
+
|
|
64
|
+
```powershell
|
|
65
|
+
Remove-Item -Path "HKCU:\Software\TaskGraph\TaskGraph" -Recurse -Force
|
|
66
|
+
```
|
|
67
|
+
|
|
26
68
|
## Headless CLI
|
|
27
69
|
|
|
28
70
|
Execute a saved graph without starting Qt or opening a window:
|
|
@@ -40,7 +82,7 @@ koode-taskgraph-cli \
|
|
|
40
82
|
--node-path /path/to/custom_nodes
|
|
41
83
|
```
|
|
42
84
|
|
|
43
|
-
`--node-path` may be repeated. `
|
|
85
|
+
`--node-path` may be repeated. `TASKGRAPH_CUSTOM_NODES` is also supported with
|
|
44
86
|
the normal platform path separator. Use `--json` for structured results,
|
|
45
87
|
`--quiet` to hide progress messages, and `Ctrl+C` to cancel execution.
|
|
46
88
|
|
|
@@ -86,75 +128,119 @@ also live anywhere on disk:
|
|
|
86
128
|
2. Select **Nodes → Add Custom Node Location…** and choose that directory.
|
|
87
129
|
3. Restarting TaskGraph reloads the saved location automatically.
|
|
88
130
|
|
|
89
|
-
Alternatively, set `
|
|
131
|
+
Alternatively, set `TASKGRAPH_CUSTOM_NODES` before launching. Separate multiple
|
|
90
132
|
directories with the platform path separator (`:` on macOS/Linux and `;` on
|
|
91
133
|
Windows):
|
|
92
134
|
|
|
93
135
|
```bash
|
|
94
|
-
|
|
136
|
+
TASKGRAPH_CUSTOM_NODES="/path/to/company_nodes:/path/to/my_nodes" koode-taskgraph
|
|
95
137
|
```
|
|
96
138
|
|
|
97
139
|
Files beginning with `_` are ignored. Importing a custom node module executes
|
|
98
140
|
its Python code, so only add trusted directories. The editor, property panel,
|
|
99
141
|
serialization, and executor require no other changes.
|
|
100
142
|
|
|
143
|
+
This repository includes a practical custom node example in
|
|
144
|
+
`examples/custom_nodes/text_cleanup.py`. Load `examples/custom_nodes` from
|
|
145
|
+
**Nodes → Add Custom Node Location…** or with:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
TASKGRAPH_CUSTOM_NODES="/path/to/taskgraph/examples/custom_nodes" koode-taskgraph
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
The example adds **Examples → Clean Text**, which trims text, optionally
|
|
152
|
+
collapses whitespace, and applies a selectable case conversion.
|
|
153
|
+
|
|
101
154
|
## Add a GUI plugin
|
|
102
155
|
|
|
103
|
-
GUI plugins can add menus,
|
|
156
|
+
GUI plugins can add menus, commands, docks, and graph-building tools without
|
|
104
157
|
editing TaskGraph source. Put one or more `.py` files in a plugin directory and
|
|
105
|
-
define `
|
|
158
|
+
define `class Plugin(TaskGraphGuiPlugin)`.
|
|
159
|
+
|
|
160
|
+
The plugin API is split into namespaces. Inside `TaskGraphGuiPlugin` subclasses
|
|
161
|
+
these are available as:
|
|
162
|
+
|
|
163
|
+
- `self.commands` registers reusable commands.
|
|
164
|
+
- `self.ui` exposes GUI features such as menus, docks, and status messages.
|
|
165
|
+
- `self.graph` creates nodes, connects ports, reads the graph model, and adds
|
|
166
|
+
backdrops.
|
|
106
167
|
|
|
107
168
|
```python
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
169
|
+
from taskgraph.ui.plugins import TaskGraphGuiPlugin
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
class Plugin(TaskGraphGuiPlugin):
|
|
173
|
+
plugin_id = "example.graph_daily_report"
|
|
174
|
+
name = "Daily Report Graph Builder"
|
|
175
|
+
version = "1.0.0"
|
|
176
|
+
|
|
177
|
+
def setup(self):
|
|
178
|
+
self.commands.register(
|
|
179
|
+
f"{self.plugin_id}.build_daily_report",
|
|
180
|
+
label="Graph API: Build Daily Report Graph",
|
|
181
|
+
callback=self.build_daily_report,
|
|
182
|
+
)
|
|
183
|
+
self.ui.menus.add_command(
|
|
184
|
+
"Examples",
|
|
185
|
+
f"{self.plugin_id}.build_daily_report",
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
def build_daily_report(self):
|
|
189
|
+
text = self.graph.create_node(
|
|
111
190
|
"input.text",
|
|
112
|
-
name="
|
|
113
|
-
values={"text": "
|
|
191
|
+
name="Report Title",
|
|
192
|
+
values={"text": "Daily Production Report"},
|
|
114
193
|
position=(0, 0),
|
|
115
194
|
)
|
|
116
|
-
|
|
117
|
-
"text.format",
|
|
118
|
-
name="Format Message",
|
|
119
|
-
values={"template": "Output: {value}"},
|
|
120
|
-
position=(280, 0),
|
|
121
|
-
)
|
|
122
|
-
printer = api.create_node(
|
|
195
|
+
printer = self.graph.create_node(
|
|
123
196
|
"output.print",
|
|
124
|
-
name="Print
|
|
125
|
-
position=(
|
|
197
|
+
name="Print Report",
|
|
198
|
+
position=(320, 0),
|
|
126
199
|
)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
api.add_backdrop(
|
|
132
|
-
title="Template Notes",
|
|
200
|
+
self.graph.connect_dependency(text, printer)
|
|
201
|
+
self.graph.connect_attribute(text, "text", printer, "value")
|
|
202
|
+
self.graph.add_backdrop(
|
|
203
|
+
title="Daily Report Template",
|
|
133
204
|
note="This graph was created by a GUI plugin.",
|
|
134
205
|
position=(-40, -140),
|
|
135
|
-
size=(
|
|
206
|
+
size=(650, 170),
|
|
136
207
|
)
|
|
137
|
-
|
|
138
|
-
api.add_menu_action("Tools", "Build Template Graph", build_template_graph)
|
|
139
208
|
```
|
|
140
209
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
210
|
+
Older flat helpers such as `api.create_node(...)` and
|
|
211
|
+
`api.add_menu_action(...)`, plus the old `register_taskgraph_plugin(api)`
|
|
212
|
+
function entrypoint, are still supported for compatibility. New plugins should
|
|
213
|
+
use the OOP `Plugin` class and namespaced API.
|
|
214
|
+
|
|
215
|
+
Load GUI plugins from **Plugins → Add GUI Plugin Location…** for the current
|
|
216
|
+
session. GUI plugin locations are not saved or automatically reloaded on the
|
|
217
|
+
next launch. To load GUI plugins at startup, set `TASKGRAPH_GUI_PLUGINS` before
|
|
218
|
+
launching, using the same platform path separator rules as
|
|
219
|
+
`TASKGRAPH_CUSTOM_NODES`.
|
|
220
|
+
|
|
221
|
+
This repository includes separate practical example plugins in
|
|
222
|
+
`examples/gui_plugins`:
|
|
223
|
+
|
|
224
|
+
- `ui_project_notes.py` demonstrates the UI API by opening a Project Notes dock
|
|
225
|
+
panel and writing a status message.
|
|
226
|
+
- `command_validate_graph.py` demonstrates the command API by registering a
|
|
227
|
+
reusable graph validation command and exposing it in the menu.
|
|
228
|
+
- `graph_daily_report.py` demonstrates the graph API by building a reusable
|
|
229
|
+
daily-report graph with nodes, dependency links, attribute links, and a
|
|
230
|
+
backdrop.
|
|
145
231
|
|
|
146
|
-
|
|
147
|
-
Load that directory, then run **Examples → Create Hello World Print Graph** or
|
|
148
|
-
**Examples → Create Bingooo Print Graph**.
|
|
232
|
+
Load that directory, then use the **Examples** menu to run each example.
|
|
149
233
|
|
|
150
234
|
GUI plugins are intentionally separate from custom node locations. The
|
|
151
|
-
headless CLI loads `
|
|
235
|
+
headless CLI loads `TASKGRAPH_CUSTOM_NODES` only, so UI plugin code can safely
|
|
152
236
|
import Qt widgets without breaking `koode-taskgraph-cli`.
|
|
153
237
|
|
|
154
238
|
## Controls
|
|
155
239
|
|
|
156
240
|
- Standard commands are organized under the **File**, **Edit**, **Nodes**,
|
|
157
241
|
**Graph**, **Plugins**, and **View** menus.
|
|
242
|
+
- Use the search field at the top of the **Nodes** panel to filter nodes by
|
|
243
|
+
title, type id, or category.
|
|
158
244
|
- Drag a node from **Nodes** to the canvas, or double-click it.
|
|
159
245
|
- Every node has fixed gold **dependency** input/output ports. These control
|
|
160
246
|
process order but do not transfer values. Gold dependency connections show
|
|
@@ -200,6 +286,11 @@ import Qt widgets without breaking `koode-taskgraph-cli`.
|
|
|
200
286
|
stdout, stderr, and return code outputs. It supports an optional working
|
|
201
287
|
directory, shell mode, timeout, and failure on non-zero exit. Shell mode
|
|
202
288
|
executes exactly what the graph author enters, so only run trusted graphs.
|
|
289
|
+
- The built-in **Utils → Format Text** node accepts multiple connections into
|
|
290
|
+
its `value` input. Use positional placeholders such as `{0}`, `{1}`, and
|
|
291
|
+
`{2}` in the template. `{value}` remains available as the first input value
|
|
292
|
+
for simple one-input templates. Connections into multi-input attribute ports
|
|
293
|
+
show index labels on the wire so the template order is visible on the graph.
|
|
203
294
|
- Node headers show live execution state: amber while running, green when
|
|
204
295
|
finished, red on failure, gray when a disabled node is skipped, and muted
|
|
205
296
|
red when a node is blocked by an upstream failure. Cancelled nodes use a
|