Skip to content

Commit

Permalink
raise ValueError for failed notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
eacharles committed Jun 16, 2023
1 parent 23c9ed6 commit 0da324c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rail/cli/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ def render_nb(outdir, clear_output, dry_run, inputs, **kwargs):
render = os.system(comline)
status[nb_file] = render

ret_val = 0
failed_notebooks = []
for key, val in status.items():
print(f"{key} {val}")
if val != 0:
ret_val = val
failed_notebooks.append(key)

return ret_val
if failed_notebooks:
raise ValueError(f"The following notebooks failed {str(failed_notebooks)}")


def clone_source(outdir, git_mode, dry_run, package_file):
Expand Down

0 comments on commit 0da324c

Please sign in to comment.