Skip to content

Commit 1f99ce9

Browse files
pavoljuhasddddddanni
authored andcommitted
CI - disable cirq-rigetti tests (quantumlib#7433)
- Remove cirq-rigetti tests from ci-daily.yml - Remove cirq-rigetti tests from ci.yml - Hardcode exclusion of cirq_rigetti in cirq-core unit tests - Drop cirq-rigetti requirements from dev.env.txt - Exclude cirq-rigetti from typecheck Partially implements quantumlib#7297
1 parent 5bee9b3 commit 1f99ce9

File tree

7 files changed

+21
-54
lines changed

7 files changed

+21
-54
lines changed

.github/workflows/ci-daily.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,15 @@ jobs:
3030
cache-dependency-path: |
3131
**/requirements.txt
3232
dev_tools/requirements/**/*.txt
33-
- name: Install system requirements
34-
run: |
35-
sudo apt-get update
36-
sudo apt-get install libffi7
3733
- name: Install requirements
3834
run: |
3935
pip install --upgrade cirq~=1.0.dev &&
40-
version=$(pip show cirq | sed -n "s/^Version: //p" | grep .) &&
41-
pip install "cirq-rigetti==${version}" &&
4236
pip install \
43-
-r dev_tools/requirements/deps/format.txt \
4437
-r dev_tools/requirements/deps/pylint.txt \
4538
-r dev_tools/requirements/deps/pytest.txt \
4639
-r dev_tools/requirements/deps/notebook.txt
47-
- name: Run Quil dependencies
48-
run: docker compose -f cirq-rigetti/docker-compose.test.yaml up -d
4940
- name: Pytest check
50-
run: check/pytest -n auto --ignore=cirq-core/cirq/contrib --rigetti-integration --enable-slow-tests
51-
- name: Stop Quil dependencies
52-
run: docker compose -f cirq-rigetti/docker-compose.test.yaml down
41+
run: check/pytest -n auto --ignore=cirq-core/cirq/contrib --ignore=cirq-rigetti --enable-slow-tests
5342
windows:
5443
if: github.repository_owner == 'quantumlib'
5544
name: Pytest Windows
@@ -70,13 +59,11 @@ jobs:
7059
- name: Install requirements
7160
run: |
7261
pip install --upgrade cirq~=1.0.dev &&
73-
pip install --upgrade cirq-rigetti~=1.0.dev &&
74-
pip install -r dev_tools/requirements/deps/format.txt &&
7562
pip install -r dev_tools/requirements/deps/pylint.txt &&
7663
pip install -r dev_tools/requirements/deps/pytest.txt &&
7764
pip install -r dev_tools/requirements/deps/notebook.txt
7865
- name: Pytest Windows
79-
run: check/pytest -n auto --ignore=cirq-core/cirq/contrib --enable-slow-tests
66+
run: check/pytest -n auto --ignore=cirq-core/cirq/contrib --ignore=cirq-rigetti --enable-slow-tests
8067
shell: bash
8168
macos:
8269
if: github.repository_owner == 'quantumlib'
@@ -98,12 +85,9 @@ jobs:
9885
- name: Install requirements
9986
run: |
10087
pip install --upgrade cirq~=1.0.dev &&
101-
version=$(pip show cirq | sed -n "s/^Version: //p" | grep .) &&
102-
pip install "cirq-rigetti==${version}" &&
10388
pip install \
104-
-r dev_tools/requirements/deps/format.txt \
10589
-r dev_tools/requirements/deps/pylint.txt \
10690
-r dev_tools/requirements/deps/pytest.txt \
10791
-r dev_tools/requirements/deps/notebook.txt
10892
- name: Pytest check
109-
run: check/pytest -n auto --ignore=cirq-core/cirq/contrib --enable-slow-tests
93+
run: check/pytest -n auto --ignore=cirq-core/cirq/contrib --ignore=cirq-rigetti --enable-slow-tests

.github/workflows/ci.yml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -201,20 +201,12 @@ jobs:
201201
cache-dependency-path: |
202202
**/requirements.txt
203203
dev_tools/requirements/**/*.txt
204-
- name: Install system packages
205-
run: |
206-
sudo apt-get update
207-
sudo apt-get install libffi7
208204
- name: Install requirements
209205
run: |
210206
pip install --upgrade setuptools wheel
211207
pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/dev.env.txt
212-
- name: Run Quil dependencies
213-
run: docker compose -f cirq-rigetti/docker-compose.test.yaml up -d
214208
- name: Pytest check
215-
run: check/pytest -n auto --durations=20 --ignore=cirq-core/cirq/contrib --rigetti-integration
216-
- name: Stop Quil dependencies
217-
run: docker compose -f cirq-rigetti/docker-compose.test.yaml down
209+
run: check/pytest -n auto --durations=20 --ignore=cirq-core/cirq/contrib --ignore=cirq-rigetti
218210
# TODO(#6706) remove after we start using NumPy 2.0 in regular pytest
219211
pytest-numpy-2:
220212
if: github.repository_owner == 'quantumlib'
@@ -235,10 +227,6 @@ jobs:
235227
cache-dependency-path: |
236228
**/requirements.txt
237229
dev_tools/requirements/**/*.txt
238-
- name: Install system packages
239-
run: |
240-
sudo apt-get update
241-
sudo apt-get install libffi7
242230
- name: Install requirements
243231
run: |
244232
pip install wheel
@@ -299,24 +287,16 @@ jobs:
299287
cache-dependency-path: |
300288
**/requirements.txt
301289
dev_tools/requirements/**/*.txt
302-
- name: Install system requirements
303-
run: |
304-
sudo apt-get update
305-
sudo apt-get install libffi7
306290
- name: Install requirements
307291
run: |
308292
pip install --upgrade setuptools wheel
309293
pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/dev.env.txt
310-
- name: Run Quil dependencies
311-
run: docker compose -f cirq-rigetti/docker-compose.test.yaml up -d
312294
- name: Coverage check
313-
run: check/pytest-and-incremental-coverage -n auto --rigetti-integration
295+
run: check/pytest-and-incremental-coverage -n auto --ignore=cirq-rigetti
314296
- name: Upload coverage reports to Codecov
315297
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5
316298
env:
317299
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
318-
- name: Stop Quil dependencies
319-
run: docker compose -f cirq-rigetti/docker-compose.test.yaml down
320300
windows:
321301
if: github.repository_owner == 'quantumlib'
322302
name: Pytest Windows
@@ -343,7 +323,7 @@ jobs:
343323
- name: Pytest Windows
344324
run: |
345325
source dev_tools/pypath
346-
check/pytest -n auto --durations=20 --ignore=cirq-core/cirq/contrib
326+
check/pytest -n auto --durations=20 --ignore=cirq-core/cirq/contrib --ignore=cirq-rigetti
347327
shell: bash
348328
macos:
349329
if: github.repository_owner == 'quantumlib'
@@ -369,7 +349,7 @@ jobs:
369349
pip install --upgrade setuptools wheel
370350
pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/no-contrib.env.txt
371351
- name: Pytest check
372-
run: check/pytest -n auto --durations=20 --ignore=cirq-core/cirq/contrib
352+
run: check/pytest -n auto --durations=20 --ignore=cirq-core/cirq/contrib --ignore=cirq-rigetti
373353
notebooks-stable:
374354
if: github.repository_owner == 'quantumlib'
375355
name: Changed Notebooks Isolated Test against Cirq stable

check/mypy

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ CONFIG_FILE='mypy.ini'
1717
read -r -a CIRQ_PACKAGES < \
1818
<(env PYTHONPATH=. python dev_tools/modules.py list --mode package-path)
1919

20+
# TODO(#7297) clean up after cirq-rigetti removal
21+
for i in "${!CIRQ_PACKAGES[@]}"; do
22+
if [[ "${CIRQ_PACKAGES[i]}" == cirq-rigetti* ]]; then
23+
unset "CIRQ_PACKAGES[i]"
24+
fi
25+
done
26+
2027
echo -e -n "\033[31m"
2128
mypy --config-file=dev_tools/conf/$CONFIG_FILE "$@" "${CIRQ_PACKAGES[@]}" dev_tools examples
2229
result=$?

cirq-core/cirq/protocols/hash_from_pickle_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def _read_json(json_filename: str) -> Any:
8787

8888
def test_exclude_json_files_has_valid_entries() -> None:
8989
"""Verify _EXCLUDE_JSON_FILES has valid entries."""
90-
# do not check rigetti files if not installed
91-
skip_rigetti = all(m.name != "cirq_rigetti" for m in MODULE_TEST_SPECS)
90+
# cirq_rigetti is getting removed per #7058
91+
skip_rigetti = True
9292
json_file_validates = lambda f: any(
9393
m.test_data_path.joinpath(os.path.basename(f)).is_file() for m in MODULE_TEST_SPECS
9494
) or (skip_rigetti and f.startswith("cirq_rigetti/"))

cirq-core/cirq/protocols/json_serialization_test.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,10 @@ class _ModuleDeprecation:
5252
'cirq_ionq': None,
5353
'cirq_google': None,
5454
'cirq_pasqal': None,
55-
'cirq_rigetti': None,
5655
'cirq.protocols': None,
5756
'non_existent_should_be_fine': None,
5857
}
5958

60-
# TODO(#6706) remove after cirq_rigetti supports NumPy 2.0
61-
if np.__version__.startswith("2."): # pragma: no cover
62-
warnings.warn(
63-
"json_serialization_test - ignoring cirq_rigetti due to incompatibility with NumPy 2.0"
64-
)
65-
del TESTED_MODULES["cirq_rigetti"]
66-
6759

6860
def _get_testspecs_for_modules() -> list[ModuleJsonTestSpec]:
6961
modules = []

dev_tools/conf/mypy.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ warn_redundant_casts = true
99
[mypy-cirq.*]
1010
no_implicit_reexport = true
1111

12+
# TODO(#7297) clean up after cirq-rigetti removal
13+
[mypy-cirq_rigetti]
14+
follow_imports = silent
15+
ignore_missing_imports = true
16+
1217
[mypy-__main__]
1318
follow_imports = silent
1419
ignore_missing_imports = true

dev_tools/requirements/deps/cirq-all-no-contrib.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
-r ../../../cirq-google/requirements.txt
66
-r ../../../cirq-ionq/requirements.txt
77
-r ../../../cirq-pasqal/requirements.txt
8-
-r ../../../cirq-rigetti/requirements.txt
98
-r ../../../cirq-web/requirements.txt

0 commit comments

Comments
 (0)