<#1062 shell: defaults param, fix 3 rendering bugs...
# flyte-github
a
#1062 shell: defaults param, fix 3 rendering bugs, add bedtools example Pull request opened by k1sauce Stacked on top of #1055 — depends on the shell extra introduced there. Summary • New
defaults={...}
parameter on
shell.create()
— per-input fallback values applied when the caller omits an input, independent of
T | None
(which controls flag suppression). • Three rendering bugs found while building a
bedtools intersect
wrapper: • Positional indices ≥ 10 emitted as bare `$10`; bash parses that as
$1
+ literal
"0"
. Tasks with 10+ scalar/bool inputs had values 10..N silently corrupted. Fixed by always-braced
${10}
. • Optional File / Dir flags emitted unconditionally — the renderer hardcoded
-flag /var/inputs/name
regardless of whether the caller supplied the file. Now guarded with
if [ -e <path> ]; then …; else <flag>=""; fi
. • Inputs whose names differ only in case (e.g.
c
vs
C
, common in bio CLIs) collided on the same `_VAL_*`/`_FLAG_*` bash variable and silently overwrote each other.
create()
now rejects this at declaration time. • New
examples/shell/12_bedtools_intersect_example.py
+
examples/shell/modules/bedtools_intersect.py
demonstrating a wider-flag-surface bedtools wrapper as a reference. This should probably just go in your plugins but leaving for your reference. Test plan • 146 unit tests pass (28 new across the four areas above) • Local Docker run of the bedtools example produces correct output for
wa
,
v
,
count_overlaps
against a small BED fixture • Remote run against demo cluster (needs the dev wheel to land on the cluster) flyteorg/flyte-sdk