add bio helper utility#1055
Open
samhita-alla wants to merge 8 commits into
Open
Conversation
kumare3
reviewed
May 13, 2026
3 tasks
Contributor
|
@samhita-alla some small fixes #1062 and adding a defaults={...} parameter on shell.create() |
samhita-alla
added a commit
that referenced
this pull request
May 13, 2026
) 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 - [x] 146 unit tests pass (28 new across the four areas above) - [x] 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) --------- Signed-off-by: Kyle Hazen <kyle@union.ai> Signed-off-by: Samhita Alla <aallasamhita@gmail.com> Co-authored-by: Samhita Alla <aallasamhita@gmail.com>
6c168d6 to
beb1948
Compare
samhita-alla
added a commit
that referenced
this pull request
May 13, 2026
) 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 - [x] 146 unit tests pass (28 new across the four areas above) - [x] 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) --------- Signed-off-by: Kyle Hazen <kyle@union.ai> Signed-off-by: Samhita Alla <aallasamhita@gmail.com> Co-authored-by: Samhita Alla <aallasamhita@gmail.com> Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
beb1948 to
c35cb7f
Compare
) 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 - [x] 146 unit tests pass (28 new across the four areas above) - [x] 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) --------- Signed-off-by: Kyle Hazen <kyle@union.ai> Signed-off-by: Samhita Alla <aallasamhita@gmail.com> Co-authored-by: Samhita Alla <aallasamhita@gmail.com> (cherry picked from commit f53a8bc)
Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
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.
No description provided.