Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write back notebook output #5

Open
phoevos opened this issue Aug 1, 2023 · 1 comment
Open

Write back notebook output #5

phoevos opened this issue Aug 1, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@phoevos
Copy link
Contributor

phoevos commented Aug 1, 2023

After executing each test notebook we attempt to write its final state back to the original file:

output_notebook, _ = ep.preprocess(notebook, {"metadata": {"path": "./"}})
# persist the notebook output to the original file for debugging purposes
save_notebook(output_notebook, test_notebook)

This is meant to be a powerful tool for debugging, allowing us to inspect exactly what happened following a test failure.

Unfortunately, it currently doesn't work exactly as expected. For cells marked with raises-exception (i.e. cells performing checks) we get the desired behaviour; the notebook goes on executing and the errors in those cells are saved in its outputs. If an error is raised in one of the other cells, though, this won't work. In fact, it will look like that cell executed without any output.

One possible patch for that would be using the allow_errors flag, which resembles adding the raises-exception tag everywhere, meaning that should an error be raised in any cell, the execution will continue. Although this would ensure the outputs are saved to the original notebook, it is not ideal, since it can drown us in a chain of errors, something that would not happen when executing the notebook manually (execution stops when a cell breaks).

Goal

Investigate an alternative solution for saving all cell outputs, but still interrupting the notebook execution when an error is raised in a cell not marked with raises-exception.

@phoevos phoevos added the enhancement New feature or request label Aug 1, 2023
@phoevos phoevos self-assigned this Aug 1, 2023
@phoevos
Copy link
Contributor Author

phoevos commented Sep 11, 2023

Closing and reopening to trigger Jira automation.

@phoevos phoevos closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2023
@phoevos phoevos reopened this Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant