Skip to content

Commit

Permalink
Minor fixes: comments, rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
xXnathankerrXx committed Apr 10, 2023
1 parent 4d68030 commit d7af62a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Continuous Integration - Weekly
on:
schedule:
# Checks out master by default.
- cron: '0 0 * * 0'
# TODO (#6037) - replace with weekly cadence after verification
- cron: '0 0 * * *'
# - cron: '0 0 * * 0'

concurrency:
group: ${{ github.workflow }}
Expand Down
12 changes: 8 additions & 4 deletions dev_tools/notebooks/isolated_notebook_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def _partitioned_test_cases(notebooks):
return [(f"partition-{i%n_partitions}", notebook) for i, notebook in enumerate(notebooks)]


def _substitute_and_run_notebook(notebook_path, cloned_env):
def _rewrite_and_run_notebook(notebook_path, cloned_env):
notebook_file = os.path.basename(notebook_path)
notebook_rel_dir = os.path.dirname(os.path.relpath(notebook_path, "."))
out_path = f"out/{notebook_rel_dir}/{notebook_file[:-6]}.out.ipynb"
Expand Down Expand Up @@ -214,7 +214,7 @@ def test_changed_notebooks_against_released_cirq(partition, notebook_path, clone
regular expression, it is considered best practice to not use complicated regular expressions.
Lines in this file that do not have `->` are ignored.
"""
_substitute_and_run_notebook(notebook_path, cloned_env)
_rewrite_and_run_notebook(notebook_path, cloned_env)


@pytest.mark.weekly
Expand All @@ -223,8 +223,12 @@ def test_changed_notebooks_against_released_cirq(partition, notebook_path, clone
_partitioned_test_cases(filter_notebooks(list_all_notebooks(), SKIP_NOTEBOOKS)),
)
def test_all_notebooks_against_released_cirq(partition, notebook_path, cloned_env):
"""Tests all notebooks in isolated virtual environments."""
_substitute_and_run_notebook(notebook_path, cloned_env)
"""Tests all notebooks in isolated virtual environments.
See `test_changed_notebooks_against_released_cirq` for more details on
notebooks execution.
"""
_rewrite_and_run_notebook(notebook_path, cloned_env)


@pytest.mark.parametrize("notebook_path", NOTEBOOKS_DEPENDING_ON_UNRELEASED_FEATURES)
Expand Down

0 comments on commit d7af62a

Please sign in to comment.