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

Check for errors when executing initialization code #1373

Merged
merged 2 commits into from
May 15, 2024

Conversation

frankharkins
Copy link
Member

We run some code before notebook execution to silence some warnings and set up mock backends. At the moment, errors are ignored and the kernel continues, often leading to unexpected behaviour.

This PR explicitly checks for errors when running the initialization code and exits early if needed.

@frankharkins frankharkins marked this pull request as ready for review May 14, 2024 16:50
Copy link
Collaborator

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

scripts/nb-tester/qiskit_docs_notebook_tester/__init__.py Outdated Show resolved Hide resolved
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
@frankharkins frankharkins enabled auto-merge May 15, 2024 08:31
@frankharkins frankharkins added this pull request to the merge queue May 15, 2024
Merged via the queue into main with commit 2f9f36a May 15, 2024
2 checks passed
@frankharkins frankharkins deleted the FH/raise-init-code branch May 15, 2024 08:34
frankharkins added a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
We run some code before notebook execution to silence some warnings and
set up mock backends. At the moment, errors are ignored and the kernel
continues, often leading to unexpected behaviour.

This PR explicitly checks for errors when running the initialization
code and exits early if needed.

---------

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants