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

Makes Notebooks a part of testing (Issue 74) #123

Merged
merged 18 commits into from
May 20, 2019
Merged

Makes Notebooks a part of testing (Issue 74) #123

merged 18 commits into from
May 20, 2019

Conversation

joshcombes
Copy link
Contributor

@joshcombes joshcombes commented May 13, 2019

This PR adds notebooks to our testing procedure using nbval. See issue #74 .

The PR includes:

  • some small fixes to notebooks that were not working. (The only remaining notebook that does not work is the process tomography, it is documented here Tomography #94 .)
  • additions to conftest.py to enable skipping slow tests
  • additions to requirements.txt of nbval
  • a new test file test_example_notebooks.py (notebooks which are longer than 30 seconds are skipped). The test passes if all the cells in a notebook can execute.

@joshcombes joshcombes added this to the V0.67103 milestone May 13, 2019
@joshcombes joshcombes requested a review from a team as a code owner May 13, 2019 07:43
@joshcombes
Copy link
Contributor Author

Thanks to @karalekas fix the code should work locally and remotely.

@joshcombes
Copy link
Contributor Author

This is weird. The tests pass on gitlab but the semaphoreci build fails. @karalekas thoughts?

@karalekas
Copy link
Contributor

@joshcombes Two things. (1) Currently the GitLab tests skip the ones that use qvm/quilc (which is a lot of them, so I need to fix that), so there is certainly a chance the GL and Semaphore outputs could be different. (2) Are you able to see the output of the tests on Semaphore? The failure is due to SCS, which is finicky (see #61) and therefore we decided to disable unit tests involving SCS. Take a look at the associated PR to see how we check for the SKIP_SCS environment variable and skip tests involving SCS, and if you want you can try to implement that for the distance_measures notebook tests that are failing (I'm happy to do it as well, but might be a good idea to spread the knowledge). Lmk!

@joshcombes
Copy link
Contributor Author

@karalekas the Semaphore thing is hard to decode. In this case it was an easy fix using an nbval option.

@joshcombes
Copy link
Contributor Author

joshcombes commented May 16, 2019

315rw5

Copy link
Contributor

@kylegulshen kylegulshen left a comment

Choose a reason for hiding this comment

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

LGTM but we should either include the process tomography test or make an issue if the notebook isn't working.

@joshcombes joshcombes merged commit f8717ec into master May 20, 2019
@joshcombes joshcombes deleted the nbt branch May 20, 2019 22:32
@joshcombes joshcombes removed this from the V0.67103 milestone Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants