-
Notifications
You must be signed in to change notification settings - Fork 79
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
TST: Add Test Execution For Notebook Execution #397
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
for more information, see https://pre-commit.ci
John-P
changed the title
TST: Add Unit Tests For Notebook Execution
TST: Add Test Execution For Notebook Execution
Jul 7, 2022
Closed
See #417 for a simpler test of notebook syntax correctness. |
@shaneahmed Shall we delete this PR and branch if we are moving to static analysis of notebooks? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a set of simple unit tests that checks notebooks execute without error. It currently only checks the first
twofour notebooks (CPU only notebooks). nbconvert may need to be added to requirements (to set the version) if this fails on CI.There are other ways to test notebooks including special packages. However, this does not introduce any dependencies, runs as if a normal notebook and also gives us an easy way to control which notebooks run (e.g. no GPU).
To Do / Done
.ipynb
) when testing. Resolved by first copying the notebook to a tmp directory for the test.^!\s*(apt(-get)?|pip).*install
. A better solution that could make these cells only execute on Colab directly in the notebook by simply only executing if theCOLAB_GPU
environment variable exists. Then there will no need to filter lines, and running locally will not execute apt. You can test this in colab vs locally with[[ -z "${COLAB_GPU}" ]] && echo "Not In COLAB" || echo "In COLAB"
.sys.path
) to import correctly on CI and locally during development.coverage.exceptions.DataError: Can't combine arc data with line data
). Supposedly fixed here:but still having issues with this.
Example Error Output With Partial stderr For Failing GPU Notebook