Skip to content

Conversation

balopat
Copy link
Contributor

@balopat balopat commented Nov 12, 2020

Fixes a missing import statement from transform.ipynb, also, adds notebook tests.

The notebook tests run in parallel and each of them in their own virtual env, ensuring that the pip install statements work well. This mirrors how the tests are run on devsite pipelines as well. Hopefully we can catch errors faster this way!

Follow-up potentials:

  • run the notebooks in non-isolated virtualenv as well - so that we test the "running jupyter notebook from the repo" use case too.
  • parallelize on the Github Action job level the notebooks - it is already taking 11 mins :(

I tested treebeard (#3504) github action, and finally settled on rolling my own driver with an executor. For executor I chose papermill as it simply worked just fine with xdist. Though probably I could use treebeard (?) - not sure what the benefit would be for individual notebook execution. jupyter nbconvert --execute didn't seem to execute pip installs? But I haven't gone too deep in that direction.

Fixes #2711.

@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Nov 12, 2020
@balopat balopat force-pushed the fix_transform_notebook branch from fdcb5aa to 9cefe90 Compare November 13, 2020 04:44
@balopat balopat changed the title [WIP] testing treebeard Fixes transform.ipynb and adds notebook testing Nov 13, 2020
@balopat balopat marked this pull request as ready for review November 13, 2020 04:44
@balopat balopat force-pushed the fix_transform_notebook branch from 87976f0 to aa666ca Compare November 13, 2020 04:49
Copy link
Contributor

@Strilanc Strilanc left a comment

Choose a reason for hiding this comment

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

Yes please

@balopat balopat added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Nov 13, 2020
Copy link
Collaborator

@dstrain115 dstrain115 left a comment

Choose a reason for hiding this comment

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

Approved, but please add more comments and explanation about the new test.

# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we need more information about this, for people who follow in this footsteps and try to modify / augment this in the future.

Something akin to the PR description would be useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I'll add that in then!!! Agreed on instructions - I think we should add something in the Development.MD as well!

@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Nov 13, 2020
@CirqBot CirqBot merged commit 00f2990 into quantumlib:master Nov 13, 2020
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tooling that tests Jupyter notebooks.
4 participants