From 30b6c3908e36c58299e920f03803c0f9d8d23668 Mon Sep 17 00:00:00 2001 From: Sam Burdick Date: Fri, 1 Dec 2023 19:21:20 -0800 Subject: [PATCH] Fix test_notebooks_against_cirq_head for MacOS platform (#6366) * And enable that test in CI-daily on MacOS Partially implements #6336 --- .github/workflows/ci-daily.yml | 3 ++- dev_tools/notebooks/notebook_test.py | 4 ++-- dev_tools/requirements/deps/notebook.txt | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-daily.yml b/.github/workflows/ci-daily.yml index 2342b588f70..f70a8f09d71 100644 --- a/.github/workflows/ci-daily.yml +++ b/.github/workflows/ci-daily.yml @@ -86,6 +86,7 @@ jobs: pip install \ -r dev_tools/requirements/deps/format.txt \ -r dev_tools/requirements/deps/pylint.txt \ - -r dev_tools/requirements/deps/pytest.txt + -r dev_tools/requirements/deps/pytest.txt \ + -r dev_tools/requirements/deps/notebook.txt - name: Pytest check run: check/pytest -n auto --ignore=cirq-core/cirq/contrib --enable-slow-tests diff --git a/dev_tools/notebooks/notebook_test.py b/dev_tools/notebooks/notebook_test.py index 05bcb31917a..f72022349cc 100644 --- a/dev_tools/notebooks/notebook_test.py +++ b/dev_tools/notebooks/notebook_test.py @@ -21,13 +21,13 @@ import importlib.metadata import os -import sys import tempfile import pytest from dev_tools import shell_tools from dev_tools.notebooks import filter_notebooks, list_all_notebooks, rewrite_notebook +from dev_tools.test_utils import only_on_posix SKIP_NOTEBOOKS = [ # skipping vendor notebooks as we don't have auth sorted out @@ -87,7 +87,7 @@ def env_with_temporary_pip_target(): @pytest.mark.slow -@pytest.mark.skipif(sys.platform != "linux", reason="Linux-only test") +@only_on_posix @pytest.mark.parametrize("notebook_path", filter_notebooks(list_all_notebooks(), SKIP_NOTEBOOKS)) def test_notebooks_against_cirq_head( notebook_path, require_packages_not_changed, env_with_temporary_pip_target diff --git a/dev_tools/requirements/deps/notebook.txt b/dev_tools/requirements/deps/notebook.txt index b30263babb9..387bfc46f96 100644 --- a/dev_tools/requirements/deps/notebook.txt +++ b/dev_tools/requirements/deps/notebook.txt @@ -8,6 +8,7 @@ ipykernel==5.3.4 # for executing notebooks in tests papermill~=2.3.2 +quimb~=1.6.0 # assumed to be part of colab seaborn~=0.11.1