Skip to content

Commit 6e15fcb

Browse files
committed
When initalizing templates, keep asking if empty answer is given
1 parent f327109 commit 6e15fcb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ and this project adheres to [Semantic Versioning][].
1212

1313
### Additions
1414

15-
1615
- Add watermark context manager to DSO Python API, which allows to add watermarks to separate output
1716
files generated by a quarto notebook ([#180](https://github.com/Boehringer-Ingelheim/dso/issues/180))
1817
- `read_params`/`get_config` now warns when `deps`/`outs` sections in `dvc.yaml` contain malformed variable substitution syntax (e.g. `${ param ]` instead of `${ param }`) ([#177](https://github.com/Boehringer-Ingelheim/dso/issues/177))
@@ -27,6 +26,7 @@ and this project adheres to [Semantic Versioning][].
2726

2827
### Fixes
2928

29+
- When initializing templates, keep asking if empty answer is given ([#180](https://github.com/Boehringer-Ingelheim/dso/issues/180))
3030
- Fix that setting `before_script` to `null` in `params.in.yaml` throws an `AttributeError` ([#175](https://github.com/Boehringer-Ingelheim/dso/issues/175))
3131
- Fix template gitignores for `.dvc` and `.quarto_ipynb` files ([#171](https://github.com/Boehringer-Ingelheim/dso/pull/171))
3232

src/dso/_templates.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,10 @@ def prompt_for_template_params(
140140
for p in template["params"]:
141141
name = p["name"]
142142
if name not in kwargs:
143-
res = questionary.text(p["description"]).ask()
143+
while (res := questionary.text(p["description"]).ask()) == "": # keep asking if no answer
144+
pass
144145
if res is None:
146+
print("exit")
145147
sys.exit(1) # user aborted prompt
146148
kwargs[name] = res
147149

0 commit comments

Comments
 (0)