feat: optional step_id for custom output folder names

Allow readable step folders and xcf_stack layer labels via p.step(..., step_id=...)
while keeping the per-module auto counter unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Frank Schwenk
2026-07-12 22:21:01 +02:00
parent 0daf3e2315
commit 765ebbe3da
6 changed files with 157 additions and 18 deletions
+12 -2
View File
@@ -167,7 +167,7 @@ class MyCliModule(SubprocessModule):
## Step Folder Naming
The runner assigns output folders automatically: `{module_name}_{nn}`.
By default the runner assigns output folders automatically: `{module_name}_{nn}` (two-digit counter per module name).
Using the same module twice in one pipeline produces separate folders:
@@ -178,7 +178,17 @@ darktable_style_01/
darktable_style_02/
```
You do not choose folder names in the module.
In pipeline scripts you can pass an optional `step_id` to `p.step()` for readable folder names and GIMP layer labels (`xcf_stack` uses the step id as the layer name):
```python
input_bokeh = p.step("gmic", inputs="input", command=GMIC_BOKEH, step_id="input_bokeh")
```
`step_id` becomes both the internal step reference and the output subfolder name. It must be unique within the pipeline and must not contain path separators. The per-module counter still increments on every `p.step("gmic", …)` call — a custom id does not reserve or skip a number slot (the next default `gmic` step after `step_id="input_bokeh"` is `gmic_03`, not `gmic_02`, if two prior `gmic` steps ran).
Use the same ids in `EXISTING_OUTPUTS` when resuming with external folders.
You do not choose folder names inside the module implementation.
## Format Warnings