Skip to content

Commit 25ff832

Browse files
committed
add sections to console output for update commands
1 parent d8eb5dc commit 25ff832

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bioimageio/core/cli.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,14 +332,15 @@ def run(self):
332332
if isinstance(self.diff, Path):
333333
_ = self.diff.write_text(diff, encoding="utf-8")
334334
elif self.diff:
335-
diff_md = f"````````diff\n{diff}\n````````"
336-
rich.console.Console().print(rich.markdown.Markdown(diff_md))
335+
console = rich.console.Console()
336+
diff_md = f"## Diff\n\n````````diff\n{diff}\n````````"
337+
console.print(rich.markdown.Markdown(diff_md))
337338

338339
if isinstance(self.output, Path):
339340
_ = self.output.write_text(updated_yaml, encoding="utf-8")
340341
logger.info(f"written updated description to {self.output}")
341342
elif self.output == "display":
342-
updated_md = f"```yaml\n{updated_yaml}\n```"
343+
updated_md = f"## Updated bioimageio.yaml\n\n```yaml\n{updated_yaml}\n```"
343344
rich.console.Console().print(rich.markdown.Markdown(updated_md))
344345
elif self.output == "stdout":
345346
print(updated_yaml)

0 commit comments

Comments
 (0)